Closed Bug 1329076 Opened 8 years ago Closed 8 years ago

stylo: Add :-moz-browser-frame pseudo-class for fullscreen

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(5 files)

This is an internal pseudo-class specifically used for fullscreen stuff in Gecko for a UA sheet rule.

It is necessary to make fullscreen not crash with stylo.
Adding this pseudo-class makes me think we should probably use a list file like Gecko's nsCSSPseudoClassList.h, rather than having every function update separately for each new one.

I'm going to do that change after this lands.
Comment on attachment 8824315 [details]
Bug 1329076 part 1 - Change a bit about the code struct of pseudo-class matching in SelectorMatches.

https://reviewboard.mozilla.org/r/102834/#review103284
Attachment #8824315 - Flags: review?(cam) → review+
Comment on attachment 8824316 [details]
Bug 1329076 part 2 - Move some pseudo-classes which depend on only the element to an independent function.

https://reviewboard.mozilla.org/r/102836/#review103286

::: layout/style/nsCSSPseudoClasses.h:90
(Diff revision 1)
>        return true;
>      }
>      return false;
>    }
>  
> +  // Checks whether the given pseudo class matches the element.

Can you document here when we return a Some and when we return a Nothing?

::: layout/style/nsCSSPseudoClasses.cpp:139
(Diff revision 1)
> +    case CSSPseudoClassType::mozNativeAnonymous: {
> +      return Some(aElement->IsInNativeAnonymousSubtree());
> +    }

Nit: can remove the braces if you want.
Attachment #8824316 - Flags: review?(cam) → review+
Comment on attachment 8824317 [details]
Add function to convert NonTSPseudoClass to CSSPseudoClassType.

https://reviewboard.mozilla.org/r/102838/#review103288

::: servo/components/style/gecko/selector_parser.rs:180
(Diff revision 1)
> +            Hover => hover,
> +            Enabled => enabled,
> +            Disabled => disabled,
> +            Checked => checked,
> +            Indeterminate => indeterminate,
> +            ReadWrite | ReadOnly => { return None; }

Why None for these two and not mozReadWrite and mozReadOnly?  (Or do the moz ones differ from the unprefixed ones a bit?)
Attachment #8824317 - Flags: review?(cam) → review+
Comment on attachment 8824318 [details]
Add NonTSPseudoClass::is_internal function.

https://reviewboard.mozilla.org/r/102840/#review103290

::: servo/components/style/gecko/selector_parser.rs:145
(Diff revision 1)
>          })
>      }
>  }
>  
>  impl NonTSPseudoClass {
> +    pub fn is_internal(&self) -> bool {

Can you add a comment describing what it means to be internal?
Attachment #8824318 - Flags: review?(cam) → review+
Comment on attachment 8824319 [details]
Bug 1329076 part 3 - Add :-moz-browser-frame pseudo-class.

https://reviewboard.mozilla.org/r/102842/#review103292
Attachment #8824319 - Flags: review?(cam) → review+
Comment on attachment 8824317 [details]
Add function to convert NonTSPseudoClass to CSSPseudoClassType.

https://reviewboard.mozilla.org/r/102838/#review103288

> Why None for these two and not mozReadWrite and mozReadOnly?  (Or do the moz ones differ from the unprefixed ones a bit?)

Given bug 312971, I suppose there is some difference.
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/36096df673ca
part 1 - Change a bit about the code struct of pseudo-class matching in SelectorMatches. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/68b4cc7e30ce
part 2 - Move some pseudo-classes which depend on only the element to an independent function. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/79053ff9ea68
part 3 - Add :-moz-browser-frame pseudo-class. r=heycam
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: