mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1195857: Make nsPresContext::HasAuthorSpecifiedRules()'s arg 'const', to remove need for const_cast in callers. r=jwatt
This commit is contained in:
parent
b9e9d253f8
commit
c2f9caa032
@ -2115,7 +2115,8 @@ nsPresContext::UpdateIsChrome()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ bool
|
/* virtual */ bool
|
||||||
nsPresContext::HasAuthorSpecifiedRules(nsIFrame *aFrame, uint32_t ruleTypeMask) const
|
nsPresContext::HasAuthorSpecifiedRules(const nsIFrame *aFrame,
|
||||||
|
uint32_t ruleTypeMask) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
nsRuleNode::HasAuthorSpecifiedRules(aFrame->StyleContext(),
|
nsRuleNode::HasAuthorSpecifiedRules(aFrame->StyleContext(),
|
||||||
|
@ -854,7 +854,8 @@ public:
|
|||||||
void UpdateIsChrome();
|
void UpdateIsChrome();
|
||||||
|
|
||||||
// Public API for native theme code to get style internals.
|
// Public API for native theme code to get style internals.
|
||||||
virtual bool HasAuthorSpecifiedRules(nsIFrame *aFrame, uint32_t ruleTypeMask) const;
|
virtual bool HasAuthorSpecifiedRules(const nsIFrame *aFrame,
|
||||||
|
uint32_t ruleTypeMask) const;
|
||||||
|
|
||||||
// Is it OK to let the page specify colors and backgrounds?
|
// Is it OK to let the page specify colors and backgrounds?
|
||||||
bool UseDocumentColors() const {
|
bool UseDocumentColors() const {
|
||||||
|
@ -271,7 +271,7 @@ nsMeterFrame::ShouldUseNativeStyle() const
|
|||||||
// background.
|
// background.
|
||||||
return StyleDisplay()->mAppearance == NS_THEME_METERBAR &&
|
return StyleDisplay()->mAppearance == NS_THEME_METERBAR &&
|
||||||
mBarDiv->GetPrimaryFrame()->StyleDisplay()->mAppearance == NS_THEME_METERBAR_CHUNK &&
|
mBarDiv->GetPrimaryFrame()->StyleDisplay()->mAppearance == NS_THEME_METERBAR_CHUNK &&
|
||||||
!PresContext()->HasAuthorSpecifiedRules(const_cast<nsMeterFrame*>(this),
|
!PresContext()->HasAuthorSpecifiedRules(this,
|
||||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND) &&
|
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND) &&
|
||||||
!PresContext()->HasAuthorSpecifiedRules(mBarDiv->GetPrimaryFrame(),
|
!PresContext()->HasAuthorSpecifiedRules(mBarDiv->GetPrimaryFrame(),
|
||||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND);
|
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND);
|
||||||
|
@ -277,7 +277,7 @@ nsProgressFrame::ShouldUseNativeStyle() const
|
|||||||
// background.
|
// background.
|
||||||
return StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR &&
|
return StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR &&
|
||||||
mBarDiv->GetPrimaryFrame()->StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR_CHUNK &&
|
mBarDiv->GetPrimaryFrame()->StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR_CHUNK &&
|
||||||
!PresContext()->HasAuthorSpecifiedRules(const_cast<nsProgressFrame*>(this),
|
!PresContext()->HasAuthorSpecifiedRules(this,
|
||||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND) &&
|
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND) &&
|
||||||
!PresContext()->HasAuthorSpecifiedRules(mBarDiv->GetPrimaryFrame(),
|
!PresContext()->HasAuthorSpecifiedRules(mBarDiv->GetPrimaryFrame(),
|
||||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND);
|
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND);
|
||||||
|
@ -838,7 +838,7 @@ bool
|
|||||||
nsRangeFrame::ShouldUseNativeStyle() const
|
nsRangeFrame::ShouldUseNativeStyle() const
|
||||||
{
|
{
|
||||||
return (StyleDisplay()->mAppearance == NS_THEME_RANGE) &&
|
return (StyleDisplay()->mAppearance == NS_THEME_RANGE) &&
|
||||||
!PresContext()->HasAuthorSpecifiedRules(const_cast<nsRangeFrame*>(this),
|
!PresContext()->HasAuthorSpecifiedRules(this,
|
||||||
(NS_AUTHOR_SPECIFIED_BORDER |
|
(NS_AUTHOR_SPECIFIED_BORDER |
|
||||||
NS_AUTHOR_SPECIFIED_BACKGROUND)) &&
|
NS_AUTHOR_SPECIFIED_BACKGROUND)) &&
|
||||||
!PresContext()->HasAuthorSpecifiedRules(mTrackDiv->GetPrimaryFrame(),
|
!PresContext()->HasAuthorSpecifiedRules(mTrackDiv->GetPrimaryFrame(),
|
||||||
|
Loading…
Reference in New Issue
Block a user