Closed Bug 1420039 Opened 7 years ago Closed 7 years ago

GroupRuleRuleList::GetParentObject should return a ServoStyleSheet too

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox59 --- affected

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(1 file)

      No description provided.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Comment on attachment 8931214 [details]
Bug 1420039 - Return a ServoStyleSheet from GroupRuleRuleList::GetParentObject when the rule is Servo-backed.

https://reviewboard.mozilla.org/r/202316/#review207682


C/C++ static analysis found 1 defect in this patch.

You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp`


::: layout/style/GroupRule.cpp:35
(Diff revision 1)
>  class GroupRuleRuleList final : public dom::CSSRuleList
>  {
>  public:
>    explicit GroupRuleRuleList(GroupRule *aGroupRule);
>  
> -  virtual CSSStyleSheet* GetParentObject() override;
> +  virtual StyleSheet* GetParentObject() override;

Warning: 'virtual' is redundant since the function is already declared 'override' [clang-tidy: modernize-use-override]
I don't understand why this change is necessary. GroupRuleRuleList is only used inside GeckoGroupRuleRules, and thus it should never have a Servo style sheet. Why does it need to return StyleSheet rather than the more specific CSSStyleSheet?
Flags: needinfo?(cam)
Comment on attachment 8931214 [details]
Bug 1420039 - Return a ServoStyleSheet from GroupRuleRuleList::GetParentObject when the rule is Servo-backed.

https://reviewboard.mozilla.org/r/202316/#review207846
Attachment #8931214 - Flags: review?(xidorn+moz)
Oh, my mistake.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(cam)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: