Because we dump dart errors to LOG(ERROR) (stderr) instead
of console.log / stdout, tests with dart errors just "pass"
and we don't notice they're not running.
This was the case with canvas-rounded-corners.sky.
I don't think this test actually passes yet, despite it
claiming to, but I at least have made it run and not crash.
Required me commenting out a ton of CanvasRenderingContext2D, but
that's fine, it wasn't actually working and it's better to have
it be compiling valid dart.
R=abarth@chromium.org, ojan@chromium.org
BUG=
Review URL: https://codereview.chromium.org/936563002
The use-cases we care about are met better by translate2d.
Remove the parsing so that people writing on sky don't
depend on it. Followup patches will remove the functionality.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/904613005
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
This was to support doing background: -webkit-canvas(#id) where you could then
get the canvas with document.getCSSCanvasContext(id) and draw into it which
is a poor form of custom drawing for elements. In Sky we'll have real custom
painting instead of just background images hacked in like this.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/876913002
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
Unlike blink in sky we just want to mark tree scopes dirty. We can
remove these methods, the dirty tree scope tracking we'll add in
the future will take care of this.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/836893003
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
We now store the bits about what was matched inside the SelectorChecker
and map them to operations that mutate the style after matching the
selector. This eliminates the SelectorChecker::Mode.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/840163003
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