We have about 11,500 of these when loading gmail in a Stylo-enabled build, from
SpecifiedUrls; the objects themselves account for about 1.3 MiB of memory, and the
strings within them about 2.9 MiB.
We also have a very small number of them on the Gecko side.
MozReview-Commit-ID: AduCIaDIzGG
--HG--
extra : rebase_source : ee2a20921a17b9091b60a5d9e389a6c6f2fa192b
This property accepts a color. It's inherited and defaults to transparent.
Its value is respected on macOS when rendering text into transparent pixels.
This property should be used for text that is placed on top of "vibrant"
-moz-appearances, in order to achieve high quality text rendering for such text.
In most cases, the property should be set to a named system color; an upcoming
patch in this patch series will add one such color for each vibrant
-moz-appearance value.
However, in some cases it can also be useful to use a custom color: If text
is rendered into an intermediate surface, for example because a mask is applied
to it, and the background color behind that intermediate surface is known, then
this property can be set to that background color in order to achieve subpixel
AA for the text inside the mask effect. In that case, the font smoothing
background color is respected because text is rendered into transparent pixels
*inside the intermediate surface*. At the moment, the only example of that use
case is the text of the active tab in the state where the text is overflowing.
MozReview-Commit-ID: D98qQnxoFaq
The old code doesn't work because mScriptHandlingObject is a nsWeakPtr,
which cannot be casted to nsPIDOMWindowInner directly.
Since scriptHandlingObject is a strong reference to the same object, we
can just try casting that.
MozReview-Commit-ID: JRBs5N6xxc0
--HG--
extra : rebase_source : cd0237553198182b00ff9c667a17271b23464567
A single transition value that includes 'none' for transition-property is
valid, so we should store whole specified values (if it's valid). Whereas,
the spec [1] clearly says for the case where there are multiple entries;
If there is more than one <single-transition> in the shorthand, and any of
the transitions has none as the <single-transition-property>, then the
declaration is invalid.
'none 2s linear 2s' is a test case for the former, '1s width, 2s none' is a
test case for the latter.
Note that with this patch, 'transition: none' is serialized as 'none 0s ease 0s'
instead of 'none' but it matches Gecko.
[1] https://drafts.csswg.org/css-transitions/#single-transition
MozReview-Commit-ID: 3o3z5GFyMqh
--HG--
extra : rebase_source : c553af804124c0c76554fb8ad007e78e2813d321
MozReview-Commit-ID: 5eTW5dCcxzP
This patch reverts the code changes, but not the test changes from changeset bf9cf6f393eb. There is a crashtest here which is valuable to keep.
--HG--
extra : rebase_source : e6f5d7234eca396a0302c1d562fc54663b274c6c
This removes the double-include macro hackery that we use to define two
separate string types (nsAString and nsACString) in favor of a templated
solution.
Annotations for Valgrind and the JS hazard analysis are updated as well as
the rust binding generations for string code.
--HG--
extra : rebase_source : 63ab2c4620cfcd4b764d42d654c82f30f984d016
extra : source : 9115364cd4aa078c49bba7911069f8178e55166f
These tests no longer assert so we can remove the stylo annotations.
MozReview-Commit-ID: 7sWWTkoFp1G
--HG--
extra : rebase_source : e42f418ef1756a08bc0f11b02b42b2a1737deb76
If there is no font feature values inside document we should avoid creating
unnecessary objects.
MozReview-Commit-ID: HJKMzQvQAPR
--HG--
extra : rebase_source : 06dc792d2c4848c4c8ca49b9eb98630d5d475006
Example output from the Obama Wikipedia page:
> ├──2,315,600 B (01.16%) -- stylist
> │ ├──1,916,928 B (00.96%) ── invalidation-map
> │ ├────228,800 B (00.11%) ── rule-tree
> │ ├────142,336 B (00.07%) ── element-and-pseudos-maps
> │ ├─────14,336 B (00.01%) ── revalidation-selectors
> │ ├──────9,648 B (00.00%) ── other
> │ └──────3,552 B (00.00%) ── precomputed-pseudos
This change requires new code to measure HashMaps, which uses the new
'malloc_enclosing_size_of' functions that can measure a heap block from an
interior pointer.
The patch changes MallocSizeOfFn to a newtype, and introduces
MallocEnclosingSizeOfFn alongside.
It also adds new traits: MallocSizeOfBox, MallocSizeOfVec, MallocSizeOfHash.
These each contain a single method that does shallow measurement of the
relevant type, which is often useful. (This is a different style to the
existing MallocSizeOf trait, which does deep measurement, but I'm moving away
from the always-deep-measurement style because it's less flexible.)
MozReview-Commit-ID: FgJCCmdw0ZF
--HG--
extra : rebase_source : c692c2073aa66020224489b97247c49de95a99a4
The Servo_KeyframesRule_GetKeyframe binding function has been empowerd and
renamed to Servo_KeyframesRule_GetKeyframeAt in the servo side patch. In this
patch, we use Servo_KeyframesRule_GetKeyframeAt to get line and column
information for ServoKeyframeRule, so that the inspector can present Keyframe
rules on the devtool panel properly.
MozReview-Commit-ID: BGd9FFsC3Nz
--HG--
extra : rebase_source : f2b5ff73a84a3cd4e5d0b17d5e0c5ac5fd57f817
In a number of places, there's no substantial use of maps any more
after the segue.
The ELEMENT segue tries the FragmentOrElement QI, but that is
redundant with the Element QI.
This lets me use a few higher-level macros.
MozReview-Commit-ID: Gstq3Cm8LDl
--HG--
extra : rebase_source : f0c7dbf5281ce7375b1369b49db095a211569d6c
This changes the CSS lexer to extract sourceMappingURL directives from
comments and preserve them; then changes the parser to expose this value
as the style sheet's sourceMapURL.
MozReview-Commit-ID: LfMamJ1PsU0
--HG--
extra : rebase_source : 258827720282d415f97f1d49d870b7c2448d39f4
When an animation is newly created while the same property transition is
running, the transition style rule persists until we call RequestRestyle() for
transitions level. That means if user calls getComputedStyle for the property
right after creating animation, the style obtained by getComputedStyle still
included the transitions level rule. As a result, the transitions level style
overrides newly created animation style until the next normal restyling process
happens (i.e. process transition level restyle request). Vice versa, in the
case where an animation is removed, transitions level style does not appear
until the next normal restyling.
This patch fixes this problem by trigerring a resyle of the transitions level
when an animation is created or removed.
MozReview-Commit-ID: HY6amLmDHTi
--HG--
extra : rebase_source : 67e58dc9a6c695299c3eef684bf7357153c5168b
The motivation of this patch is that clearing mPresContext should be an
implementation detail of XBL style set, so I create a method for that, and
remove ClearPresContext().
MozReview-Commit-ID: Ftta0rcAqu6
--HG--
extra : rebase_source : 0bdb1ac3e2c988e5a0220172f19ab4b006e883d7
This fixed layout/style/test/test_media_queries_dynamic.html after Part 3 is added.
MozReview-Commit-ID: 7ZpSunCnkIc
--HG--
extra : rebase_source : 6acab11ba784b801b90afc0558c32baabcc3f271
The method always returns NS_OK, and no other caller checks the nsresult.
Hence the patch.
MozReview-Commit-ID: CnYCZ8VchG
--HG--
extra : rebase_source : 8626332e2774c1d6f42c7afa5e9679091a3aeaa2
… in the C++ style system, to align with Stylo and the CSSOM spec.
MozReview-Commit-ID: HaDUeNjumnY
--HG--
extra : rebase_source : 3a4d2856bb6b3702d0bc7ec9b7a8e472758ab9f0
This allows us to avoid posting animation-related restyles when removing
elements from the document tree.
MozReview-Commit-ID: CzN4S0DTUMa
--HG--
extra : rebase_source : a5b94d9ad5b1b2243abd0a5b188eec2b334df74d
The method always returns NS_OK, and no other caller checks the nsresult.
Hence the patch.
MozReview-Commit-ID: CnYCZ8VchG
--HG--
extra : rebase_source : 062d643308b309dfe442384301860ffeec2dff9f
Prefixed linear gradients use direction keyword to indicate starting point of the
gradient but modern syntax uses this keyword to indicate ending point of the gradient.
Top-to-bottom direction is the default value for gradients. Therefore `top` is default
value of prefixed linear gradients and `to bottom` is default one for unprefixed one.
For brevity, we omit the direction keyword from our serialization when it matches the
default direction, but we were incorrectly trying to remove `bottom` keyword from
prefixed computed values.
MozReview-Commit-ID: 8UCsFE44LRX
--HG--
extra : rebase_source : 6185aec4c3c1b0647015d00d31e0120c9448867e
We now have jemalloc_ptr_info() and moz_malloc_enclosing_size_of(), which can
be used to measure heap blocks via interior pointers. This patch does the
following.
- Adds MOZ_DEFINE_MALLOC_ENCLOSING_SIZE_OF, for defining
measure-via-interior-pointer functions.
- Uses these functions to replace some horrid pointer arithmetic in functions
measuring Rust types.
--HG--
extra : rebase_source : 5128408256c128222025153ae3e0f924b2499a2a
The change in CounterStyleManager::BuildCounterStyle converts a case-
insensitive comparison to a case-sensitive comparison by comparing atom
pointer directly. But this is fine because all names of builtin counter
styles should have been lowercased by the parser. For Gecko, it is done
in CSSParserImpl::ParseCounterStyleName, and for Servo, it is done in
counter_style::parse_counter_style_name.
MozReview-Commit-ID: JHHmzEaNIpn
--HG--
extra : rebase_source : aa43d45042c3cbd85e925596586a9a2ea51c6e4a
Doing this at compile time would save a bit of our startup time, which
I've promised to do since @counter-style was initially implemented, see
bug 966166 comment 103 (the paragraph with "constexpr").
Also, having this implemented here makes using atom instead of string
on name of builtin counter styles easier, for later patches.
MozReview-Commit-ID: C9HYcuShBQv
--HG--
extra : rebase_source : 273eb3d23ee770722d27b26aafaa291d7375b8ee
nsDocument::GetAnimationController() will lazily create an animation controller
which, in some call sites, is unnecessary.
This patch first calls HasAnimationController() and only calls
GetAnimationController() if it returns true. This avoids creating an animation
controller in situations where one is not necessarily required.
MozReview-Commit-ID: 4cdpLRvMVJU
--HG--
extra : rebase_source : 125a59c0b0535d5df9a9964538b3784ddb1212c7
This patch splits up the existing "layout/style-sets" measurement into
"layout/gecko-style-sets", or "layout/servo-style-sets/stylist/rule-tree" and
"layout/servo-style-sets/other". (Additional things will be measured under
"layout/servo-style-sets/" later, such as cascade data.)
This requires introducing a new type, ServoStyleSetSizes, for transferring the
multiple measurements from Rust code to C++ code.
MozReview-Commit-ID: FbmzpsjBpgI
--HG--
extra : rebase_source : f2d1441705139e6674d355792255302fcd89f748