We don't need to create AnimationEventParams, we can direcly create
AnimationEventInfo array and move it to dispatcher.
MozReview-Commit-ID: BCzKGAV8VTw
--HG--
extra : rebase_source : f668b27bacb0c929de5b997b5428c3c75e5a8474
DispatchEvents() couldn't be moved since the function holds a reference of
nsAnimationManager or nsTransitionManager, but the common template class
is not ref-countable.
MozReview-Commit-ID: FfiJtzSZWn
--HG--
extra : rebase_source : 30d1cdcebf8e06696f28ba5c0968a90797976f06
Currently, InspectorUtils::GetCSSValuesForProperty will not return
"match-parent" for "text-align". The bug is that InspectorUtils uses
an out-of-date approach to finding the end of the keyword table; and
this approach conflicts with the special "unsafe" handling in
TextAlignUnsafeEnabledPrefChangeCallback:
https://dxr.mozilla.org/mozilla-central/rev/21ddfb9e6cc008e47da89db50e22697dc7b38635/layout/base/nsLayoutUtils.cpp#317-321
MozReview-Commit-ID: 58qfKQwIyMX
--HG--
extra : rebase_source : 022a8c970c121cbe76533a29d0439a64ead63085
Most of the Shadow DOM related code are behind "dom.webcomponents.enabled" and
this pref is only used by Shadow DOM right now, so we should rename it to
"dom.webcomponents.shadowdom.enabled"
MozReview-Commit-ID: er1c7AsSSW
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing a broken depending test - CLOSED TREE, r=me
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing WPTs - CLOSED TREE, r=me
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing tests - CLOSED TREE, r=me
-moz-dropdown-list is only allowed to use universal selector, so change
it back to universal selector.
MozReview-Commit-ID: 5E9Z98xIadh
--HG--
extra : rebase_source : fa6406cbe1b6bab582a1ee8dd2c7e89a4c66591e
We no longer call the function directly. It has been replaced by
nsStyleDisplay::GetTransitionCombinedDuraion(uint32_t).
MozReview-Commit-ID: 9wZExWPmnyG
--HG--
extra : rebase_source : dff6b4e686578e7c79e16148ab3ab63b40444be7
This is also a prerequisite to use repeated values for the used value.
Note that each count should never be zero since their initial value is 1 and
we never set zero length property value to the member.
MozReview-Commit-ID: 44ZMhopuK6o
--HG--
extra : rebase_source : 6284b2b5beb43bf78c16e0c39e95ec0e5118ed14
This is a prerequisite to use repeated values for the used value of the each
animation property instead of the computed values.
In a subsequent patch in this patch series, the timing function will be replaced
with the one which may be a repeated value in computed animation timing function values list.
MozReview-Commit-ID: GOKHE3MH0Ue
--HG--
extra : rebase_source : ecc270eddb648d2915292ec3e219f4e349c6047c
Now that accessing nsIContent slots is not a blob of virtual function calls, we
should be able to unify logic here, and speed up the not-so-rare case for
chrome, while keeping the usual case fast.
MozReview-Commit-ID: 87iY5Cbhx4T
This bug notes that getCSSValuesForProperty does not mention the
"none" value for counter-increment and counter-reset. This fixes the
problem by mentioning the variants in the entries in nsCSSPropList.h.
MozReview-Commit-ID: HpZIMIIejHc
It seemed valid to simply set the expected variants in
nsCSSPropList.h; other properties (e.g., align-content) do this as
well.
MozReview-Commit-ID: HVZGOofkwi1
--HG--
extra : rebase_source : 53388e48c491843a3fd93a3c46fdcd9c9bd3cc41
The renaming here is like this:
SetStringBuffer -> SetKnownLiveStringBuffer
SetEphemeralStringBuffer -> SetStringBuffer
SetOwnedString -> SetKnownLiveString
SetOwnedAtom -> SetKnownLiveAtom
This should make it clearer what the lifetime expectations are on the caller side.
MozReview-Commit-ID: ERHbB3r6paN
This also removes some confusing comments around nsIDocument regarding some kind
of "special" stylesheets, which don't seem to exist anymore, and consolidates
StyleSheetList so that we only have one implementation.
I think that fixes a potential leak on the shadow root code (even though the API
is v0 only), given the pointer from the ShadowRootStyleSheetList to the
ShadowRoot wasn't being CCd.
Also, more stuff could be renamed, methods removed, etc, feel free to suggest
more cleanup, I've done mostly the minimal.
Next steps are moving the stylesets there and stop using the proto binding sheet
list / resources.
MozReview-Commit-ID: D9hnDgPQAS5
This also removes some confusing comments around nsIDocument regarding some kind
of "special" stylesheets, which don't seem to exist anymore, and consolidates
StyleSheetList so that we only have one implementation.
I think that fixes a potential leak on the shadow root code (even though the API
is v0 only), given the pointer from the ShadowRootStyleSheetList to the
ShadowRoot wasn't being CCd.
Also, more stuff could be renamed, methods removed, etc, feel free to suggest
more cleanup, I've done mostly the minimal.
Next steps are moving the stylesets there and stop using the proto binding sheet
list / resources.
MozReview-Commit-ID: D9hnDgPQAS5
--HG--
extra : rebase_source : 0597917521894288c6b749e5d3ac6ac3b7db44a0
This feature is intended to help Firefox frontend developers experiment with
replacing XUL content with modern flexbox. We might also eventually use
this emulation to *actually* render most or all of our legacy XUL UI.
MozReview-Commit-ID: 3g2W9o3t23H
--HG--
extra : rebase_source : a3e8b443d9b58e5af3287a23de6edc276ed5e847
This breaks rendering when we try do a sync decode paint since we might not have created the nsDisplayImage/nsDisplayBackgroundImage yet (or cached the empty size) and so we never get to the actual paint call.
See bug 1422633, there are assertions missing, and servo doesn't assert at all
anymore.
I don't think it's worth optimizing / lazily resolving it, each time the
document state changes.
We usually just restyle the world anyway (which requires recomputing it), and
the changes that it's optimizing (nsWindow::SetActive() and XUL root element
localedir attribute changes) aren't common enough to warrant the complexity I'd
say.
This doesn't handle invalidating the cache in the case the root element goes
away, I haven't bothered because it was already broken, and GetRootElement() is
already gone in RemoveSubtreeFromDocument.
MozReview-Commit-ID: 9RuQhmmy7Kr
Remove the headers included for "backwards compatibility" and just include them
where required.
--HG--
extra : source : e2beba7e6875120ebbbcadf24bcbcb5b86411a94
extra : amend_source : 11f07a27431cd468511f0bd45afe36150c6e342c
Remove the headers included for "backwards compatibility" and just include them
where required.
--HG--
extra : rebase_source : 03e703a81ed4b80f4f116ff36d8787464ce5acba
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.
--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
It's not actually implemented. Since we never return any Counter
object, and to avoid exposing a Counter Web IDL interface object, we
declare getCounterValue() to return void (since it always throws).
MozReview-Commit-ID: JGvYtPmyeSp
* New USER_CHROME_CSS_LOADED histogram
* Just log a boolean to reflect if the userChrome.css was successfully loaded at profile initialization, in the parent process.
MozReview-Commit-ID: 8ffSNUot43I
--HG--
extra : rebase_source : 11f43e832449952c83cdb104c61c9c33c1aaa123
It was exposed during stylo implementation but it should be behind
`layout.css.grid-template-subgrid-value.enabled` pref.
MozReview-Commit-ID: DqrU6zYgdES
--HG--
extra : rebase_source : 14859f5912faff9cf2daf9b10409114e853bab6d
We have ServoCSSParser class, and I think it's better to move those
Servo FFI into this class to avoid including ServoBindings.h everywhere.
MozReview-Commit-ID: 6orXtddp9ZU
--HG--
extra : rebase_source : 6da4158c4fec606aaee49fddee3192f94d6c85a3
We should consider slot as a parent in ChildIterator: if slot's
`assignedNodes` is not empty, use `assignedNodes`, otherwise, use direct
children as fallback content.
Also, GetFlattenedTreeParentNodeInternal should be changed to use
`assignedSlot` instead of `DestInsertionPoints`.
This code is used to detect too-early accesses of prefs in content processes.
The patch makes the following changes.
- New terminology: "early" prefs are those sent via the command line; "late"
prefs are those sent via IPC. Previously the former were "init" prefs and the
latter didn't have a clear name.
- The phase tracking and checking is now almost completely encapsulated within
Preferences.cpp. The only exposure to outside code is via the
AreAllPrefsSetInContentProcess() method, which has a single use.
- The number of states tracked drops from 5 to 3. There's no need to track the
beginning of the pref-setting operations, because we only need to know if
they've finished. (This also avoids the weirdness where we could transition
from END_INIT_PREFS back to BEGIN_INIT_PREFS because of the way -intPrefs,
-boolPrefs and -stringPrefs were parsed separately.)
MozReview-Commit-ID: IVJWiDxdsDV
--HG--
extra : rebase_source : 8cee1dcbd40847bf052ca9e2b759dd550350e5a1
devtools/shared/css/generated/properties-db.js is generated by running
"./mach devtools-css-db"
MozReview-Commit-ID: 1U4yoQTDwxi
--HG--
extra : rebase_source : 16049b4253ae9a3f6e24cc30896ed53f65ebaf7a
On a CLOSED TREE, since the servo patch got in.
This removes one px of "padding" in:
<progress style="-moz-appearance: none"></progress>
But it'd be worse to not be able as an author to override those somehow.
MozReview-Commit-ID: EFZIBHaUskM
This also makes the rule map not process all the stylesheets for the document,
which would be a mess with shadow DOM.
Far from the final, ideal state, but hey, progress.
MozReview-Commit-ID: 7TrifME9VZ
In the current implementation, we call SetStylistStyleSheetsDirty() every time
a style sheet is changed. However, the dirty bit setting may or may not always
update the style data. For example, the style data for undisplayed elements are
deliberately not updated in Stylo. However, the getComputedStyle API is supposed
to provide a way to get the up-to-date computed style data, even for undisplayed
elements.
In this patch, we increment RestyleGeneration for undisplayed elements when we
call SetStylistStyleSheetsDirty(). This could flush the cached data that
getComputedStyle API holds, and ensures the getComputedStyle API computes a new
one.
MozReview-Commit-ID: JDDhACOG3z4
--HG--
extra : rebase_source : 39f56227201d435ad416fe21f4b0e0cad7d2d16c
This is a pre-patch for the real fix of Bug 1418433.
In the real fix, we'll add a IncrementUndisplayedRestyleGeneration() call into
SetStylistStyleSheetsDirty(). However, the IncrementUndisplayedRestyleGeneration()
call needs get through some deep structures in nsPresContext, RestyleManager,...
etc., and doing so means we need to move bunches of related include files, forward
declarations, from .cpp file to .h file, which doesn't make sense.
Instead, we move the implementation parts of SetStylistStyleSheetsDirty() to .cpp
file (since it is now a bit more complicated than it was), so we can use the existing
include files in the .cpp file to add IncrementUndisplayedRestyleGeneration() call
(this is in a following patch).
MozReview-Commit-ID: 3Vp9qyCf8NA
--HG--
extra : rebase_source : 16386256e16a2ca98bf988d66d861cbea58490a3
In certain situations, we might access a non-displayed (i.e., display: none;)
element's style data through getComputedStyle API. In this patch, we add some
tests to ensure that, if the inline style sheet is added/changed/removed, the
style data of a non-displayed element is always up-to-date. Some more tests
are added to verify the correctness of the style data when a style rule is
added/changed/removed via CSSOM.
MozReview-Commit-ID: Ggjd4FMqZlo
--HG--
extra : rebase_source : bac0e5a6e2c032922b57b08392f3381b68eeafa8
Run those fragment URL tests in test_transitions_per_property.html for
clip-path only because shape-outside will resolve URL fragments (i.e. #a),
so the computed value of URL fragment will have document URL as a prefix,
which won't match. Also, added absolute URL tests for both clip-path and
shape-outside.
MozReview-Commit-ID: 8SUpfTaV9cz
--HG--
extra : rebase_source : 3aa398045fd600544c152681eb545d908caa0fa9
Some Gecko style system files are modified to prevent assertions and
crashing, and to keep test failures on stylo disabled builds to minimum.
MozReview-Commit-ID: GuxAeCTz0xx
--HG--
extra : rebase_source : 2342085d13a50535836be46d75a731641d0fc49e
No caller check the return value, and SetURL ever returns true.
MozReview-Commit-ID: 5XPFq41Ktlq
--HG--
extra : rebase_source : de12cbaf09c1d86fdfbcd0f4c79f61d0dac9c7e7
With the conformant Promise handling (bug 1193394), there happen to receive
unexpected MozAfterPaint while waiting for MozAfterPaint for OMT animation.
The safest way to avoid this confusion is to start test refresh mode and
flush all pending styles (layout and paint) there so that the unexpected
MozAfterPaint is absorbed there.
MozReview-Commit-ID: 2xdKe4InYcP
--HG--
extra : rebase_source : dd6ba1dff7c449e40bb3286b5d9083eefc196de5
We convert a _simplified_ specified transform list into a gfx matrix
by Servo backend. The _simplified_ means DOMMatrix only accepts a
transform list without any relative lengths, percentage, or other
keywords; otherwise, we throw a SyntaxError DOMException.
MozReview-Commit-ID: K8d30W0i60b
--HG--
extra : rebase_source : d0975eb53753405046c68c8bf89906ae93f2a675
We have to clean nsCSSParserImpl::mTempData up if the current parsing is failed
because this nsCSSParserImpl object may be reused by other nsCSSParers, and the
incorrect status may cause assertions.
MozReview-Commit-ID: 75h0rHzV1Ua
--HG--
extra : rebase_source : 822038babf13231ade3d23f676491da7cc7c04f4
We need to get rid of BindingHolder to handle properly the case of an invalid
binding URL.
MozReview-Commit-ID: 3sIGtcVOt0r
--HG--
extra : rebase_source : a56cebc74ff5f3102ee8ef6d048ad05056fbef41
waitForPaintsFlushed() flushes styles inside it, so we don't need the explicit
flush.
MozReview-Commit-ID: KcQYRDWyhU0
--HG--
extra : rebase_source : 9adeaa107f358d9beb717a6d1fa96bbfd4c05416
The waitForPaints() which is defined in function runOMTATest() invokes
waitForAllPaintsFlushed(), it is the same what waitForPaintsFlushed() does.
MozReview-Commit-ID: BKt2fZO3DuM
--HG--
extra : rebase_source : b0cd89ca4000cd7bfae2c169d44984e15e78f9e5
In the current implementation, we call SetStylistStyleSheetsDirty() every time
a style sheet is changed. However, the dirty bit setting may or may not always
update the style data. For example, the style data for undisplayed elements are
deliberately not updated in Stylo. However, the getComputedStyle API is supposed
to provide a way to get the up-to-date computed style data, even for undisplayed
elements.
In this patch, we increment RestyleGeneration for undisplayed elements when we
decide to update style data (i.e., calling ServoStyleSet::UpdateStylist()) due
to (XBL)StyleSheet is dirty. This could flush the cached data that getComputedStyle
API holds, and ensures the getComputedStyle API computes a new one.
MozReview-Commit-ID: JDDhACOG3z4
--HG--
extra : rebase_source : 51d37757b5449d315aa7c2e0aedb4a4622e2a859
In certain situations, we might access a non-displayed (i.e., display: none;)
element's style data through getComputedStyle API. In this patch, we add a test
to ensure that, if the inline style sheet is changed/modified, the style data
of a non-displayed element is always up-to-date.
MozReview-Commit-ID: Ggjd4FMqZlo
--HG--
extra : rebase_source : 8e9ba5d6b7b4c26b5247b36d44ff02a391dc7ee6
Run those fragment URL tests in test_transitions_per_property.html for
clip-path only because shape-outside will resolve URL fragments (i.e. #a),
so the computed value of URL fragment will have document URL as a prefix,
which won't match. Also, added absolute URL tests for both clip-path and
shape-outside.
MozReview-Commit-ID: 8SUpfTaV9cz
--HG--
extra : rebase_source : e5c180a2ef293d70fa33133012023e9360eef98e
Some Gecko style system files are modified to prevent assertions and
crashing, and to keep test failures on stylo disabled builds to minimum.
MozReview-Commit-ID: GuxAeCTz0xx
--HG--
extra : rebase_source : 97c8b3900e4492ac03158a38aa03f7c044b71e0f
No caller check the return value, and SetURL ever returns true.
MozReview-Commit-ID: 5XPFq41Ktlq
--HG--
extra : rebase_source : 7522e024ed38da5e1524eb3128bbf5a70e46177f
A repaint is sufficient to pick up the new property value.
MozReview-Commit-ID: oKFgGfquyl
--HG--
extra : rebase_source : 4f145fb29eddcc5f83506cc6f512b123c29676ef
This reflects the change made to the Web Animations specification in:
9e2053f5531c3415f4cc
(I got it wrong the first time. The second commit fixes the first.)
And discussed in:
https://github.com/w3c/web-animations/issues/196
In summary, we are splitting the "pending" play state out into a separate
boolean member so that it is possible to distinguish between "play-pending" and
"pause-pending" and because most of the time when you check for
animation.playState === 'running' you also really want to include play-pending
animations.
MozReview-Commit-ID: IJSNoZTKW2I
--HG--
extra : rebase_source : 5d17239fd087cfe3cce1c9697eff97d062b6dd4b
The textarea is inserted under a Shadow host, with no matching insertion point,
so its flattened tree parent node is null.
We're treating this case in the restyle root code as "the parent is the
document", but that's very wrong.
MozReview-Commit-ID: JlzUMRIYaYZ
--HG--
extra : rebase_source : feeaf7a7333097aa87b35358172472790f6c74a7
This change captures the subject principal when a scripted caller sets the
textContent or innerHTML property of a <style> node, and uses it as the
triggering principal for the resulting stylesheet.
If the node contents are modified in any way other than through textContent or
innerHTML, the triggering principal is forgotten (which is an intentional
design feature).
MozReview-Commit-ID: GacZFIB5BzS
--HG--
extra : rebase_source : 04926f30b8e2831d18d3fb64b850f670f006eb85
This causes the subject principal that was responsible for setting a CSS
property, or the full cssText of an attribute, to be threaded through the call
chain to the point where CSS parsing happens, so that it can be used as the
triggering principal when loading URLs for that property.
Note that this allows for different properties defined in the same style
attribute to have different triggering principals, depending on the caller
which originally set them, as long as the cssText of that attribute is not
modified. Once it is, all properties revert to the principal of the caller
that modified the CSS text.
MozReview-Commit-ID: ISUyxbqAZMX
--HG--
extra : rebase_source : d4173d76d9afed74889269e3bf029abca54a4abb
This class was used back when we didn't have a base class for CSSStyleSheet
and ServoStyleSheet. Now it's unused.
MozReview-Commit-ID: 8xaMAA3Opf7
--HG--
extra : rebase_source : fe507762ba80ab54ca2a87e84faa8bc1a1a8590f
This is a prerequisite change for passing pseudo element to
Servo_StyleSet_GetBaseComputedValuesForElement which will be done in the next
commit.
MozReview-Commit-ID: HEGF2wjBGEP
--HG--
extra : rebase_source : 58d5991f3e4559c4215292ee8c48f79b38acb54a
This change should be also fine for the Gecko callers, but please double-check.
MozReview-Commit-ID: 5ZntHeBt5wC
--HG--
extra : rebase_source : d623693f690e933ccc67881795b3e4f5289e9fa4