19 Commits

Author SHA1 Message Date
Elliott Sprehn
0fcd743a64 Remove Element::textFromChildren().
Instead just use textContent() and teach HTMLStyleElement how to atomize
its children. I also added the optimization to Node::textContent so that
Text just returns its value instead of allocating a new buffer which
avoids malloc and copy when getting the textContent of text.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/864613002
2015-01-20 14:26:54 -08:00
Elliott Sprehn
b3e4c186ee Remove HTMLStyleElement::scopingNode().
It's not used.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/864533003
2015-01-20 14:26:43 -08:00
Elliott Sprehn
e71cf28f76 Merge StyleSheetCollection into ScopedStyleResolver.
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
2015-01-13 18:37:00 -08:00
Elliott Sprehn
689b91c36d Replace sheet change methods with styleResolverChanged.
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
2015-01-12 18:23:55 -08:00
Elliott Sprehn
04288dc280 Simplify tree scope tracking in StyleEngine.
ShadowRoot should deal with adding and removing itself from the active
scope list. HTMLStyleElement should just add/remove itself directy from
the StyleSheetCollection on the scope its entering or leaving in
insertedInto/removedFrom.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/844133002
2015-01-09 20:12:00 -08:00
Elliott Sprehn
ab2499fad9 Only the main document should have a StyleEngine.
In Sky <style> elements in import documents don't apply to the main document,
so we don't need the StyleEngine to be aware of the import tree. This change
makes us only create the StyleEngine for active documents.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/813493003
2014-12-16 13:14:54 -08:00
Elliott Sprehn
15f795fcc3 Simplify the internals of HTMLStyleElement.
addStyleSheetCandidateNode already checks inDocument(), so we can remove
that check. We can also merge processStyleSheet, process and createSheet

I also removed the print media query check, and inlined
clearDocumentData into the destructor.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/798563005
2014-12-12 13:14:12 -08:00
Elliott Sprehn
9c5454bdd9 Remove candidate tracking bit from <style>.
This bit doesn't really seem to do anything except prevent a hash table
lookup in removeChild. I'm hoping to remove the hash tables anyway, so
lets just remove this bit.

I also removed the dead m_loading bit.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/789603003
2014-12-11 18:43:27 -08:00
Elliott Sprehn
e1c6f5561c Remove style element counting in ShadowRoot.
This optimization doesn't make sense, all it does is avoid adding
the ScopedStyleResolver for the ShadowRoot when looking for host
styles, but having that extra resolver shouldn't be slow, and in
sky it's very rare to have a ShadowRoot without styles unlike
on the web where <input> is very common and gets its style from
the UA instead of from a <style> like a normal component.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/797873002
2014-12-11 17:33:56 -08:00
Elliott Sprehn
7d4ebad24b Remove the type attribute from <style>.
In Sky there's only CSS.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/791453004
2014-12-11 17:32:45 -08:00
Elliott Sprehn
c6f3d36fe2 Simplify HTMLStyleElement.
The parser will never insert more than one child into a <style>, so we don't
need explicit logic to batch up parsing. Once I removed that it exposed that
all the line number and parser created logic is from error reporting in the
parser that's been dead in Blink for over a year.

By doing this simplification I was able to remove the finishParsingChildren()
callback entirely.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/788113002
2014-12-09 19:01:46 -08:00
Elliott Sprehn
7500c00d8a Merge StyleElement into HTMLStyleElement.
StyleElement existed because Blink supported <link> and XSL sheets,
Sky only supports <style> so we can merge them together.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/780083003
2014-12-04 13:33:07 -08:00
Elliott Sprehn
c4cc8dd831 Remove didNotifySubtreeInsertionsToDocument.
This hook existed because some elements wanted to run script inside
::insertedInto, but that wasn't a safe time. Now nothing can run script
inside there so we don't need this extra hook.

HTMLStyleElement's usage of this hook is not clear, but it seems like
it might have related to a pre-lazy attach bug.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/758623002
2014-11-25 02:53:43 -05:00
Eric Seidel
e0fd75b5ab Make absolute and sort all Sky headers
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
2014-11-20 17:42:05 -08:00
Eric Seidel
55b5bc485d Sort headers
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
2014-11-19 12:33:42 -08:00
Elliott Sprehn
42d362ff6b Remove tons of OILPAN.
This removes ::trace, traceAfterDispatch and finalizeGarbageCollectedObject.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/723253004
2014-11-13 16:56:13 -08:00
Adam Barth
84faf899bc Remove nop ScriptWrappable::init calls
These calls don't do anything.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/706123005
2014-11-10 16:41:18 -08:00
Eric Seidel
64b5cb61a1 Remove all oilpan transitional types
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
2014-10-27 14:13:01 -07:00
Adam Barth
ae72930937 Open the Sky 2014-10-23 11:17:19 -07:00