We can't use memcmp to compare PODs, largely because of undefined
padding. The rest of the Pod* functions are fine though, since we're
replicating or zeroing PODs.
MozReview-Commit-ID: LSspAi8qCWw
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.
Really sorry for the size of the patch.
There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.
Differential Revision: https://phabricator.services.mozilla.com/D2361
MozReview-Commit-ID: DiSmMWK7Krp
We use the same setup WR uses, which is checking-in the files.
But I think it's much better than keeping the two things in sync manually :)
When you add a new value, you need to add it to the rust source, then run the
command, but since it doesn't need to build the style crate (it uses the Rust
AST, doesn't build) there's no problem.
Differential Revision: https://phabricator.services.mozilla.com/D2354
MozReview-Commit-ID: DnXkNAzP54H
We use the same setup WR uses, which is checking-in the files.
But I think it's much better than keeping the two things in sync manually :)
When you add a new value, you need to add it to the rust source, then run the
command, but since it doesn't need to build the style crate (it uses the Rust
AST, doesn't build) there's no problem.
Differential Revision: https://phabricator.services.mozilla.com/D2354
MozReview-Commit-ID: DnXkNAzP54H
Using references helps to see when stuff can and cannot be null.
I removed useless aTag / aNamespaceId arguments which are useless now that XBL
can't override them (bug 1450617), so FindXULData is the only one that keeps
them alive.
Also, I took the liberty of renaming a few fooComputedStyle variables to just
fooStyle, and clarify naming in some pseudo-element-related functions to say
originating element (the spec term) and avoid confusing it with the generated
_moz_generated_content_before / _moz_generated_content_after element.
Note that this is a partial state, more stuff will come in the future.
Differential Revision: https://phabricator.services.mozilla.com/D2326
MozReview-Commit-ID: 39B30doREUH
Mochitest to ensure that that zero reflows occur while iterating table
calling innerText and setting `display:none`.
MozReview-Commit-ID: K5vrsj3ogWy
--HG--
extra : rebase_source : 61ceacc5133db6a558a4e8b80f72f18a7195d153
The values in the boolean context depend on its feature. For examples, in the
case of prefers-reduced-motion 'no-preference' means false and 'reduced' mean
true in the boolean context, whereas in the case of prefers-contrast
'no-preference' means false and other two values, 'high' and 'low' means true
in the boolean context. To support it we introduce a child struct of
nsCSSKTableEntry that has an additional field representing the value in the
boolean context and use it when we have no specified value in the media feature
(i.e. in the boolean context).
MozReview-Commit-ID: 79HiW8l5ous
I put Balance as the first item in StyleColumnFill because it is the default
value.
MozReview-Commit-ID: A4DVMLL6XBa
--HG--
extra : rebase_source : 8c8d07b724bcd49dd4f4057fcbf0ccd46ed591ff
NS_STYLE_COLUMN_COUNT_UNLIMITED is unused, so I remove it.
MozReview-Commit-ID: HLHLn9ZbkUY
--HG--
extra : rebase_source : 9bf00e1db00051c4454719e205633717fabde050
This is dead since we started serializing the relevant stuff with Servo.
Differential Revision: https://phabricator.services.mozilla.com/D2208
--HG--
extra : moz-landing-system : lando
Thought I had to update this as well, but nope. When basically any style changes
we already update transitions.
needs_transitions_update already handles the physical mapping changing by
checking whether any transition for the physical property remain there or not.
MozReview-Commit-ID: 6vKwal4yzRU
The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.
MozReview-Commit-ID: 9dI20N0LFrk
This is probably the last thing we will ship since it needs the most spec work.
MozReview-Commit-ID: LLmDBLCsCBJ
--HG--
extra : rebase_source : c06752c9201a9ede87e1ac200ab12577bf784ce6
This feature should not be shipped until the various definitions of addition for
each additive property are properly specified.
Unlike other patches in this series, compositing is not frequently used
internally (e.g. by DevTools etc.) so there is no need to enable this by default
for system code.
Also, it turns out we have inadvertently been shipping part of this feature for
some time now. The next patch in this series will add tests for that case and
disable that part of the feature (a suitable intent to unship will follow). This
patch merely adapts and extends the existing tests without affecting the surface
area covered by the combination of the newly-added pref and the existing
dom.animations-api.core.enabled pref.
MozReview-Commit-ID: Htr6mlyCBav
--HG--
rename : dom/animation/test/mozilla/file_disable_animations_api_core.html => dom/animation/test/mozilla/file_disable_animations_api_compositing.html
rename : dom/animation/test/mozilla/test_disable_animations_api_core.html => dom/animation/test/mozilla/test_disable_animations_api_compositing.html
extra : rebase_source : 7715a25e59568eb122ba3f7dbd2c2b2ffdd19954
This preference controls whether authors are allowed to specify animations
without a 0% or 100% keyframe.
We intend to ship this soon but this preference acts as a safeguard in case we
discover we need to disable it.
This feature is very convenient and commonly used so this patch ensures it is
always enabled for system content.
MozReview-Commit-ID: BHTsuS2xO61
--HG--
rename : dom/animation/test/mozilla/file_disable_animations_api_core.html => dom/animation/test/mozilla/file_disable_animations_api_implicit_keyframes.html
rename : dom/animation/test/mozilla/test_disable_animations_api_core.html => dom/animation/test/mozilla/test_disable_animations_api_implicit_keyframes.html
extra : rebase_source : 04fd93dd26a4765c14b0b22febdb0311b650ea59
We don't intend to ship this in the near future until the integration with
AnimationWorklet is clear (although we might ship a read-only version).
That said, we use this feature extensively internally (e.g. in DevTools etc.) so
we enable this feature for system callers.
MozReview-Commit-ID: AhB7ZmU1Xzw
--HG--
extra : rebase_source : 630d7dc56b44a9261bb34aa5417cb9b7050efba4
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.
This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.
MozReview-Commit-ID: 9tLKBe10ddP
--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
nsComputedDOMStyle is currently one of the biggest sources of pref callback
memory overhead. It currently registers about 5KB of callbacks per process. A
lot of that has to do with it registering multiple callbacks for the same
preference. But even with that problem fixed, we can do better by registering
a single callback for all observed preferences.
This patch does that, but also adds the optimization of deduplicating the list
of observed preferences to avoid wasted cycles needlessly matching against
many identical strings.
MozReview-Commit-ID: LZNgd7cAwo2
--HG--
extra : rebase_source : b73f8a17427bd01c362050d1a7c66e3f6e62332b
Now that all properties handle currentcolor via mozilla::StyleComplexColor,
unify test_currentcolor_transition() and test_true_currentcolor_transition()
into test_currentcolor_transition().
MozReview-Commit-ID: 81hlAgTotpL
--HG--
extra : rebase_source : 0c77a60918a365eb907327e16ff7253df955cf17
Many tests set the dom.animations-api.core.enabled pref to true when all they
really require are the features covered by the dom.element-animate.core.enabled
pref. Now that we have removed that pref and permanently enabled that
functionality we can drop the annotations from such tests.
MozReview-Commit-ID: CGOLp6pVFLE
--HG--
extra : rebase_source : e298e9404d76d55421d9ca4b514410d02cc243b1
Instead of re-dispatch an untrusted event, simply make sure the keyboard event is handled
by the video controls.
MozReview-Commit-ID: 9Kj7E3UP77w
--HG--
extra : rebase_source : 8bbc787c7e5dd3d4351270b17f521f49b0f1a21c
Before this change, the test in this commit fails. The received events order
is;
1) cancel
2) transitioncancel
3) transitionstart
4) finish
MozReview-Commit-ID: 8liTFXime6e
--HG--
extra : rebase_source : 3c68ef330b1f263afa2fad9670a30b351b8dbf28
Now that all properties handle currentcolor via mozilla::StyleComplexColor,
unify test_currentcolor_transition() and test_true_currentcolor_transition()
into test_currentcolor_transition().
MozReview-Commit-ID: 81hlAgTotpL
--HG--
extra : rebase_source : 9c9744c3fe4e423451e5a581501c88539c9d591f
Most preference callbacks use literal strings for their domain filters, which
means that there's no need to make copies of them at all. Currently, however,
every preference observer node makes a separate heap-allocated copy of its
domain string.
This patch switches the domain string storage to nsCString instances, which
dramatically reduces the amount of unnecessary copies, at the expense of
making the callback nodes slightly larger.
MozReview-Commit-ID: 8NA3t2JS2UI
--HG--
extra : rebase_source : 628ad9af65cec16fb8be0c8dddc608b5ee5602e2
This expands the testing of 'unset' invalid values to border-image-source,
mask-image, and shape-outside.
MozReview-Commit-ID: 3tcHnCgr6Dh
--HG--
extra : rebase_source : 80205a8ee5d186b3606adde50cadd7027f695c5f
Feature is mature and doesn't need pref.
In fact, it was not used in code anymore, only in tests.
MozReview-Commit-ID: AbH8OCiksDa
--HG--
extra : rebase_source : b9a7d18b3c1b948f213632a16d2152f80d676068
... and cleanup unused keywords / getters using the scripts in
layout/style/tools
Differential Revision: https://phabricator.services.mozilla.com/D1901
MozReview-Commit-ID: BRUGcje7X0q
Most of it is automated by:
%s/eStyleContentType_/StyleContentType::/g
%s/nsStyleContentType/StyleContentType/g
But I removed some parentheses by hand.
Differential Revision: https://phabricator.services.mozilla.com/D1900
MozReview-Commit-ID: 3IcirjIYX5p
The 'all' shorthand has shipped a long time ago, so this pref is not needed
anymore.
MozReview-Commit-ID: GND8qSVAfCG
--HG--
extra : rebase_source : 10708e749911fa95554ed423a5782db61df67cd0