diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index dc792adf8f01..b8303175748c 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -2040,12 +2040,6 @@ nsPresContext::UpdateIsChrome() nsPresContext::HasAuthorSpecifiedRules(const nsIFrame *aFrame, uint32_t ruleTypeMask) const { -#ifdef MOZ_STYLO - if (!mShell || mShell->StyleSet()->IsServo()) { - NS_ERROR("stylo: nsPresContext::HasAuthorSpecifiedRules not implemented"); - return true; - } -#endif return nsRuleNode::HasAuthorSpecifiedRules(aFrame->StyleContext(), ruleTypeMask, diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 5f3409e6817c..5bc1c9c2f002 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -10394,6 +10394,13 @@ nsRuleNode::HasAuthorSpecifiedRules(nsStyleContext* aStyleContext, uint32_t ruleTypeMask, bool aAuthorColorsAllowed) { +#ifdef MOZ_STYLO + if (aStyleContext->StyleSource().IsServoComputedValues()) { + NS_WARNING("stylo: nsRuleNode::HasAuthorSpecifiedRules not implemented"); + return true; + } +#endif + uint32_t inheritBits = 0; if (ruleTypeMask & NS_AUTHOR_SPECIFIED_BACKGROUND) inheritBits |= NS_STYLE_INHERIT_BIT(Background);