86 Commits

Author SHA1 Message Date
Elliott Sprehn
765ef4ec8e Replace createTextNode with new Text().
Sky doesn't have this method (per spec).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/879733002
2015-01-26 15:12:19 -08:00
Elliott Sprehn
865790aca0 Remove the EventFactory machinery.
This leaves behind some python bits with the event_factory name, but
that proved difficult to remove right now. This at least simplifies the
code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/879743004
2015-01-26 15:11:44 -08:00
Adam Barth
da75d15a1b Merge HTMLDocument into Document
HTMLDocument is the same as Document. We can merge them.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/871383002
2015-01-25 23:48:53 -08:00
Adam Barth
07140ff848 Remove PlatformEvent
There aren't any more subclasses or uses. Also, remove PlatformEventController
and PlatformEventDispatcher, which are also dead code.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/870413002
2015-01-25 23:48:07 -08:00
Adam Barth
e3f9e2de4b Remove more mouse-specific code
This CL removes a bunch of unused mouse-related code, including the
MouseRelatedEvent base class.

R=eseidel@google.com, eseidel@chromium.org

Review URL: https://codereview.chromium.org/873963003
2015-01-24 11:18:35 -08:00
Adam Barth
aaa8e08ba2 Remove window.history
Instead, Sky content should use navigator.mojom.

R=eseidel@google.com, eseidel@chromium.org

Review URL: https://codereview.chromium.org/873973002
2015-01-24 00:59:40 -08:00
Adam Barth
87c4a4863d Remove touch events from Sky
We use pointer events instead.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/868133003
2015-01-23 12:41:56 -08:00
Adam Barth
d7daaf4c7d Remove mouse events from Sky
We use pointer events now.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/870073003
2015-01-23 12:16:09 -08:00
Elliott Sprehn
ca9d4f1ab2 Consolidate callers to scheduleVisualUpdate.
Make everyone call through Document::scheduleVisualUpdate(). I also
removed some dead composited selection code that used this.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/865383003
2015-01-22 18:47:23 -08:00
Elliott Sprehn
b05eec5f30 Prune the API of StyleResolver.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/858073003
2015-01-20 19:10:03 -08:00
Elliott Sprehn
543049dd5c Remove viewportDefiningElement.
This was used for quirky scrollbar behavior on the web related to
which element defined in the viewport (body, html, etc.). In Sky we plan to
allow multiple elements as direct children of the Document so we need to get
rid of checks like this. The good news is this already does nothing in sky
because the root never has scrollbars automatically.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/858713002
2015-01-16 18:35:12 -08:00
Elliott Sprehn
9bb2664b06 Get rid of ensureStyleResolver().
It doesn't have side effects anymore, and active documents always
have a StyleResolver.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/838003008
2015-01-16 17:49:32 -08:00
Elliott Sprehn
3528612650 All documents should have a RegistrationContext.
There's no reason to have a concept of a document with no
registration context.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/841873006
2015-01-13 17:00:51 -08:00
Elliott Sprehn
66f96ff9bf Remove embedder custom elements.
In Sky there's no concept of embedder custom elements with
different naming rules. Lets remove this machinery.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/838463004
2015-01-13 16:27:56 -08:00
Elliott Sprehn
a5d3fcd3d4 Remove some dead code.
These methods have no callers. I also added a TODO
to actually clear the font cache properly.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/816423004
2015-01-12 23:33:11 -08:00
Elliott Sprehn
90ca29a436 Remove Document::shouldScheduleLayout.
All it does is call isActive() now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/853433002
2015-01-12 23:32:13 -08:00
Elliott Sprehn
43a9629b49 Remove isRenderingReady.
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
2015-01-12 22:11:01 -08:00
Elliott Sprehn
c4ecc2236b Remove didRemoveAllPendingStylesheet.
Nothing calls this now, and sky has no concept of pending stylesheets.

TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/849773002
2015-01-12 20:33:20 -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
7fd0df2238 Remove tracking of pending sheets.
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
2015-01-12 18:15:23 -08:00
Ojan Vafai
1729b054e2 Delete dead painting code around m_pendingSheetLayout.
m_pendingSheetLayout is never set to a non-default value.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/837633003
2015-01-12 17:15:26 -08:00
Ojan Vafai
a198a95ea6 Delete invalidateTreeIfNeeded.
This is just setting and clearing paint invalidation dirty bits.
Also remove a bunch of the paint invalidation dirty bits entirely.
There's plenty more to do.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/791023006
2015-01-12 13:29:12 -08:00
Adam Barth
6b2c0b2c58 The Sky parser should yield before start tags
This CL makes the parser yield before non-import start tags if there are
outstanding imports. This will let use remove the upgrade path from custom
elements because we can require the registration to happen before the tree
building.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/814173005
2015-01-08 14:48:02 -08:00
Elliott Sprehn
e737df55fb Simplify the style sharing list code.
We don't need separate lists per depth now, in fact we never
increment the depth so everything is already at depth 0.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/844873002
2015-01-08 13:53:00 -08:00
Elliott Sprehn
059ceb6e3f Remove the remaining parts of ignorePendingStylesheets and placeholder styles.
This patch is largely just a rename since updateLayoutIgnorePendingStylesheets()
didn't really do anything except call updateLayout() now as nothing was reading
the ignorePendingStyleSheets state, and no callers used the synchronous post
layout task option which was meant for plugins (which Sky doesn't have).

Placeholder styles were related and just add confusion since things pretend to
be display: none while <import>'s are loading. We should expose a real API for
avoiding FOUC instead of pumping frames with display: none elements when
imports are loading.

I had to skip the layout/continuations.sky test since it always crashes now
with an ASSERT failure about a bad cast (filed as bug 446739). The bug already
existed, this patch just makes that one test hit it.

BUG=446739
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/834693007
2015-01-07 10:54:41 -08:00
Elliott Sprehn
1da814b4c2 Remove custom element type extensions.
Sky doesn't really have many built in elements, we no longer support
<foo is="my-element">. This does mean you can't extend <import>,
<script> or <style>, but we'll figure that out later.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/831993005
2015-01-06 16:07:15 -08:00
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