diff --git a/mozilla/layout/base/nsPresContext.cpp b/mozilla/layout/base/nsPresContext.cpp index ba3b3079bdd..acc5b9072b6 100644 --- a/mozilla/layout/base/nsPresContext.cpp +++ b/mozilla/layout/base/nsPresContext.cpp @@ -1499,8 +1499,8 @@ nsPresContext::IsChrome() const } /* virtual */ PRBool -nsPresContext::HasAuthorSpecifiedBorderOrBackground(nsIFrame *aFrame) const +nsPresContext::HasAuthorSpecifiedRules(nsIFrame *aFrame, PRUint32 ruleTypeMask) const { return nsRuleNode:: - HasAuthorSpecifiedBorderOrBackground(aFrame->GetStyleContext()); + HasAuthorSpecifiedRules(aFrame->GetStyleContext(), ruleTypeMask); } diff --git a/mozilla/layout/base/nsPresContext.h b/mozilla/layout/base/nsPresContext.h index 667e3f5fa17..94f7ec9d685 100644 --- a/mozilla/layout/base/nsPresContext.h +++ b/mozilla/layout/base/nsPresContext.h @@ -137,6 +137,11 @@ enum nsLayoutPhase { }; #endif +/* Used by nsPresContext::HasAuthorSpecifiedRules */ +#define NS_AUTHOR_SPECIFIED_BACKGROUND (1 << 0) +#define NS_AUTHOR_SPECIFIED_BORDER (1 << 1) +#define NS_AUTHOR_SPECIFIED_PADDING (1 << 2) + // An interface for presentation contexts. Presentation contexts are // objects that provide an outer context for a presentation shell. @@ -741,7 +746,7 @@ public: PRBool IsChrome() const; // Public API for native theme code to get style internals. - virtual PRBool HasAuthorSpecifiedBorderOrBackground(nsIFrame *aFrame) const; + virtual PRBool HasAuthorSpecifiedRules(nsIFrame *aFrame, PRUint32 ruleTypeMask) const; // Is it OK to let the page specify colors and backgrounds? PRBool UseDocumentColors() const { diff --git a/mozilla/layout/reftests/native-theme/427122-1-ref.html b/mozilla/layout/reftests/native-theme/427122-1-ref.html new file mode 100644 index 00000000000..78cad140bef --- /dev/null +++ b/mozilla/layout/reftests/native-theme/427122-1-ref.html @@ -0,0 +1,17 @@ + + +