Closed Bug 1361994 Opened 7 years ago Closed 7 years ago

stylo: Implement access to CSSMozDocumentRule

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: ferjm, Assigned: ferjm)

References

Details

Attachments

(5 files, 1 obsolete file)

The CSSOM bits for @-moz-document
Assignee: nobody → ferjmoreno
Depends on: 1355408
Summary: stylo: Implement access to DocumentRule → stylo: Implement access to CSSMozDocumentRule
Comment on attachment 8865795 [details]
Bug 1361994 - Part 0: Add MOZ_DOCUMENT to nsIDOMCSSRule.

https://reviewboard.mozilla.org/r/137410/#review140558
Attachment #8865795 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8865798 [details]
Bug 1361994 - Part 3: Implement CSSOM support for @-moz-document.

https://reviewboard.mozilla.org/r/137416/#review140562
Attachment #8865798 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8865799 [details]
Bug 1361994 - Part 4: Update expected stylo test failures.

https://reviewboard.mozilla.org/r/137418/#review140564

::: layout/style/test/test_condition_text.html:31
(Diff revision 1)
>  
>      @supports(color: green){}
>      @supports (color: green) {}
>      @supports ((color: green)) {}
>      @supports (color: green) and (color: blue) {}
> -    @supports ( Font:  20px serif ! Important)  {}
> +    @supports (Font:  20px serif ! Important)  {}

Any reason for this change? I don't think you should change the test unless it is testing something wrong.
Attachment #8865799 - Flags: review?(xidorn+moz) → review-
Comment on attachment 8865796 [details]
Bug 1361994 - Part 1: Add separate CSSDocumentRule class.

https://reviewboard.mozilla.org/r/137412/#review140566

::: layout/style/CSSMozDocumentRule.h:26
(Diff revision 1)
> +  virtual ~CSSMozDocumentRule() {}
> +
> +public:
> +  NS_DECL_ISUPPORTS_INHERITED
> +
> +  int32_t GetType() const override { return css::Rule::DOCUMENT_RULE; }

I think you can do `final` here.

::: layout/style/CSSMozDocumentRule.h:39
(Diff revision 1)
> +
> +  // nsIDOMCSSMozDocumentRule interface
> +  NS_DECL_NSIDOMCSSMOZDOCUMENTRULE
> +
> +  // WebIDL interface
> +  uint16_t Type() const override {

and here.

::: layout/style/ServoCSSRuleList.cpp:9
(Diff revision 1)
> +#include "nsCSSFontFaceRule.h"
> +

Please move this after all the `mozilla/` includes.

I think in general, we want the header of the source file to be the first include, and other headers in some order...

Actually this and `css::` fix below can be in a separate commit, but that doesn't matter a lot...
Attachment #8865796 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8865797 [details]
Bug 1361994 - Part 2: Fix build error in ServoCSSRuleList.

https://reviewboard.mozilla.org/r/137414/#review140568

::: layout/style/ServoCSSRuleList.cpp:10
(Diff revision 1)
> -#include "nsCSSFontFaceRule.h"
> -
> -#include "mozilla/ServoCSSRuleList.h"
> -
>  #include "mozilla/ServoBindings.h"
> -#include "mozilla/ServoStyleRule.h"
> +#include "mozilla/ServoCSSRuleList.h"

The header of the cpp file should be put at the very beginning in general. Please don't move it down.
Attachment #8865797 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8865799 [details]
Bug 1361994 - Part 4: Update expected stylo test failures.

https://reviewboard.mozilla.org/r/137418/#review140996
Attachment #8865799 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8866269 [details]
Bug 1361994 - Part 4: Update expected stylo test failures.

https://reviewboard.mozilla.org/r/137890/#review141006
Attachment #8866269 - Flags: review?(xidorn+moz) → review+
Attachment #8866269 - Attachment is obsolete: true
Pushed by ferjmoreno@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4943bae05ca6
Part 0: Add MOZ_DOCUMENT to nsIDOMCSSRule. r=xidorn
https://hg.mozilla.org/integration/autoland/rev/b39ce222508a
Part 1: Add separate CSSDocumentRule class. r=xidorn
https://hg.mozilla.org/integration/autoland/rev/437a1a52bc92
Part 2: Fix build error in ServoCSSRuleList. r=xidorn
https://hg.mozilla.org/integration/autoland/rev/a8e465b82dc4
Part 3: Implement CSSOM support for @-moz-document. r=xidorn
https://hg.mozilla.org/integration/autoland/rev/e97d39714590
Part 4: Update expected stylo test failures. r=xidorn
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: