Instead of making all the built in attributes be global we match them to the
elements they actually apply to. I also removed a bunch of attributes that no
longer work in Sky (but haven't been removed from HTMLAttributeNames.in) yet,
or which we plan to remove.
I also removed the title property from HTMLElement. The <sky-box> widget forgot
to declare its title attribute and no error was generated because of the title
property existing on all elements. Sky doesn't have this so lets remove the API
now and clean up the C++ later.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/807243003
This is an optimization to avoid painting backgrounds
that are obscured. It's a lot of complexity that it's
not clear we'll need given that we're using a GL backend.
Also, we can add it back in more easily/efficiently in the future
once we have a display list architecture.
This also means we can remove the needsPaintInvalidation
dirty bit and some opacity information on filters.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/856563006
The only thing they're used for now is to clear the
background obscuration state on RenderBox. They're
also used in RenderLayerModelObject::styleWillChange,
but that usage seems like a huge premature optimization.
Unfortunately, the RenderBox one walks up the ancestor
chain, so it's likely a necessary performance optimization.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/851033002
Delete selection paint invalidation code.
There is a slight change in behavior in FrameSelection::revealSelection.
If you have a non-collapsed selection, then we'll center the start
of the selection instead of the whole selection in some cases. There's
a ton of callers of this code, so it's hard to be sure if any of this
actually changes behavior for sky. In manual testing, I couldn't find
any scenarios where there was a difference. Almost universally,
when we call revealSelection, we have a CaretSelection. The only
case I could think of where we have a RangeSelection is when
modifying an off-screen selection (e.g. shift+right), but in that case
we pass the RevealExtent option, so this patch doesn't change behavior
there.
Removing that caller makes all the rest of this rect computing
code into dead code.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/823123003
There is a slight change in behavior in FrameSelection::revealSelection.
If you have a non-collapsed selection, then we'll center the start
of the selection instead of the whole selection in some cases. There's
a ton of callers of this code, so it's hard to be sure if any of this
actually changes behavior for sky. In manual testing, I couldn't find
any scenarios where there was a difference. Almost universally,
when we call revealSelection, we have a CaretSelection. The only
case I could think of where we have a RangeSelection is when
modifying an off-screen selection (e.g. shift+right), but in that case
we pass the RevealExtent option, so this patch doesn't change behavior
there.
Removing that caller makes all the rest of this rect computing
code into dead code.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/847303003
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
This removes the upgrade candidate machinery so now if an
element is created before it's registered it'll never get
turned into the correct type. created() callbacks and the
correct wrappers being created can stil happen async though
because certain operations are not safe to run script inside
of (ex. the parser or editing).
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/843063005
All this method did was check if imports were loaded, and sky's parser
will wait on imports anyway, so there's no reason to block rendering
on imports as they'll likely be at the top of the document and stop
the rest of the page from being appended or rendered.
Sky apps will probably also want more control over rendering and not
want the old school web style of incremental rendering.
R=abarth@chromium.org, ojan@chromium.org
Review URL: https://codereview.chromium.org/835273006
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
The update doesn't actually do anything until the resolver
is created, just skip the tree walk.
This also removes the special case for document from StyleSheetCollection
which didn't make any sense. It would cause us to discard the entire
resolver whenever the sheets in the document changed which is far more
work than is actually needed. We probably are missing some font invalidation
code now, but we can add that back later.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/836383005
The loop in StyleEngine::updateActiveStyleSheets calls this
for every scope whenever any stylesheet is added or removed
from the document, ex. appending a new SkyElement with a
<style> in it. The method was crawling the scope and looking
for all sheets and then marking the element as needing a
SubtreeStyleRecalc, instead keep a dirty bit to avoid doing
a full document recalc all the time.
I made this slow previously when I removed all the dirty tree
scope tracking logic and made us go down the reconstruct path
in the resolver update all the time.
We now keep a dirty bit and only do this work when the sheets
for a scope have changed.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/846703003