17 Commits

Author SHA1 Message Date
Elliott Sprehn
f44ab040a3 Remove @media rules.
In sky we only support inline styles and <style media>, not
@media rules. This removes the Bison support for parsing them
which was also removed in Blink in favor of the other media
query parser which was added for use on the pre-scanner thread.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/807703003
2014-12-15 18:29:19 -08:00
Elliott Sprehn
ca96d732de Remove REM units.
The code to make them dynamically update was already removed when
Document::inheritHtmlAndBodyElementStyles was removed. We might want
to add them back later, but probably in a different way, so lets
remove the code for now to make refactoring the style system easier.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/788883005
2014-12-15 17:29:04 -08:00
Elliott Sprehn
e0cde8499a Remove single client special cases for StyleSheetContents.
We can also remove all single document checks since in Sky we
don't have the cross document cache so all sheets are always
connected to a single document.

I also did some minor code simplification and removed an
OILPAN ifdef.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/799143002
2014-12-12 17:08:43 -08:00
Elliott Sprehn
89b5468c3b Remove dead code from StyleSheetContents and CSSStyleSheet.
This code was for external stylesheets which we don't
support.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/799073004
2014-12-12 16:27:23 -08:00
Elliott Sprehn
586a535b7f Delete StyleSheetList and support code.
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
2014-12-12 15:47:57 -08:00
Elliott Sprehn
85c3691e29 Remove hasSyntacticallyValidCSSHeader.
This existed apparently to track if a CSS file had at least
a valid CSS rule at the start to attempt to mitigate cross
origin CSS attacks where a file with an invalid mime was
sniffed as CSS and then we skipped the first part which
was not valid, but then interpreted the latter half of
the file as valid CSS.

In Sky all content is same origin, so we don't need this
mitigation.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/800083003
2014-12-12 15:44:21 -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
e929430811 Remove CSSOM mutability in StyleRule.
The StyleRule classes supported copy() operations and mutable
property sets so that we could do copy-on-write and mutate them
using the CSSOM. Sky doesn't have a CSSOM like this though,
so we can remove all this code and make the StyleRule classes
effectively immutable after construction (the parser does mutate some
rules though).

I also removed some other dead code in the StyleRule hierarchy,
like some left over mutation methods that the CSSOM used to use.

R=eseidel@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/758573005
2014-12-03 15:54:31 -08:00
Elliott Sprehn
c229da3e07 Merge StyleSheet into CSSStyleSheet.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/778743003
2014-12-03 14:24:37 -08:00
Elliott Sprehn
3b60d37ad1 Always Reconstruct when stylesheets change.
In preparation of simplifying how we collect and process sheets now
that we don't support descendant, sibling and tree boundary crossing
rules we should switch to always going down the Reconstruct path.

This might be somewhat slower to start, but because our rules are so
much simpler we should be able to rebuild the StyleEngine to do
something simpler and faster.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/774953002
2014-12-02 20:33:58 -08:00
Elliott Sprehn
cc97b4ed56 Remove dead code from StyleEngine.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/775783002
2014-12-02 18:35:42 -08: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
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
Elliott Sprehn
9c7987a6e1 Remove StyleInvalidator machinery.
We don't support descendant selectors, so switch everything back to
basic hash table lookups.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/712173002
2014-11-10 17:35:11 -08:00
Adam Barth
512c4591a6 Remove HTMLLinkElement
Please use <import> instead.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/696413002
2014-11-03 12:51:24 -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