For the async caller, pretty much everything can be extracted out of the loader
/ loadData.
For the sync callers, we need to be a bit more careful because ReparseSheet
tries to get its line number on its own.
I changed the compat mode passed to the reparse stuff to be the document's one
in this case, but that seems a bug fix.
MozReview-Commit-ID: 2wi5HPRAlPi
margin-inline-{end,start} should have this flag because their
corresponding physical properties have this flag, as well as their
equivalents in the block direction.
{max,min}-{block,inline}-size should not have this flag, because their
corresponding physical properties don't have it, so they shouldn't need
it either.
rotate and scale have nothing to do with the frame at all, so they don't
need layout flush. Note that transform and translate need layout flush
because they need to resolve percentage to length.
MozReview-Commit-ID: BcnnOGJIOwO
--HG--
extra : rebase_source : 6a15fbdd6596d86cb0ab81e77a8000976a967ae2
After bug 1303605 we can assert this, since we make sure all children have the
same flattened tree parent, and thus insertion point.
MozReview-Commit-ID: 7AHuGGw2uJI
--HG--
extra : rebase_source : dc6133e36f9810082fb3eaeb479d82ab564b5b81
We may no longer know what the right parent style is, and it's not like it
matters anyway, the frame tree under us is dead, including placeholders and such
holding from us.
MozReview-Commit-ID: 1RHTwvKy0zQ
--HG--
extra : rebase_source : 26e9d393d8edc0f068736cfa1cf1cf630e8d55fa
This shouldn't normally happen, but it does in some rare cases; e.g. if an accessibility client queries info for a node that is being removed.
MozReview-Commit-ID: 3nac9ITN66f
--HG--
extra : rebase_source : 238ffc5b14589c91f30f9f0c7d3c23a82914aad3
All the upstream issues have been resolved, so this now works well.
There is minor artifacting on the linux CI which does show up on
all platforms in my local testing, but it's too minor for more
effort to go into this. I get perfect results locally, so needs
the full fuzzing range.
MozReview-Commit-ID: 8XZk85kn9WP
--HG--
extra : rebase_source : d337b185d83be5fa591f21848e2ce6b8cf0a462c
Some content in Makefile.in is removed because after this change, the
scripts no longer invoke the preprocessor and thus don't have unknown
dependencies anymore outside what is provided in their inputs array.
The order of exports.PREFERENCES in properties-db changes because the
data file has shorthands placed after longhands. The only usage of it
is in test_css-properties-db.js which doesn't care about the order.
MozReview-Commit-ID: AMjzTRf2HYN
--HG--
extra : rebase_source : 7976e48e7c7bba467d77a34ab0d7709cde1ecdf4
With this change, we first generate a data file ServoCSSPropList.py from
Servo data, and then use this data to generate ServoCSSPropList.h.
This change itself serves as a checkpoint with a runtime check that all
information generated from Servo side matches what we have in the Gecko
side. Following patches will start replacing uses of nsCSSPropList.h
with either the data file or the header file.
The reason that it generates data file rather than header directly is
that, many users of PythonCSSProps.h invokes C++ preprocessor manually
to extract data from nsCSSPropList.h without passing in search paths,
so it is non-trivial to replace the use of nsCSSPropList.h there with
a generated header. Generating a Python data file would hopefully
simplify those users rather than adding more complexity to them.
I also thought about generating JSON rather than plain Python file, but
JSON doesn't allow trailing comma in array, which makes it less pretty
to generate via mako template.
MozReview-Commit-ID: CwK2oL88r6F
--HG--
extra : rebase_source : aaf98cfd768740fdd6ac4961fc825d84adaf94a5
This patch goes through and changes a bunch of places in our tree which mention
this bug to use the new feature, making the methods more strongly typed.
There are probably more places in tree which could be changed, but I didn't try
to find them.
In the previous patch, one of the files which was deleted is ShimInterfaceInfo.
This is an implementor of nsIInterfaceInfo which exists for legacy reasons, in
order to allow Components.interfaces.nsIDOM* to have the correct constants and
IIDs associated with them.
As that file was deleted, this information now has to be stored in the typelib.
To do this, the information is moved to the xptshim and xptshimfile attributes
on the relevant xpcom interfaces.
xptshim(...) means that this xpcom interface is a shim for the WebIDL interface
with the specified name.
xptshimfile(...) is for use when the webidl interface is declared in another
interface's .webidl file, (in our case, MessageManager.webidl). It contains the
name of the parent binding, such that we can #include the correct file in our
generated code.
This patch does not add the code which uses these changes, only the parsing
logic.
Assuming we call MarkIntrinsicISizesDirty in the appropriate scenarios, this
patch shouldn't change behavior - it just caches these values so we don't
needlessly recalculate them.
MozReview-Commit-ID: 8QY4AZJXshy
--HG--
extra : rebase_source : a7c87b03ac8240ba71efd2198ce1976d96c91f64
This patch does not change behavior; it just merges the implementations of
these two functions into a single common function.
MozReview-Commit-ID: BqsRt3p2NQT
--HG--
extra : rebase_source : e8792f2bed3fd0708ffb38b91cf15a78cb6fbd59
Note that we also drop the dead optional aReusableSheets argument from
the async parsing path, since it was always null.
MozReview-Commit-ID: KddpGFdaqEe
This improves the DisplayList Mutate Talos test by about 5% on windows, as well as numerous smaller improvements on DisplayList heavy tasks.
MozReview-Commit-ID: tlEtPjqWI4
Some content in Makefile.in is removed because after this change, the
scripts no longer invoke the preprocessor and thus don't have unknown
dependencies anymore outside what is provided in their inputs array.
The order of exports.PREFERENCES in properties-db changes because the
data file has shorthands placed after longhands. The only usage of it
is in test_css-properties-db.js which doesn't care about the order.
MozReview-Commit-ID: AMjzTRf2HYN
--HG--
extra : rebase_source : f9db0659a81bea28b335806ac70e23dc0d36e493
With this change, we first generate a data file ServoCSSPropList.py from
Servo data, and then use this data to generate ServoCSSPropList.h.
This change itself serves as a checkpoint with a runtime check that all
information generated from Servo side matches what we have in the Gecko
side. Following patches will start replacing uses of nsCSSPropList.h
with either the data file or the header file.
The reason that it generates data file rather than header directly is
that, many users of PythonCSSProps.h invokes C++ preprocessor manually
to extract data from nsCSSPropList.h without passing in search paths,
so it is non-trivial to replace the use of nsCSSPropList.h there with
a generated header. Generating a Python data file would hopefully
simplify those users rather than adding more complexity to them.
I also thought about generating JSON rather than plain Python file, but
JSON doesn't allow trailing comma in array, which makes it less pretty
to generate via mako template.
MozReview-Commit-ID: CwK2oL88r6F
--HG--
extra : rebase_source : 926cca8548d42ecb0dd364ea5c52a46a4973e819
Move the assertion to the earliest point where it can happen instead, and do it
automatically on exit if it's generated content instead of relying on manual
calls.
MozReview-Commit-ID: 5oPwXg2o22V
This also adopts the resolution of [1] while at it, and switches XUL to not
support display: contents until a use case appears.
This makes our behavior consistent both with the spec and also in terms of
handling dynamic changes to stuff that would otherwise get suppressed.
Also makes us consistent with both Blink and WebKit in terms of computed style.
We were the only ones respecting "behaves as display: none" without actually
computing to display: none. Will file a spec issue to get that changed.
It also makes us match Blink and WebKit in terms of respecting display: contents
before other suppressions, see the reftest which I didn't write as a WPT
(because there's no spec supporting neither that or the opposite of what we do),
where a <g> element respects display: contents even though if it had any other
kind of display value we'd suppress the frame for it and all the descendants
since it's an SVG element in a non-SVG subtree.
Also, this removes the page-break bit from the display: contents loop, which I
think is harmless.
As long as the tests under style are based in namespace id / node name /
traversal parent, this should not make style sharing go wrong in any way, since
that's the first style sharing check we do at [2].
The general idea under this change is making all nodes with computed style of
display: contents actually honor it. Otherwise there's no way of making the
setup sound except re-introducing something similar to all the state tracking
removed in bug 1303605.
[1]: https://github.com/w3c/csswg-drafts/issues/2167
[2]: https://searchfox.org/mozilla-central/rev/fca4426325624fecbd493c31389721513fc49fef/servo/components/style/sharing/mod.rs#700
MozReview-Commit-ID: JoCKnGYEleD
And fix a comment mentioning nsCSSSelectorList that I came across.
MozReview-Commit-ID: 1BOcDqV5dUr
--HG--
extra : rebase_source : 5fbdae6da74cf4fac145fbdd721723e81839e4b3
UI Events declares that keypress event should be fired only when the keydown
sequence produces some characters. For conforming to UI Events and
compatibility with the other browsers, we should stop dispatching keypress
events for non-printable keys.
For getting regression reports, we should enable this new behavior only
on Nightly.
However, some web apps actually broken with the standardized behavior. For
protecting testers from known broken web apps, this patch introduces a
blacklist to take the traditional behavior under specific domain (and path in
it, optionally). Currently, docs.google.com and mail.google.com are set by
default.
MozReview-Commit-ID: HSrYX8LUB0p
--HG--
extra : rebase_source : a2677d07410af289534db051767543a25c9a957a
This method is not a virtual call, and also looks nicer.
This patch was mostly generated by a Python script, but I manually
cleaned up the code in a few places where statements didn't need to be
split across multiple lines any more.
MozReview-Commit-ID: 8JExxqSRc59
--HG--
extra : rebase_source : df6330a89e8d65dfe7a6fda0c8cb9f9732302efc
This brings us into alignment with the spec and makes us pass some web-platform
tests, along with the reftests that I've included for this bug.
MozReview-Commit-ID: KoKPi18svGE
--HG--
extra : rebase_source : f00dd814238afd4b09bdcb75b22ea249162252b8
This patch doesn't change behavior.
It simply makes us share code/data for two different cases that both ended up
producing mainAxisCoord->GetUnit() == eStyleUnit_Auto. Now, they'll *both* use
the same static nsStyleCoord to represent this "auto" value.
Originally, in one of these cases ("flex-basis:auto;[main-size-property]:auto),
we left the mainAxisCoord untouched. Now we'll point it at this dummy 'auto'
value. Either way we end up with mainAxisCoord->GetUnit() == eStyleUnit_Auto,
so the behavior doesn't change.
The next patch in this series will make further changes to one of these spots,
as noted in the "XXXdholbert" code-comment included here.
MozReview-Commit-ID: 5ClfbNHuKhO
--HG--
extra : rebase_source : 17efe1e9f721324d6182db654e601727c791800b
This patch's reftests already pass, regardless of whether we have this bug's
fix, because the max-content size in the block axis is the same as the "auto" size
(which is what we were already using in this scenario). I'm just adding these reftests
for symmetry & completeness.
MozReview-Commit-ID: EOlrpnCxoby
--HG--
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003-ref.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004-ref.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003a.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004a.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-003b.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-basis-content-004b.html
extra : rebase_source : 93942d169018276040ef60450c8f8b17c75e0d12
Note: These tests fail in current mozilla-central (and hence are marked as
failing), but they start passing as of a patch later on in this series.
MozReview-Commit-ID: ElWJCl1ki0H
--HG--
extra : rebase_source : a5bdb9afae0a3bb902834d07c4c22783c8904104
This patch converts all the prefs in MediaPrefs to the new StaticPrefs system.
Note that the "media.wmf.skip-blacklist" pref was present in both MediaPrefs
and gfxPrefs. The copy in MediaPrefs was never used; this explains why this
patch does not add an entry for it to StaticPrefList.h.
Note also that the patch removes themedia.rust.mp4parser pref, because it's
unused.
MozReview-Commit-ID: IfHP37NbIjY
--HG--
extra : rebase_source : df84ea813b7c366d7be663c696891325610149c8
With this commit, all the auto-dir scrolling functionalities are completed in
APZ.
MozReview-Commit-ID: L7qa3xOD8t9
--HG--
extra : rebase_source : bad2770219a0e6219f91899ab6c78e68f37195ac
This was only recently made possible by webrender#2600, which introduced special stacking-context
clips
MozReview-Commit-ID: HQAU7IsfDaz
--HG--
extra : rebase_source : 0ac7f0f3f73abdf5b60ca02b37cfaa7abeecb6a3
This makes the optimization rarer, but is significantly simpler, since we should now be guaranteed that all placeholder frames have their out of flow frames in the same stacking context.
MozReview-Commit-ID: 1Nf8Sx1dca7
--HG--
extra : rebase_source : 74856420fdf6108fe749c94418a20bc9faa6fc5e
We already rebuild all display items for out-of-flow descendants of a modified frame, but we don't currently mark them modified.
In this case, a scrollframe becomes active, and causes position:fixed descendants to use nsDisplayFixedPosition instead of nsDisplayWrapList.
Not invalidating means that we end up with both versions, instead of removing the old one.
MozReview-Commit-ID: LXjjsQhzxiB
--HG--
extra : rebase_source : e286bad815f2d799ec641e5b2ef6507eb57d22cd
The test invalidates the z-index element, so that we do a partial build with just that and the DAG no longer knows the relative ordering between it and the other blue elements.
We then expand the size of the 'first' elements stacking context, and ensure that we provide enough intersecting items to know that we're on top of the z-index element.
MozReview-Commit-ID: 13aRGm1eucp
--HG--
extra : amend_source : 11d530fbec816b3dbcfa7228625e0ba0e73064d0
We already do this for the maybe-hit regions because on some pages we can get
oodles and oodles of regions and unioning them all takes a long time.
Simplifying the regions speeds this up massively. It should be functionally
correct since the dispatch-to-content region is allowed to overestimate the
actual dispatch-to-content region.
MozReview-Commit-ID: 6Wl5nuVXB7w
--HG--
extra : rebase_source : 6067ae048435421918c6ab1de225140e77ae9484
After bug 1303605 we can assert this, since we make sure all children have the
same flattened tree parent, and thus insertion point.
MozReview-Commit-ID: 7AHuGGw2uJI