Text can only only inside paragraphs and inlines. This patch makes it
so we stop putting such text nodes in the render tree at all if their
parent is not a paragraph or an inline.
This is the final step in making it so that we don't create anonymous
renderers, which fixes a crash in the new custom layout code.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1077473002
With this gone, cursors will no longer change
on hover when running Sky on a desktop.
Then again the iGeneration doesn't
probably even know what a mouse is, let alone
have a burning desire to set a CSS3 custom-cursor.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/1076623002
We only ever create RenderParagraphs now. The only non-trivial change here
is making RenderView a RenderFlexibleBox. This required changing custom.sky.
That test was written in a fragile way that behaved differently if we
did multiple layouts. Instead, having it be less racy and only change
values during the test itself.
This also throws a wrench in moving all the layout code to dart
because we can't set the layout manager on the RenderView. Maybe
we need to explicitly let you do so.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1068683002
-Make display:flex, flex-direction: column, flex-shrink: 1 the default.
-Simplify StyleAdjuster::adjustStyleForAlignment to remove special cases we
won't need as we make flex the default and remove absolute positioning.
-Fix a bug this exposed in column flexboxes where we'd apply the wrong edge
of border/padding/margin.
-For now leave the default of align-items:stretch. The main change here is
that iframe/img will do width:auto the same as blocks (i.e. the width of
the parent). I think this is a good change, but we'll have to see how it feels
in practice.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1061163002
Previously we'd hit an ASSERT that elements in the style sharing list support
style sharing. However, it can happen that an element gets added to the style
sharing list and then loses the ability to share styles because it has an
active animation. This CL works around the problem by skiping over those
elements when considering style sharing candidates. A better solution would be
to clear the style sharing list when it might contain such an element. However,
it's likely we will remove style sharing in the future so its easier to just
work aroudn the issue for now.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/1036933002
-Remove RenderLayerFilterInfo. It was just a static map for
FilterEffectRenderers. Instead, put the FilterEffectRenderer
directly on RenderLayer.
-Make FilterEffectRenderer not be RefCounted. This involved
deleting a ton of dead code around ReferenceFilters since they
were the other subclass of Filter. As best I can tell,
reference filters are already don't parse in Sky, so this should
just be removing dead code.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/962543003
This is for doing masking based off the alpha channel of
an image. This is a feature we want to support, but we
want a more general imperative API that the declarative thing
is built on top of.
In the meantime, the code is getting in our way and the
feature was already broken (likely from before making sky public).
We just paint the mask image on top instead of doing the actual
masking.
This patch just removes the parsing. Followup patches will
remove the implementation code.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/892903002
We now only preserve the whitespace inside a <t> element inside
the parser. This removes the known n^2 from reattaching whitespace
which should make parsing and appending nodes faster. I also
removed the dead WhitespaceMode code from the parser, and made
the dom-seralizer.sky auto indent the markup so the test output
would be readable.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/867963006
Instead lets just iterate the list of sheets and ask each one questions. This
shouldn't be much slower since most widgets only have one sheet anyway.
I also moved the media query matching to the sheet collection. We weren't
correctly matching them since we only guarded the feature set, not the
addition to the list of active sheets.
R=abarth@chromium.org, ojan@chromium.org
Review URL: https://codereview.chromium.org/858423002
Just rebuild the sheets when the viewport changes sizes since that's
super rare in sky right now. This also causes a full document style
recalc, but we'll fix that later too. For now lets make the system
simpler.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/848483003
There's no reason to keep two identical lists of the sheets
and have this separate object. I also moved the updating
logic out of StyleResolver and into ScopedStyleResolver
which makes more sense. There's still some weirdness since
some global state still exists in the StyleResolver, but
that's something we can fix in future patches.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/852703002
I was going to remove all this anyway since we don't need it in sky, all sheets
are local and there's no concept of a pending sheet now.
I also removed the dirty bit I added to StyleSheetCollection. The bit
is not correct and is preventing us from correctly processing sheets and
invalidating style. I'll add it back later when I understand how to add
the dirty bit correctly.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/846183002
There's no reason to do this, if an element matched
an attribute rule then it'll have a unique style and
RenderStyle::isSharable() will return false so we
wouldn't even get here.
If we could have matched an attribute rule, but didn't
actually match one then we can continue to share with
other elements that aren't affected by attribute rules
since even though our attributes could affect styling
the rules didn't match us.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/843233002
Instead of checking if the rule is from the right scope
in SelectorChecker, just store :host rules separately
and always assume rules are in the right scope in the
checker.
This removes a lot of complexity that was passing around
the scope and checking it, and also the need to plumb
if we're matching UA rules down into the checker.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/848493003
It's always zero in sky.
This was for sorting tree boundary crossing rules and rules in multiple
ShadowRoots on the same element. Neither of those things exist in Sky
so we can remove it.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/800483006
Style sharing didn't play nicely with elements getting
their display adjusted based off the parent's display.
We style share without doing adjusting, so we need to
avoid style sharing if adjusting would result in
a different style. Particularly, we need to make sure
that the display coercion would happen in the same way.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/839153002
Instead lets process the ruleset into the global lists in
the StyleResolver itself. I also combined the methods in
StyleResolver and removed the now dead AddRuleFlags
argument.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/838313002
We can combine matchAuthorRulesForShadowHost into
matchAuthorRules, and also combine the two matchUARules
methods.
collectScopedResolversForHostedShadowTrees and the Vector
of ScopedStyleResolvers was also not needed. Sky can only
ever have two resolvers, the one for your scope, and the
one for your host rules.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/836193003
This flag doesn't really make sense in sky, rules should
only match if they're from the same scope or are a :host
rule in the ShadowRoot on the element. Removing this also
eliminates the ScopeContainsLastMatchedElement flag. For
now we just check if the scope is null for the same
behavior, in the future we'll never let scope be null
and we'll just enforce the normal style scoping rules.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/833443003
This patch is largely just a rename since updateLayoutIgnorePendingStylesheets()
didn't really do anything except call updateLayout() now as nothing was reading
the ignorePendingStyleSheets state, and no callers used the synchronous post
layout task option which was meant for plugins (which Sky doesn't have).
Placeholder styles were related and just add confusion since things pretend to
be display: none while <import>'s are loading. We should expose a real API for
avoiding FOUC instead of pumping frames with display: none elements when
imports are loading.
I had to skip the layout/continuations.sky test since it always crashes now
with an ASSERT failure about a bad cast (filed as bug 446739). The bug already
existed, this patch just makes that one test hit it.
BUG=446739
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/834693007