mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1182414, part 1 - Fix printing crash with range input controls. r=dholbert
This commit is contained in:
parent
f6c85e45b0
commit
179d0aeed2
@ -265,15 +265,18 @@ nsMeterFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
bool
|
||||
nsMeterFrame::ShouldUseNativeStyle() const
|
||||
{
|
||||
nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
|
||||
|
||||
// Use the native style if these conditions are satisfied:
|
||||
// - both frames use the native appearance;
|
||||
// - neither frame has author specified rules setting the border or the
|
||||
// background.
|
||||
return StyleDisplay()->mAppearance == NS_THEME_METERBAR &&
|
||||
mBarDiv->GetPrimaryFrame()->StyleDisplay()->mAppearance == NS_THEME_METERBAR_CHUNK &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(this,
|
||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND) &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(mBarDiv->GetPrimaryFrame(),
|
||||
barFrame &&
|
||||
barFrame->StyleDisplay()->mAppearance == NS_THEME_METERBAR_CHUNK &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(barFrame,
|
||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND);
|
||||
}
|
||||
|
||||
|
@ -271,15 +271,18 @@ nsProgressFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
|
||||
bool
|
||||
nsProgressFrame::ShouldUseNativeStyle() const
|
||||
{
|
||||
nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
|
||||
|
||||
// Use the native style if these conditions are satisfied:
|
||||
// - both frames use the native appearance;
|
||||
// - neither frame has author specified rules setting the border or the
|
||||
// background.
|
||||
return StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR &&
|
||||
mBarDiv->GetPrimaryFrame()->StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR_CHUNK &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(this,
|
||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND) &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(mBarDiv->GetPrimaryFrame(),
|
||||
barFrame &&
|
||||
barFrame->StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR_CHUNK &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(barFrame,
|
||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND);
|
||||
}
|
||||
|
||||
|
@ -837,15 +837,22 @@ nsRangeFrame::GetType() const
|
||||
bool
|
||||
nsRangeFrame::ShouldUseNativeStyle() const
|
||||
{
|
||||
nsIFrame* trackFrame = mTrackDiv->GetPrimaryFrame();
|
||||
nsIFrame* progressFrame = mProgressDiv->GetPrimaryFrame();
|
||||
nsIFrame* thumbFrame = mThumbDiv->GetPrimaryFrame();
|
||||
|
||||
return (StyleDisplay()->mAppearance == NS_THEME_RANGE) &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(this,
|
||||
(NS_AUTHOR_SPECIFIED_BORDER |
|
||||
NS_AUTHOR_SPECIFIED_BACKGROUND)) &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(mTrackDiv->GetPrimaryFrame(),
|
||||
trackFrame &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(trackFrame,
|
||||
STYLES_DISABLING_NATIVE_THEMING) &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(mProgressDiv->GetPrimaryFrame(),
|
||||
progressFrame &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(progressFrame,
|
||||
STYLES_DISABLING_NATIVE_THEMING) &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(mThumbDiv->GetPrimaryFrame(),
|
||||
thumbFrame &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(thumbFrame,
|
||||
STYLES_DISABLING_NATIVE_THEMING);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user