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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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