`self` keyword specifies to use the element’s own principal box as the
scroll container. If the principal box is not a scroll container, then the
scroll progress timeline is inactive.
Differential Revision: https://phabricator.services.mozilla.com/D175707
The order of <scroller> and <axis> doesn't matter in the parser.
However, we serialize <scroller> first, if it is not the initial value.
Differential Revision: https://phabricator.services.mozilla.com/D173906
And use it instead of explicit document checks. This centralizes where
we check for it.
IsChromeDoc is relatively cheap, but this bug wants to also check for
PDF.js which is a bit more expensive.
No behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D176940
Sum nodes would use mul_by to negate nodes to do subtraction, but some
nodes are not distributive. This patch adds a negate node, so that the
operations inside these negate nodes can be resolved first and then the
"subtraction" can be applied.
Differential Revision: https://phabricator.services.mozilla.com/D172941
Support view() notation for animation-timeline:
`<view()> = view( [ <axis> || <'view-timeline-inset'> ]? )`
We move AnimationTimeline and its related types into the generics folder,
and define two new structs for scroll() and view().
Note:
1. The syntax of scroll() doesn't match the current version of the spec.
I will update it in Bug 1814444.
2. We will handle the creation/usage of the Anonymous View Progress Timelines
in the next patch.
Differential Revision: https://phabricator.services.mozilla.com/D173904
Although we store animation and transition style values in StyleUIReset and
define their properties in longhands/ui.mako.rs, but we may move them in
the future if this style struct becomes too large. So let's move the
definition of their values to an independent module, animation, so we
don't have to worry about this again.
This patch doesn't change any other things. Only move code.
Differential Revision: https://phabricator.services.mozilla.com/D173903
NaN and infinity percentages are now serialized as expected.
Also added some new WPT tests as percentages were previously untested
and added some spec comments to previous NaN/inf serialization code.
Differential Revision: https://phabricator.services.mozilla.com/D176726
No implementation just yet (the default QualifiedRuleParser
implementation just rejects stuff), but this is plumbing that I'd rather
get reviewed separately.
Differential Revision: https://phabricator.services.mozilla.com/D176686
More nesting plumbing. Still does nothing because we don't parse the
nested rules.
Should be trivial to prove this patch doesn't change any behavior so
far, but I want to land it on its own because it can have performance
implications.
This follows the pattern of what we do with other rules like layers and
container conditions, that is, keep the ancestor selectors in a stack,
and poke at the last one in order to replace the ancestor.
This changes the behavior of replace_parent_selector as with the newer
version of the spec, stuff like:
div {
.foo {
stuff
}
}
Should work as `div .foo`. A test is added for this case.
Differential Revision: https://phabricator.services.mozilla.com/D176560
Allow to have a CssRules list inside a StyleRule.
This only introduces the storage and serialization code for them, but we
still don't parse it.
Differential Revision: https://phabricator.services.mozilla.com/D176550
Added evaluating supports() conditions in the import preload scanner
and not emitting URLs if they do not match.
There is no use preloading imports for features we do not support,
as they will never be loaded since supports() conditions cannot change mid-page.
Also tweaked internals a bit (added a generic ResetState internal func) and
added a new gtest for import supports(), plus a WPT test print test.
Differential Revision: https://phabricator.services.mozilla.com/D175432
Fixed @import supports() being parsed in the incorrect position as per spec.
Also added more WPT tests for layer and supports in one @import.
Differential Revision: https://phabricator.services.mozilla.com/D176193
Fixed @import supports() being parsed in the incorrect position as per spec.
Also added more WPT tests for layer and supports in one @import.
Differential Revision: https://phabricator.services.mozilla.com/D176193
Servo_ComputedValues_GetForAnonymousBox currently takes an extra argument for
page-name values which is only used for page content.
As more CSS page3 support is added, the methods of specifying page content
will need to grow (notably for pseudo classes), and the implementation
currently has a mostly separate code path for page-content.
We can separate these out to simplify both the caller and the implementation.
Differential Revision: https://phabricator.services.mozilla.com/D175708
This makes our menus closer to GTK4, and depends less on the native menu
rendering etc. Thunderbird already does this to some extent.
Leave the old code behind a pref for now (just in case). Also fix some
code in nsNativeTheme::GetContentState (fixes rendering of radio menu
items).
Differential Revision: https://phabricator.services.mozilla.com/D175664
This makes our menus closer to GTK4, and depends less on the native menu
rendering etc. Thunderbird already does this to some extent.
Leave the old code behind a pref for now (just in case). Also fix some
code in nsNativeTheme::GetContentState (fixes rendering of radio menu
items).
Differential Revision: https://phabricator.services.mozilla.com/D175664
The test-case in the next patch from 10s to a couple hundred
milliseconds on my machine. No behavior change other than that.
Differential Revision: https://phabricator.services.mozilla.com/D175612
This allows to clean-up the previous patches by using a single ThinVec
(which stores length / capacity along with the allocation).
Differential Revision: https://phabricator.services.mozilla.com/D175029
This allows to clean-up the previous patches by using a single ThinVec
(which stores length / capacity along with the allocation).
Differential Revision: https://phabricator.services.mozilla.com/D175029
Implemented the inverted-colors media feature from Media Queries Level 5
for all platforms.
Spec: https://drafts.csswg.org/mediaqueries-5/#inverted
Platform specific implementations:
- Windows: Checks system color filter setting, and if it is inverted
(note: Windows does not live update due to having to read a reg key)
- Mac: Checks dedicated inverted accessibility system setting
- Android: Checks dedicated inverted system setting
- Linux: No GTK API exposes anything like it so always none
Locked behind new pref `layout.css.inverted-colors.enabled`,
always off by default for now.
Also added new WPT tests (none previously).
Other browsers:
- WebKit: shipped since Safari 9.1 (Jan 2017)
- Blink: no signal
Test page: https://goose.icu/inverted-colors
Differential Revision: https://phabricator.services.mozilla.com/D173201
Make all UA widgets also NAC.
Keep the UA widget flag but break at anonymous subtree boundaries, so
that only nodes inside the UA widget directly (and not NAC from those)
get the flag.
This is important because two callers depend on this difference:
* The style system, since we still want to match content rules from
stylesheets in the UA widget. We also match user rules, which is a
bit sketchy, but that was the previous behavior, will file a
follow-up for that.
* The reflector code, since we want the scope for UA widgets to not
include the NAC nodes inside that UA widget. nsINode::IsInUAWidget
got it wrong.
After this patch, ChromeOnlyAccess is equivalent to
IsInNativeAnonymousSubtree, so we should probably unify the naming.
That's left for a follow-up patch because I don't have a strong
preference.
Differential Revision: https://phabricator.services.mozilla.com/D174310