From 9d37bfeecc90bd58f8892a02dd9173362ba6b83d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 25 Aug 2016 14:57:49 -0700 Subject: [PATCH] Bug 1292281: Convert the error from nsPresContext::HasAuthorSpecifiedRules in a warning in nsRuleNode. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: 7ue0MYP3Jdb Signed-off-by: Emilio Cobos Álvarez --- layout/base/nsPresContext.cpp | 6 ------ layout/style/nsRuleNode.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) 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);