At first I thought this was going to enable simplifications in the selector
parser (to simplify the attribute selector setup), but I couldn't end up
shrinking the layout enough.
However this should help with bug 1559076, which returns Option<Atom>, and it
was easy to write.
Differential Revision: https://phabricator.services.mozilla.com/D53766
--HG--
extra : moz-landing-system : lando
These were useful when implementing forwarding, and forgot to send them
earlier.
Differential Revision: https://phabricator.services.mozilla.com/D53767
--HG--
extra : moz-landing-system : lando
When we physicalize the declarations for @keyframes, we end up having a physical
declaration with an unparsed value with `from_shorthand` being the logical
shorthand.
Account for this case properly when substituting custom properties, to avoid
panicking.
Differential Revision: https://phabricator.services.mozilla.com/D53663
--HG--
extra : moz-landing-system : lando
We no longer have multiple kinds of anonymous subtrees, so we can get back one
node bit.
Differential Revision: https://phabricator.services.mozilla.com/D53344
--HG--
extra : moz-landing-system : lando
The micro-benchmark `style-attr-1.html` regressed slightly with my patch, after
the CascadeLevel size increase.
This benchmark is meant to test for the "changing the style attribute doesn't
cause selector-matching" optimization (which, mind you, keeps working).
But in the process it creates 10k rules which form a perfect path in the rule
tree and that we put into a SmallVec during the cascade, and the benchmark
spends most of the time pushing to that SmallVec and iterating the declarations
(as there's only one property to apply).
So we could argue that the regression is minor and is not what the benchark is
supposed to be testing, but given I did the digging... :)
My patch made CascadeLevel bigger, which means that we create a somewhat bigger
vector in this case. Thankfully it also removed the dependency in the
CascadeLevel, so we can stop using that and use just Origin which is one byte to
revert the perf regression.
Differential Revision: https://phabricator.services.mozilla.com/D53181
--HG--
extra : moz-landing-system : lando
For the individual transform properties if they spec a value that can be
expressed as 2d we treat as 2d and serialize accordingly.
We drop Translate::Translate and Scale::Scale, and then rename
Translate::Translate3D as Translate::Translate, Scale::Scale3D as
Scale::Scale. So now we use Translate::Translate to represent 2d and 3d
translation, and Scale::Scale to represent 2d and 3d scale. There is no
difference between 2d and 3d translate/scale in Gecko because we always
convert them into 3d format to layers (on the compositor thread), so this
change makes things simpler.
Differential Revision: https://phabricator.services.mozilla.com/D52931
--HG--
extra : moz-landing-system : lando
This was a follow-up from the backplate stuff which I requested but didn't
happen.
Differential Revision: https://phabricator.services.mozilla.com/D53170
--HG--
extra : moz-landing-system : lando
This moves the shadow cascade order into the cascade level, and refactors the
code a bit for that.
Differential Revision: https://phabricator.services.mozilla.com/D49988
--HG--
extra : moz-landing-system : lando
Move all the entires of SpecialColorKeyword into SystemColor
and rearrange their computation to match.
Add the new SystemColor entries into the property list of nsXPLookAndFeel.
Differential Revision: https://phabricator.services.mozilla.com/D50903
--HG--
extra : moz-landing-system : lando
Now
* nsPresContext::mVisibleArea is excluding the toolbar max height so that
ICB is now static regardless of the dynamic toolbar transition
* nsPresContext::mSizeForViewportUnits is introduced to resolve viewport units
which is including the toolbar max height
That means that with the dynamic toolbar max height;
mVisibleArea < mSizeForViewportUnits
See https://github.com/bokand/URLBarSizing for more detail backgrounds of this
change.
Depends on D50417
Differential Revision: https://phabricator.services.mozilla.com/D50418
--HG--
extra : moz-landing-system : lando
The existing code wasn't sound, as CSSOM objects also needed to go away before
the shared memory goes away (as they keep references to them).
This is sound assuming no presence of reference cycles introduced by CSSOM.
We may want to live with this and rely on chrome code not writing cycles like
this with UA stylesheet DOM objects.
We could explicitly drop all potentially-static objects... That seems pretty
error prone though.
Or we could also just leak the shared memory buffer, is there any reason why we
may not want to do that?
Differential Revision: https://phabricator.services.mozilla.com/D51870
--HG--
extra : moz-landing-system : lando
The existing code wasn't sound, as CSSOM objects also needed to go away before
the shared memory goes away (as they keep references to them).
This is sound assuming no presence of reference cycles introduced by CSSOM.
We may want to live with this and rely on chrome code not writing cycles like
this with UA stylesheet DOM objects.
We could explicitly drop all potentially-static objects... That seems pretty
error prone though.
Or we could also just leak the shared memory buffer, is there any reason why we
may not want to do that?
Differential Revision: https://phabricator.services.mozilla.com/D51870
--HG--
extra : moz-landing-system : lando
This matches the WebKit implementation, and is clearly a violation of the rules
we generally use for ranges in CSS.
But it seems to be depended-on legacy behavior, see the linked WebKit bug, this
bug, and bug 1593317.
Differential Revision: https://phabricator.services.mozilla.com/D51539
--HG--
extra : moz-landing-system : lando
And do a full restyle only when the state goes from visited to unvisited or vice
versa. That is, use regular invalidation for addition or removals of href
attributes, for example.
Differential Revision: https://phabricator.services.mozilla.com/D50821
--HG--
extra : moz-landing-system : lando
The LRUCache implementation has been replaced, and no longer requires a backing store larger than its capacity.
Differential Revision: https://phabricator.services.mozilla.com/D51589
--HG--
extra : moz-landing-system : lando
This needs a lot more hooks before it'll actually be a good
implementation, but for a start it can help get some feedback on if this
is the right way to go about it.
Part of servo/servo#4577
Servo commit: b8f3e8bb2e9
Differential Revision: https://phabricator.services.mozilla.com/D51588
--HG--
extra : moz-landing-system : lando
Split off of Bug 1590894
Rename these to support unprefixed version
Also add alias to keep compatibility
Differential Revision: https://phabricator.services.mozilla.com/D50989
--HG--
extra : moz-landing-system : lando
This also includes the implementation of SetAnimatable, FromAnimatable,
and merge the final matrix with motion path.
Besides, we always use PathBuilderSkia for calculating the gfx::Path for
web-renderer.
Differential Revision: https://phabricator.services.mozilla.com/D50011
--HG--
extra : moz-landing-system : lando
We need to pass these two types into the compositor, so we need a better
way to serialize these rust types. We use serde and bincode to
serialize/deserialize them, and use ByteBuf to pass the &[u8] data
through IPC. We define StyleVecU8 for FFI usage only.
Differential Revision: https://phabricator.services.mozilla.com/D50688
--HG--
extra : moz-landing-system : lando
Split off of Bug 1590894
Rename these to support unprefixed version
Also add alias to keep compatibility
Differential Revision: https://phabricator.services.mozilla.com/D50989
--HG--
extra : moz-landing-system : lando
This is a gross hack, of course, but has the advantage of not breaking sites
that use both zoom and -moz-transform / -moz-transform-origin.
There should be no behavior change when the pref is off, of course, and the
webcompat team wanted to experiment with this.
Differential Revision: https://phabricator.services.mozilla.com/D49792
--HG--
extra : moz-landing-system : lando
Servo doesn't use this flag or -webkit- prefixed media queries, so no point in
doing this conditionally.
Differential Revision: https://phabricator.services.mozilla.com/D49508
--HG--
extra : moz-landing-system : lando
There's no effort to disable it any time soon, so I don't think it's useful to
keep the pref around.
Differential Revision: https://phabricator.services.mozilla.com/D49507
--HG--
extra : moz-landing-system : lando
This is effectively superseded by the hover / any-hover media queries, which
actually are standard, and is also causing trouble in the wild.
Not even the browser fronted uses it, so we should be able to just remove it
everywhere at once.
Differential Revision: https://phabricator.services.mozilla.com/D49506
--HG--
extra : moz-landing-system : lando
When playing around with Cargo’s new timing visualization:
https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975/21
… I was surprised to see the `script` crate’s build script take 76 seconds.
I did not expect WebIDL bindings generation to be *that* computationally
intensive.
It turns out almost all of this time is overhead. The build script uses CMake
to generate bindings for each WebIDL file in parallel, but that causes a lot
of work to be repeated 366 times:
* Starting up a Python VM
* Importing (parts of) the Python standard library
* Importing ~16k lines of our Python code
* Recompiling the latter to bytecode, since we used `python -B` to disable
writing `.pyc` file
* Deserializing with `cPickle` and recreating in memory the results
of parsing all WebIDL files
----
This commit remove the use of CMake and cPickle for the `script` crate.
Instead, all WebIDL bindings generation is done sequentially
in a single Python process. This takes 2 to 3 seconds.
Adds a feature "moz_xbl" that when disabled causes the XBL code in servo to
be stubbed out.
Depends on D45613
Differential Revision: https://phabricator.services.mozilla.com/D45614
--HG--
extra : moz-landing-system : lando
This fixes another edge-case that I thought of while debugging this, I think
this makes our behavior correct now. The comment and test-case should be
self-descriptive.
Differential Revision: https://phabricator.services.mozilla.com/D48135
--HG--
extra : moz-landing-system : lando
This is a pre-existing bug, and this would be enough to fix the website, but
this is still not 100% correct. More on that in a second.
Differential Revision: https://phabricator.services.mozilla.com/D48134
--HG--
extra : moz-landing-system : lando
Mostly renaming for clarity, as the gradient parsing code is a bit hairy.
This also changes -webkit- gradients, which is, I think, the right thing to do
(otherwise I need to give up on the type system and sprinkle parse_non_negatives
around, which would be unfortunate).
I filed https://bugs.chromium.org/p/chromium/issues/detail?id=1008112 on
Chromium still accepting negative radii for those, so will wait to submit the
patch for review until they reply there with their intentions.
Differential Revision: https://phabricator.services.mozilla.com/D47141
--HG--
extra : moz-landing-system : lando
We always check StyleWillChangeBits_TRANSFORM bit together with a
transform-like property set, so using WillChangeBits::TRANSFORM bit to
represent all transform-like properties is ok.
However, it seems the new test case works well even if we don't have this
patch. I still add it for individual transform properties to make sure
the test coverage is enough anyway.
Differential Revision: https://phabricator.services.mozilla.com/D47509
--HG--
extra : moz-landing-system : lando
Transition to syn 1.0 is ongoing, but these take a long time to build.
Hopefully we already patch coreaudio-sys manually so all the crates dependent on
bindgen are effectively in-tree.
I published v0.51.1-oldsyn to avoid pulling all these dependencies for now.
Differential Revision: https://phabricator.services.mozilla.com/D46966
--HG--
rename : third_party/rust/quote-0.6.11/tests/conditional/integer128.rs => third_party/rust/quote/tests/conditional/integer128.rs
rename : third_party/rust/unicode-xid-0.1.0/scripts/unicode.py => third_party/rust/unicode-xid/scripts/unicode.py
extra : moz-landing-system : lando
Also, update the serialization by the shorter perference because this is
a new feature and using older syntax doesn't make sense.
Besides, use `cssOffset` for web animation IDL attribute name.
Differential Revision: https://phabricator.services.mozilla.com/D45607
--HG--
extra : moz-landing-system : lando
If the sets get too big we cannot allocate anything else, we'll just empty them
and invalidate the whole document.
Differential Revision: https://phabricator.services.mozilla.com/D46828
--HG--
extra : moz-landing-system : lando
* Let layout.css.use-counters.enabled be independent from the unimplemented
property counters.
* Always count in the style system (that is, always create
Document::mStyleUseCounters), so that the warning from bug 1582374 works
irrespective of these prefs.
* Add a pref check to the SVGElement code path so that the prefs properly
reflect whether the histograms end up being recorded or not.
* Make the pref checks consistent (check both when reporting telemetry, not
earlier).
Differential Revision: https://phabricator.services.mozilla.com/D46633
--HG--
extra : moz-landing-system : lando
This is in the interests of allowing the frontend team to experiment with
switching from XUL grid to CSS grid, without inadvertently changing the
display values for the grid items via css-grid-item blockification.
This patch's new pref is not expected to remain in the codebase for long.
We're just adding it so that the behavior remains the same by default, because
we do currently have some XUL code that inadvertently depends on -moz-box
display values being blockified to 'block'. The plan is for folks to remove
that dependency e.g. by adding explicit 'display:block' styling to frontend
code as-needed. After we've done that, we can tentatively flip the pref to true
by default, and then remove the pref entirely.
Differential Revision: https://phabricator.services.mozilla.com/D45258
--HG--
extra : moz-landing-system : lando
Currently, there's no way to tell whether the SIDEWAYS bit is set from
`writing-mode:sideways-*` or `writing-mode:vertical-*; text-orientation:sideways;`.
To be able to tell them apart, split SIDEWAYS bits into VERTICAL_SIDEWAYS
and TEXT_SIDEWAYS. This is needed by my proposed solution in bug 1102175.
Also, provide convenience methods related to sideways writing-mode, and replace
obscure checks in the codebase.
Note that we don't have the use cases to distinguish vertical-rl from
sideways-rl in layout, but for the completeness, IsSidewaysLR() is still
defined.
Differential Revision: https://phabricator.services.mozilla.com/D46321
--HG--
extra : moz-landing-system : lando
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D44698
--HG--
extra : moz-landing-system : lando
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D44698
--HG--
extra : moz-landing-system : lando
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.
Differential Revision: https://phabricator.services.mozilla.com/D44698
--HG--
extra : moz-landing-system : lando