60 Commits

Author SHA1 Message Date
Elliott Sprehn
de9440a990 Simplify StyleEngine clean up.
The StyleEngine only lives as long as the document is attached,
and the document is always detached before it is destroyed. This also
means the document for the style engine always has a frame, so we
don't need to conditionally create the CSSFontSelector.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/786933008
2014-12-17 21:39:42 -08:00
Elliott Sprehn
58d3a54d7b Remove dirtyTreeScopes tracking code from StyleEngine.
This code is dead, nothing ever reads m_dirtyTreeScopes.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/812593004
2014-12-16 18:44:40 -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
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
4dea02214c Remove dead methods from CSSStyleSheet and StyleSheetContents.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/809513003
2014-12-15 13:24:48 -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
0af96f055d Turn StyleSharing to 11.
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
2014-12-11 15:34:24 -08:00
Rafael Weinstein
f38f80c9f8 Enable/Unprefix Animations & Transitions, add basic tests
This patch remove the Web Animations & CSS Animation runtime flags (and enables both). Removes prefixed Aninamations & Transitions and adds some basic tests & test support API.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/760183003
2014-12-10 10:38:34 -08:00
Elliott Sprehn
1771ec30ea Remove SchemeRegistry and WebSecurityPolicy.
Mojo handles the security of our network layer, so we don't need
SchemeRegistry, and WebSecurityPolicy was just a wrapper around it.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/758233004
2014-12-03 16:24:36 -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
Eric Seidel
c2f8ed76bd Remove a couple more core/ header includes from v8_inspector
Removed all uses of Frame in InspectorTraceEvents
in the process, since none of them actually
needed a Frame (since each sky instance only
has one frame).

I've just been burning down the list of core
includes using:
grep "#include" sky/engine/v8_inspector/* -h | sort | uniq | sort | grep core

TBR=yurys@chromium.org
BUG=435243

Review URL: https://codereview.chromium.org/771323002
2014-12-02 13:38:02 -08:00
Eric Seidel
41796985bc Move many of v8_inspector dependencies out of core/
This doesn't fully separate v8_inspector from
core, but it does lay the path.

The next steps to removing v8_inspector is to
remove all the # FIXME: Remove lines in the
deps section of v8_inspector/BUILD.gn.

gn check out/Debug v8_inspector
will tell us if we've successfully removed
all the dependencies.

It's unclear if we want to remove the wtf
dependency, but definitely all of the engine/core
dependencies should be removed and presumably
replaced with abstract interfaces which can be provided
to v8_inspector by its host.

Given the size of this patch (and that it's largely
mechanical) I plan to TBR it.

Most of this was done with tools/git/move_source_file.py

TBR=yurys@chromium.org

Review URL: https://codereview.chromium.org/772563003
2014-12-02 13:00:40 -08:00
Elliott Sprehn
51b98aa289 Remove more Node API.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/772743004
2014-12-02 11:26:42 -08:00
Elliott Sprehn
dea3b116e6 Remove dead markup serialization code.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/771933002
2014-12-02 10:12:21 -08:00
Ojan Vafai
32bd99e95a Delete most of rendering/compositing.
Particularly, this deletes RenderLayerCompositor. After this,
there's just CompositingState left to remove.

This is all dead code, so there should be no change in behavior.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/758843004
2014-11-26 15:15:23 -08:00
Ojan Vafai
e451291645 Remove m_layerTreeView from WebViewImpl.
It's always null now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/757143004
2014-11-25 19:54:27 -08:00
Elliott Sprehn
8d0f8335d4 Remove autofocus.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/754043004
2014-11-25 02:53:08 -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
b9aaf7d8e2 Clean up child checks in ContainerNode.
We can simplify the checks given that there's fewer node types now. This does
make the error messages from Range a little worse, but it's weird that Range
is doing its own error checking anyway.

I also took this as an opportunity to add a bunch of DOM tests.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/732203004
2014-11-18 16:49:48 -08:00
Adam Barth
a8cf7c7b43 Remove dynamic cast from DocumentPaser interface
This CL cleans up the DocumentParser interface to match what's actually needed
by clients. As part of this cleanup, I've removed the asHTMLDocumentParser
dynamic cast and just exposed virtual functions for the state folks were
accessing via the dynamic cast.

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

Review URL: https://codereview.chromium.org/722743002
2014-11-12 13:23:50 -08:00
Adam Barth
79ae83b21f Make the parser an implementation detail of the Document
This CL removes the parser accessors from the document to prevent folks from
grabbing at it.

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

Review URL: https://codereview.chromium.org/723583002
2014-11-12 13:22:45 -08:00
Rafael Weinstein
f973fd339e Removed ScrollingCoordinator and a bunch of composited scrolling'
BUG=
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/721473002
2014-11-11 16:42:00 -08:00
Adam Barth
da617058be Remove preload support from the MemoryCache
We never issue preloads, so this is all dead code.

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

Review URL: https://codereview.chromium.org/710383002
2014-11-11 09:57:11 -08:00
Adam Barth
a52afb449e Simplify some parsing-related code
We don't need a virtual createParser function because there's only one parser.
Also, removed some unused oilpan code.

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

Review URL: https://codereview.chromium.org/712423002
2014-11-11 09:56:10 -08:00
Adam Barth
c552fbd395 Remove DocumentVisibilityObserver
This only client of this mechanism is <canvas>, and it's not a canvas feature
that makes sense in Sky because we're going to remove the separate backing
buffer for <canvas>.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/714953002
2014-11-11 09:51:26 -08:00
Ojan Vafai
f061bf7b9e Rename a few functions now that we don't have zooming.
Just renaming functions and removing an unused RenderObject
argument.

TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/711173003
2014-11-10 19:13:52 -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
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
Adam Barth
b71fee9e48 Move exports from Document to Module
This CL moves the |exports| from Document to the new |Module| interface,
matching the spec. Also, the |module| object available to scripts is now really
an instance of |Module|.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/703593003
2014-11-10 15:34:25 -08:00
Rafael Weinstein
c0ffe6fb23 remove updateTouchEventTargetRectsIfNeeded
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/713073003
2014-11-10 13:08:21 -08:00
Ojan Vafai
e00f34ccf6 Initial step of removing CSS zoom related properties.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/710113003
2014-11-10 13:07:29 -08:00
Elliott Sprehn
d11b95703b Remove many attributes.
This removes many attributes we don't want from HTMLAttributeNames.in
and the associated code.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/708233002
2014-11-07 16:48:59 -08:00
Elliott Sprehn
9959fb2360 Remove execCommand methods from Document.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/713563003
2014-11-07 15:33:43 -08:00
Elliott Sprehn
70b80e3c64 Remove all the now dead Locale code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/706403002
2014-11-07 15:26:23 -08:00
Elliott Sprehn
11b2b24722 Remove DOMImplementation.
Expose a Document constructor instead. This also exposes that
the TemplateBinding library might need more control over the
registration context for custom elements. For now we make all
documents share the same registration context.

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

Review URL: https://codereview.chromium.org/697363002
2014-11-03 23:18:39 -08:00
Adam Barth
ef24228598 Remove <meta>
We're not using this element.

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

Review URL: https://codereview.chromium.org/699023002
2014-11-03 16:51:31 -08:00
Elliott Sprehn
c24fbd5cd2 Remove more API from Node and ContainerNode.
R=abarth@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/698123002
2014-11-03 14:55:19 -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
Adam Barth
8323fb1e88 Basic implementation of <import>
This CL adds basic support for the <import> elements. We're using the same imports
machinery as <link rel="import">, which simplifies this patch substantially.

Currently we support both <link rel="import"> and <import>. Once this CL lands, I'll
update all the existing modules and then we can drop support for
<link rel="import">.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/681983005
2014-11-03 10:14:09 -08:00
Elliott Sprehn
5330701999 Remove Element#attributes.
We now implement getAttributes() such that it returns
a new set of Attr isntances on every call as well.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/697773002
2014-10-31 15:10:53 -07:00
Elliott Sprehn
c384b62ef1 Remove lots of dead virtuals from Element.
Mostly form related things we don't need now.

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

Review URL: https://codereview.chromium.org/694703002
2014-10-30 23:03:02 -04:00
Adam Barth
fc451b47eb Unfork Sky's trace events
This CL remove the body of Sky's TraceEvent.h in favor of the version in base.
There's still some more of the system to unwind before we can remove all the
other boilerplate.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/691663002
2014-10-30 09:39:46 -07:00
Ojan Vafai
959c404854 Remove all writing mode function arguments and remove writing mode from RenderStyle.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/683803006
2014-10-29 12:18:30 -07:00
Ojan Vafai
423d08cc86 More cleanup of dead code now that we don't have frame-level scrolling.
No change in behavior. The overflowchanged event was never fired.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/687783003
2014-10-28 16:53:47 -07:00
Elliott Sprehn
b8843caa44 Remove concept of child Widgets.
FrameView doesn't really need to know about the child widgets,
which are just Scrollbars now.

I also deleted some dead code from Widget and removed FrameWidget
since we don't need that abstraction now.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/685593005
2014-10-28 16:53:12 -07:00
Elliott Sprehn
63d21b0287 Remove RenderWidget.
This is part of the old iframe and plugin system, we don't need it.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/682263003
2014-10-28 15:10:32 -07:00