117 Commits

Author SHA1 Message Date
Adam Barth
e89b1dda15 lowlevel/img.sky flaky crashes
We don't need to pump pending speculations if we don't have any.

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

Review URL: https://codereview.chromium.org/852043003
2015-01-14 13:32:21 -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
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
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
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
47b217c64c Don't scope check in SelectorChecker.
Instead of checking if the rule is from the right scope
in SelectorChecker, just store :host rules separately
and always assume rules are in the right scope in the
checker.

This removes a lot of complexity that was passing around
the scope and checking it, and also the need to plumb
if we're matching UA rules down into the checker.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/848493003
2015-01-09 19:00:51 -08:00
Ojan Vafai
a794eb951d Delete an assortment of unneeded paint invalidation code.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/845093002
2015-01-09 18:31:26 -08:00
Elliott Sprehn
bbd0b89106 Get rid of SelectorCheckingContext.
We can just pass the Element and the scope.

I also deleted checkExactAttribute which was not called, and inlined
tagMatches which only had a single caller.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/801283006
2015-01-09 15:17:20 -08:00
Elliott Sprehn
29ce4f5a9a Make SelectorChecker a const operation over element.
We now store the bits about what was matched inside the SelectorChecker
and map them to operations that mutate the style after matching the
selector. This eliminates the SelectorChecker::Mode.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/840163003
2015-01-08 18:06: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
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
Eric Seidel
a251cf3ecb Move Sky's DataPipeDrainer to mojo/common
I want to use DataPipeDrainer in some non-sky code
it seems generally useful (and compiled w/o modification).

R=jimbe@chromium.org, jamesr@chromium.org

Review URL: https://codereview.chromium.org/811873003
2014-12-17 12:16:34 -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
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
Colin Blundell
b5be4a0945 Restructure public side of navigation service.
This CL goes from this:
  //mojo/services/public/interfaces/navigation

to this:
  //mojo/services/navigation/public/interfaces

This CL also makes the Mojo-side changes necessary to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/796783002
2014-12-11 08:49:15 +01:00
Colin Blundell
3dc76a69df Restructure public side of view_manager service.
This CL goes from this:
//mojo/services/public/cpp/view_manager
//mojo/services/public/interfaces/view_manager

to this:
//mojo/services/view_manager/public/cpp
//mojo/services/view_manager/public/interfaces

This CL also makes the Mojo-side changes required to roll this change into
Chromium (for both view_manager and window_manager, which was converted in an
earlier CL but for which these updates were not made):
- Updates rev_sdk.py to pull over the new directory
- Updates //mojo/services/public/mojo_services_public.gyp

TBR=beng

Review URL: https://codereview.chromium.org/790623003
2014-12-10 14:16:27 +01: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
c2916617b4 Merge ClassList into DOMTokenList.
In Sky we only have one implementation of DOMTokenList so we don't
need this virtual interface.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/789843004
2014-12-09 16:06:29 -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
6c94c18612 Remove the CSSOM.
This leaves CSSValue, but removes everything else.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/780483002
2014-12-03 10:50:02 -08:00
Elliott Sprehn
1ace39304c Remove code to collect rules when matching.
We should come up with a better way to implement this feature for the
inspector, the current implementation uses CSSOM wrappers and is n^2
over the number of rules in the page.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/772363002
2014-12-02 23:10:58 -08:00
Elliott Sprehn
061c71d806 Mostly merge HTMLElement into Element.
R=eseidel@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/772133003
2014-12-02 12:00:21 -08:00
Rafael Weinstein
d6605f71f9 Remove a bunch of dead code from RenderLayer
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/735033003
2014-11-28 19:59:55 -08:00
Ojan Vafai
edbc055885 Get rid of CompositingState.
It's always NotComposited. Also removed some DisableCompositingQueryAsserts.
The asserts they are disabling no longer exist.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/768493002
2014-11-26 18:49:36 -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
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
295f920116 Fix sky include guards to match Chromium style
I wrote a script to do this which is attached
to the bug.

TBR=abarth@chromium.org
BUG=435361

Review URL: https://codereview.chromium.org/736373003
2014-11-21 02:48:38 -08:00
Adam Barth
0c96c6eaa6 Add support for import@async
We don't have a good way of testing this behavior without introducing a race.
Ideally we'd unit test it, but we don't really have unit tests yet.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/751493003
2014-11-20 23:14:49 -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
Matt Perry
7f17e0b4b9 Unrevert "Sky: When an iframe element is removed, delete its mojo View."
This reverts commit acec66c735d6a40d3da3e0e9a6ee5f278bdfe043.

Scott thinks he fixed the crash.

BUG=434555
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/740383002
2014-11-20 11:13:16 -05: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
Matt Perry
2a60db84ea Revert "Sky: When an iframe element is removed, delete its mojo View."
This reverts commit 45991a3752e6a6298901eba36e7bf4cdec4d263c.

It was causing flaky crashes on the bots.

TBR=esprehn@chromium.org
BUG=434555

Review URL: https://codereview.chromium.org/740773002
2014-11-19 15:13:28 -05:00
Elliott Sprehn
4d83953263 Teach HTMLImageElement that it doesn't need ::attach.
Instead of using a custom ::attach to do post insertion work
when assigning the image resource to the RenderImage, we should
just fix the logic inside RenderImage to be able to handle
not being in the tree yet when the resource is first set.

Soon attach will not be virtual anymore.

I also made RenderImage final and most methods private as there
are no longer subclasses.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/732163004
2014-11-18 11:08:46 -08:00
Matt Perry
14ec13d9c0 Sky: When an iframe element is removed, delete its mojo View.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/733063007
2014-11-18 14:00:05 -05:00
Rafael Weinstein
0b758e5227 Remove CSSCompositing
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/731863003
2014-11-17 14:34:30 -08:00
Elliott Sprehn
a0abae6ce1 Remove parserRemoveChild.
This was for the adoption agency which we don't have anymore.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/734063005
2014-11-17 13:48:49 -08:00
Elliott Sprehn
0a474a4c0b Remove parserInsertBefore.
This code was for the foster parenting algorithm.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/729713003
2014-11-17 13:10:12 -08:00
Eric Seidel
9ec75d67ce Use root-relative V8 includes
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/726133002
2014-11-14 16:02:21 -08:00
Elliott Sprehn
9ea3c3648b Remove sizes attr.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/732813002
2014-11-14 13:52:02 -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
Matt Perry
037ca1b039 Rename RenderRemote to RenderIFrame.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/723143003
2014-11-13 18:19:28 -05:00
Adam Barth
5192329f25 Script-based imports should basically work
This CL adds the beginning of a new module loading system that matches the
conceptual module in the spec. I've writed it up to the import API on
AbstractModule. In a future CL, I'll replace the old module loading system with
this one.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/720903002
2014-11-12 13:29:14 -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
Eric Seidel
5bdc6515b9 Re-land 714393002 after fixing android build.
Original CL:
https://codereview.chromium.org/714393002

Reverted in:
https://codereview.chromium.org/719063002

One fix was to use static_assert instead
of _Static_assert in COMPILE_ASSERT.

_Static_assert is C11, static_assert is C++11
and Android's stdlib doesn't have C11 support,
but we don't care since we never use COMPILE_ASSERT
in plain C code.

The second fix was also for the android STL
and was adding back the nullptr_t type
definition in NullPtr.h for old versions of STL.

I compile this locally for android to verify
that it works
mojo/tools/mojob.py build --android

TBR=jamesr@chromium.org,qsr@chromium.org

Review URL: https://codereview.chromium.org/722723003
2014-11-12 12:16:05 -08:00