roytam1
864fc133a3
add pref for en/disabling CSS Animations and Transitions.
2023-08-18 09:57:41 +08:00
FranklinDM
3d917c9965
Issue #2250 - Part 2: Ignore the ancestor filter assertion if rule matching is restricted or if the current element is under a shadow host
...
This only affects debug builds.
2023-05-24 09:02:22 +08:00
FranklinDM
1c2dd6aee0
Issue #2250 - Part 1: Return early if the element being tested for is likely an ancestor and does not have an assigned slot
2023-05-24 09:02:07 +08:00
FranklinDM
6ae0a69ac7
Issue #1765 - Part 3: Provided token type should be used in LookForTokenType
...
I didn't realize this immediately after moving the code into a method. Oops.
2023-05-15 09:14:24 +08:00
FranklinDM
d678cc2c45
Issue #1765 - Part 2: Implement calc() parsing inside rgb/a() and the non-hue component of hsl/a()
...
This also adds a new helper method for checking the type of tokens that will be parsed after the current token, which is useful for determining the unit of values inside calc() functions.
Partially based on 8a0897d23f
2023-05-15 09:14:07 +08:00
FranklinDM
73a6dc3122
Issue #1765 - Part 1: Move ReduceNumberCalcOps struct up higher, rename IsCSSTokenCalcFunction to CSSParserImpl::IsCalcFunctionToken
2023-05-15 09:13:47 +08:00
Moonchild
2f117eecaa
Issue #1656 - Remove more vim control lines.
...
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from embedding, extensions, gfx, hal, ipc, layout, mailnews,
media and memory. More to come.
2023-05-05 22:57:19 +08:00
FranklinDM
f169940742
Issue #2135 - Don't discard event state mask when matching ::slotted() or :host arguments
...
This should fix issues with selectors like :host(:hover) that continue to be matched although the cursor is no longer hovering over those elements.
2023-03-24 23:32:36 +08:00
FranklinDM
4cd0de04d0
Issue #1592 - Part 8: Test the assigned slot for type/class/ID/attribute instead of the slottable when matching ::slotted()
2023-03-24 09:12:35 +08:00
FranklinDM
19226fd560
Issue #1592 - Part 7: Slottables cannot be matched from the outer tree.
2023-03-24 09:12:15 +08:00
FranklinDM
91d2b6f4cf
Issue #1592 - Part 6: Allow pseudo-classes with a forgiving selector list argument to follow pseudo-elements
...
Pseudo-classes with a forgiving selector list argument are allowed to follow a pseudo-element, but must treat any selector that is not of the same type as invalid. It doesn't make any sense, but that's the behavior of other tainted browsers.
2023-03-24 09:12:00 +08:00
FranklinDM
8d2533ad70
Issue #1592 - Part 5: Use flattened element tree when looking for a parent while matching ::slotted()
2023-03-24 09:11:26 +08:00
FranklinDM
518c41fd7a
Issue #1592 - Part 4: Walk ::slotted()-containing rules for slottables
...
- Check against all selector parts and not the leftmost selector only for ::slotted()
- Walk rules for ::slotted() regardless if the shadow root is opened/closed
- Ensure that ::slotted() rules are walked in the right order
- Fix ::slotted inheritance from topmost shadow root
2023-03-24 09:11:07 +08:00
FranklinDM
92b31dd255
Issue #1592 - Part 3: Ensure only tree-abiding pseudo-elements will follow ::slotted()
2023-03-24 09:10:42 +08:00
FranklinDM
77ad970db6
Issue #1592 - Part 2: Parse ::slotted() pseudo-element as if it were a pseudo-class
...
- Block slot elements from being matched by ::slotted
- Ensure ::slotted() is serialized as a pseudo-element
- Add pref to control whether the pseudo-class is enabled
2023-03-24 09:07:36 +08:00
FranklinDM
ab63b7b946
Issue #1592 - Part 1c: Pass SelectorParsingFlags as a reference
2023-03-24 09:04:18 +08:00
FranklinDM
460e8db94c
Issue #1592 - Part 1b: Move <slot> UA rule to html.css
...
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1468127
2023-03-24 09:03:58 +08:00
FranklinDM
7374ca6716
Issue #1593 - Follow-up: Fix :host matching from inside the shadow tree
...
Previously, we'd match :host despite the element having a different shadow root from the one that we currently have. Also, there's a test where :host should be blocked from matching if it is a descendant of an explicit universal selector.
2023-03-23 09:02:47 +08:00
FranklinDM
2be0261d54
Issue #2078 - Follow-up: Ensure empty selector lists aren't iterated when serialized
...
Really odd that this wasn't caught/doesn't cause any issues on MSVC/unoptimized GCC. Must've been luck, I guess.
2023-03-12 07:10:40 +08:00
FranklinDM
ef36c56593
Issue #2137 - Part 4: Fix namespace regression
2023-03-12 07:09:56 +08:00
FranklinDM
b257a71cce
Issue #2137 - Part 3: Don't always use the internal pseudo-class for handling negations
2023-03-12 07:09:41 +08:00
FranklinDM
3bb3c193d0
Issue #2137 - Part 2: Implement SelectorParsingFlags and use it to pass info around
2023-03-12 07:09:22 +08:00
FranklinDM
82fa9fb80b
Issue #2137 - Part 1: Modify :not() selector to accept a complex selector list
2023-03-12 07:09:00 +08:00
Moonchild
2249fbdf49
Issue #2135 - Follow-up: Check for aElement not being null
...
This was introduced to Make <link rel="stylesheet"> work in shadow trees.
eElement can, however, be `null` here and if so, it would crash.
2023-03-12 07:07:25 +08:00
Martok
2b903a20b3
Issue #2143 - Implement CSS env() Environment Variables
2023-03-07 11:17:39 +08:00
FranklinDM
21d468ee65
Issue #2136 - Part 1: Implement CSS inset property
2023-03-06 16:27:53 +08:00
FranklinDM
7924a2f60d
Issue #2135 - Bug 1329877: Optimize AncestorFilter usage in lazy frame construction
2023-03-06 16:20:24 +08:00
FranklinDM
588c2154a5
Issue #2135 - Bug 1410578: Make <link rel="stylesheet"> work in shadow trees
2023-03-06 16:17:01 +08:00
FranklinDM
45c179d01b
Issue #2135 - Bug 1453789: Remove Element.createShadowRoot
2023-03-06 16:16:40 +08:00
FranklinDM
edc45f6849
Issue #1593 - Follow-up: Fix :host selector matching
...
Previously, we would match `:host` if:
(a) we don't have any arguments and our parent is the shadow root, or;
(b) if any of the arguments match, then reject if we don't have a containing shadow
Revised, we would match `:host` if:
(Preconditions) The element must have a shadow root, the selector must not have any feature selectors, and it is not blocked from matching `:host` (e.g. .matches outside of the shadow root context)
(a) The selector does not have any arguments, or;
(b) It matches any of its arguments in the functional part of the pseudo-class
With this, we now pass these tests that were previously failing:
http://wpt.live/css/css-scoping/css-scoping-shadow-host-rule.html
http://wpt.live/css/css-scoping/host-descendant-002.html
http://wpt.live/css/css-scoping/host-multiple-001.html
Improved (1 less red box):
http://wpt.live/css/css-scoping/css-scoping-shadow-host-namespace.html
2023-02-27 11:03:50 +08:00
FranklinDM
439c671b26
Issue #2078 - Follow-up: Propagate combinator restriction to :is()/:where()
...
Based on spec discussion: https://github.com/w3c/csswg-drafts/issues/5093
2023-02-23 21:15:40 +08:00
FranklinDM
83484a34f5
Issue #2078 - Follow-up: aPreventComplexSelectors should be passed
2023-02-23 21:15:12 +08:00
FranklinDM
53f5905381
Issue #2078 - Follow-up: Move isForgiving check to ParsePseudoClassWithSelectorListArg
2023-02-23 21:14:58 +08:00
FranklinDM
03a3385702
No issue - Move Has* function definition out of the header file for consistency
2023-02-23 21:14:41 +08:00
FranklinDM
9037d5662d
Issue #1593 - Follow-up: Accept only a single selector in the argument of :host/:host-context
...
Current spec says these two pseudo-classes accept only a single compound selector:
:host( <compound-selector> )
:host-context( <compound-selector> )
2023-02-22 07:07:39 +08:00
FranklinDM
0391e8ab09
Issue #1593 - Follow-up: Copy mIsRelevantLink value over rather than calling IsLink
...
Calling IsLink ignores whatever state we have for aTreeMatchContext and will trigger an assertion if aTreeMatchContext.mForStyling is false. This also adds a comment about what that line effectively does.
2023-02-22 07:07:21 +08:00
FranklinDM
9bebb3a61a
Issue #1593 - Follow-up: :host() should not automatically match if we have a non-empty selector list
2023-02-22 07:07:01 +08:00
FranklinDM
ba7e29a052
Issue #1823 - Ensure :host() and :host-context() are given proper weights
2023-02-22 07:06:43 +08:00
FranklinDM
6d77f755da
Issue #2078 - Part 6: Replace empty list head with the next non-empty list for forgiving selector lists
...
What happens here if aListHead is an empty selector list:
(1) next selector group is parsed and continues to the next iteration if it's empty or invalid
(2) if we're a forgiving selector list and aListHead is empty, replace it with the selector group that we've just parsed
(3) step 1 ignores invalid/empty, so we assert that step 2 should never have an empty selector list
2023-02-22 07:06:24 +08:00
FranklinDM
4ece7873e0
Issue #2078 - Part 5: Ensure :is() and :where() are given proper weights
2023-02-22 07:06:05 +08:00
FranklinDM
1c1473166f
Issue #2078 - Part 4: Unify selector list matching
...
This should allow pseudo-classes that accept selector lists to properly handle complex selectors. `:visited` is also matched inside selector lists.
A previous iteration of this commit had incorrect matching behavior when called from `RestrictedSelectorListMatches`.
2023-02-22 07:05:44 +08:00
FranklinDM
14e8922dca
Issue #2078 - Part 3: Rename nsCSSRuleProcessor::SelectorListMatches to RestrictedSelectorListMatches
...
This is in preparation for merging the logic of RestrictedSelectorListMatches and AnySelectorInArgListMatches.
2023-02-22 07:05:25 +08:00
FranklinDM
0648ec64bb
Issue #2078 - Part 2: Rename nsPseudoClassList->u.mSelectors to mSelectorList
...
This makes it clear that we're accessing a selector list (nsCSSSelectorList), which is different from the selectors (nsCSSSelector) contained inside a selector list. Previously, both were confusingly referred to as mSelectors.
2023-02-22 07:05:08 +08:00
FranklinDM
453b715ef6
Issue #2078 - Part 1: Update CSS rule processor to handle :is() and :where() CSS pseudo-classes
...
This modifies selector list parsing to accommodate being "forgiving". Aliases for the :is selector's former names were also included. Note that the older and prefixed variant `-moz-any` remains unforgiving.
2023-02-22 07:04:49 +08:00
FranklinDM
6d3500bb48
Issue #2111 - Implement CSSStyleRule.selectorText setter
...
Unlike the original patch, this copies Chrome behavior: ignores invalid values of selectorText without any console log.
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=37468
2023-02-21 08:20:21 +08:00
FranklinDM
56e636d8ec
Issue #2084 - Part 2: Simplify logic in CSSParserImpl::LookupKeywordPrefixAware
...
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1259348
2023-01-10 07:41:39 +08:00
FranklinDM
db3ce13f28
Issue #2084 - Part 1: Remove CSSUnprefixingService.js and associated code
...
It's effectively dead code since it's been supplanted by built-in webkit-prefixed-CSS support (landed before fork point in Firefox 49).
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1259348
2023-01-10 07:37:30 +08:00
Moonchild
e38f362d44
Issue #2075 - Part 5: Allow logical aliases in the property database.
2023-01-06 20:36:35 +08:00
Moonchild
1b22ef40f9
Issue #2075 - Part 4: Update tests
...
* Update reftests to use inset-*
* Update property database
* Update logical properties test
2023-01-06 20:36:22 +08:00
Moonchild
07af4123d1
Issue #2075 - Part 2: Update devtools for inset-*
2023-01-06 20:35:53 +08:00