Bug 781360 patch 3: Rename {nsIFrame,nsStyleContext,nsComputedDOMStyle}::GetStyle* to Style*, since they can never return null. r=dholbert
Except for the changes in: layout/generic/nsIFrame.h (part) layout/style/nsComputedDOMStyle.h (all) layout/style/nsRuleNode.cpp (part) layout/style/nsStyleContext.cpp (part) layout/style/nsStyleContext.h (part) (see patch 3b in the bug), this patch was written with the sed script: s/\<GetStyle\(Font\|Color\|List\|Text\|Visibility\|Quotes\|UserInterface\|TableBorder\|SVG\|Background\|Position\|TextReset\|Display\|Content\|UIReset\|Table\|Margin\|Padding\|Border\|Outline\|XUL\|SVGReset\|Column\)\>/Style\1/g
This commit is contained in:
@@ -148,7 +148,7 @@ nsProgressFrame::ReflowBarFrame(nsIFrame* aBarFrame,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
bool vertical = GetStyleDisplay()->mOrient == NS_STYLE_ORIENT_VERTICAL;
|
||||
bool vertical = StyleDisplay()->mOrient == NS_STYLE_ORIENT_VERTICAL;
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, aBarFrame,
|
||||
nsSize(aReflowState.ComputedWidth(),
|
||||
NS_UNCONSTRAINEDSIZE));
|
||||
@@ -168,7 +168,7 @@ nsProgressFrame::ReflowBarFrame(nsIFrame* aBarFrame,
|
||||
size *= position;
|
||||
}
|
||||
|
||||
if (!vertical && GetStyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) {
|
||||
if (!vertical && StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) {
|
||||
xoffset += aReflowState.ComputedWidth() - size;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ nsProgressFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||
nsSize autoSize;
|
||||
autoSize.height = autoSize.width = fontMet->Font().size; // 1em
|
||||
|
||||
if (GetStyleDisplay()->mOrient == NS_STYLE_ORIENT_VERTICAL) {
|
||||
if (StyleDisplay()->mOrient == NS_STYLE_ORIENT_VERTICAL) {
|
||||
autoSize.height *= 10; // 10em
|
||||
} else {
|
||||
autoSize.width *= 10; // 10em
|
||||
@@ -264,8 +264,8 @@ nsProgressFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
|
||||
|
||||
nscoord minWidth = fontMet->Font().size; // 1em
|
||||
|
||||
if (GetStyleDisplay()->mOrient == NS_STYLE_ORIENT_AUTO ||
|
||||
GetStyleDisplay()->mOrient == NS_STYLE_ORIENT_HORIZONTAL) {
|
||||
if (StyleDisplay()->mOrient == NS_STYLE_ORIENT_AUTO ||
|
||||
StyleDisplay()->mOrient == NS_STYLE_ORIENT_HORIZONTAL) {
|
||||
// The orientation is horizontal
|
||||
minWidth *= 10; // 10em
|
||||
}
|
||||
@@ -286,8 +286,8 @@ nsProgressFrame::ShouldUseNativeStyle() const
|
||||
// - both frames use the native appearance;
|
||||
// - neither frame has author specified rules setting the border or the
|
||||
// background.
|
||||
return GetStyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR &&
|
||||
mBarDiv->GetPrimaryFrame()->GetStyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR_CHUNK &&
|
||||
return StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR &&
|
||||
mBarDiv->GetPrimaryFrame()->StyleDisplay()->mAppearance == NS_THEME_PROGRESSBAR_CHUNK &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(const_cast<nsProgressFrame*>(this),
|
||||
NS_AUTHOR_SPECIFIED_BORDER | NS_AUTHOR_SPECIFIED_BACKGROUND) &&
|
||||
!PresContext()->HasAuthorSpecifiedRules(mBarDiv->GetPrimaryFrame(),
|
||||
|
||||
Reference in New Issue
Block a user