StyleSheetCollection is tied to TreeScope in lifetime, and should
really just be a member of it like the ScopedStyleResolver. Doing
this makes the StyleEngine simpler and removes the error prone
manual clean up.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/815653002
Just walk the DOM instead. This will be slower, but I'm going to get rid
of the global RuleFeatureSet anyway, so this is just a temporary measure
to simplify the system. Removing the set also means removing a bunch of
special cases for when the document didn't have any ShadowRoots with
styles (which is very unlikely in Sky).
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/810893002
We don't need this since we don't expose the list of sheets from Document
or ShadowRoot in Sky. After removing this code I also simplified the
system and deleted StyleSheetCandidate and DocumentStyleSheetCollector
which don't really do anything anymore.
Even if we do want to add back a list of sheets later it won't need code
because we don't have a concept of a remote sheet like <link rel> did,
and we don't have to deal with non-CSS sheets.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/803673003
In Sky we can style share if our TreeScopes have the same styles, our :host
styles are the same, and we'd inherit the same styles. This allows a lot of
simplification to the style sharing logic since we don't need to deal with
descendant selectors or tree boundary crossing rules:
- We can remove the logic that was checking that we were distributed
to the same insertion points since there's no ::content selectors.
- We can check the actual inherited values instead of looking at the
parentOrSHadowHostNode(). We used to look at the node in Blink because we
were checking that you'd get the same descendant selectors applied. In Sky
we instead want to make sure you'd inherit the same values. This also
means we don't need the element().parentOrShadowHostElement() != parent case
in the SharedStyleFinder which was trying to deal with descendant selectors
again.
I also removed the checks that were redundant with the checks inside
supportsStyleSharing() which we always check before adding sharing
candidates.
Finally by refactoring the code to make the TreeScope style check work it
exposed that the Document::styleSheets() and TreeScope::styleSheets() APIs
are now dead. A future patch will delete the now dead StyleSheetList class
as well.
This change makes the city-list application share between all the items in
the list, and all of the headers of the same type now share as well.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/796713002
This caused us to lose our gn check certification. :(
Turns out gn check was just ignoring all the header
paths it didn't understand and so gn check passing
for sky wasn't meaning much. I tried to straighten
out some of the mess in this CL, but its going to take
several more rounds of massaging before gn check
passes again. On the bright side (almost) all of
our headers are absolute now. Turns out my script
(attached to the bug) didn't notice ../ includes
but I'll fix that in the next patch.
R=abarth@chromium.org
BUG=435361
Review URL: https://codereview.chromium.org/746023002
Fix (most) generated includes to have gen/ in their path.
This makes it easier to tell where files exist on disk.
Unfortunately I had to leave the old include path
in engine/BUILD.gn to support all the v8 includes
which were too many to deal with in this patch.
It's a little nasty to have the raw build directory
in our include path, but it produces nicer paths.
R=abarth@chromium.org
I used do-webcore-rename from Blink/WebKit
which is very good at doing this kind
of search-replace.
Also removed toRefPrtNativeArray after
conversion since it previously had two
separate flavors. Both versions are no longer
used so I've removed the code until we
need one again.
https://www.irccloud.com/pastebin/5C16p5cE
is the diff I used to do-webcore-rename
TBR=abarth@chromium.org