Closed Bug 1348488 Opened 3 years ago Closed 2 years ago

stylo: support parsing ::-moz-tree-* pseudo-elements

Categories

(Core :: CSS Parsing and Computation, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox55 --- wontfix
firefox56 --- fixed

People

(Reporter: bzbarsky, Assigned: xidorn)

References

Details

Attachments

(2 files, 7 obsolete files)

59 bytes, text/x-review-board-request
heycam
: review+
Details
59 bytes, text/x-review-board-request
heycam
: review+
Details
Note that these anon boxes can also use a single ':'.
Duplicate of this bug: 1324697
Priority: -- → P4
Blocks: 1378846
OK, given it is a widely-used browser-sniffing hack, we need to do it. Taking.
Assignee: nobody → xidorn+moz
Priority: P4 → P1
Repurposing this bug to do the parser work. I don't think we need supporting matching this before we want to support chrome document.
Summary: stylo: need ::-moz-tree-* support → stylo: support parsing ::-moz-tree-* pseudo-elements
Comment on attachment 8885054 [details]
Bug 1348488 part 1 - Capitalize name of tree pseudo-elements to match other anonboxes.

https://reviewboard.mozilla.org/r/155892/#review161146
Attachment #8885054 - Flags: review?(cam) → review+
Comment on attachment 8885055 [details]
Slightly simplify parse_one_simple_selector.

https://reviewboard.mozilla.org/r/155894/#review161148
Attachment #8885055 - Flags: review?(cam) → review+
Comment on attachment 8885056 [details]
Add functional pseudo-element support to selectors crate.

https://reviewboard.mozilla.org/r/155896/#review161152

::: servo/components/selectors/parser.rs:1533
(Diff revision 1)
> +            if !is_pseudo_element {
> +                let pseudo_class = if !is_functional {

For both of these if statements, I wonder if it would be clearer to drop the "!"s and swap the order of the if/else branches.
Attachment #8885056 - Flags: review?(cam) → review+
Comment on attachment 8885057 [details]
Allow selector parser to specify pseudo-element which can be used with single-colon syntax.

https://reviewboard.mozilla.org/r/155898/#review161154
Attachment #8885057 - Flags: review?(cam) → review+
Comment on attachment 8885058 [details]
Remove special-casing anonymous box in PseudoElement::exposed_in_non_ua_sheets.

https://reviewboard.mozilla.org/r/155900/#review161156
Attachment #8885058 - Flags: review?(cam) → review+
Comment on attachment 8885059 [details]
Call non-functional pseudo-elements simple pseudo-element.

https://reviewboard.mozilla.org/r/155902/#review161158
Attachment #8885059 - Flags: review?(cam) → review+
Comment on attachment 8885060 [details]
Add pseudo_element_variant helper function to simplify some code.

https://reviewboard.mozilla.org/r/155920/#review161160
Attachment #8885060 - Flags: review?(cam) → review+
Comment on attachment 8885061 [details]
Implement parsing of tree pseudo-elements.

https://reviewboard.mozilla.org/r/155904/#review161168

::: servo/components/style/gecko/pseudo_element_definition.mako.rs:137
(Diff revision 1)
>      /// Returns `None` if the pseudo-element is not recognised.
>      #[inline]
>      pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> {
>          use std::ascii::AsciiExt;
>  
> -        % for pseudo in PSEUDOS:
> +        % for pseudo in SIMPLE_PSEUDOS:

Maybe add a comment in here saying we don't need to support tree pseudos because of <reason>?
Attachment #8885061 - Flags: review?(cam) → review+
Comment on attachment 8885062 [details]
Bug 1348488 part 2 - Update mochitest expectations.

https://reviewboard.mozilla.org/r/155906/#review161170
Attachment #8885062 - Flags: review?(cam) → review+
Attachment #8885055 - Attachment is obsolete: true
Attachment #8885056 - Attachment is obsolete: true
Attachment #8885057 - Attachment is obsolete: true
Attachment #8885058 - Attachment is obsolete: true
Attachment #8885059 - Attachment is obsolete: true
Attachment #8885060 - Attachment is obsolete: true
Attachment #8885061 - Attachment is obsolete: true
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0298f90e1337
part 1 - Capitalize name of tree pseudo-elements to match other anonboxes. r=heycam
https://hg.mozilla.org/integration/autoland/rev/878cc600aa7c
part 2 - Update mochitest expectations. r=heycam
https://hg.mozilla.org/mozilla-central/rev/0298f90e1337
https://hg.mozilla.org/mozilla-central/rev/878cc600aa7c
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Too late for 55. Mark 55 won't fix.
Blocks: 1397644
You need to log in before you can comment on or make changes to this bug.