Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1642)

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 355843002: Rename style(bool) to styleOrFirstLineStyle(bool) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBR.cpp ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 13895b0b848b756fd78c46d16c5cdabab0b59b70..604a5d7a1023ed020bad10899689da36ea0bd224 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -3747,7 +3747,7 @@ LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction,
if (isReplaced() && linePositionMode == PositionOnContainingLine)
return RenderBox::lineHeight(firstLine, direction, linePositionMode);
- RenderStyle* s = style(firstLine && document().styleEngine()->usesFirstLineRules());
+ RenderStyle* s = styleOrFirstLineStyle(firstLine && document().styleEngine()->usesFirstLineRules());
return s->computedLineHeight();
}
@@ -3800,7 +3800,7 @@ int RenderBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin
// Note that inline-block counts as replaced here.
ASSERT(linePositionMode == PositionOfInteriorLineBoxes);
- const FontMetrics& fontMetrics = style(firstLine)->fontMetrics();
+ const FontMetrics& fontMetrics = styleOrFirstLineStyle(firstLine)->fontMetrics();
return fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction, linePositionMode) - fontMetrics.height()) / 2;
}
@@ -3809,7 +3809,7 @@ LayoutUnit RenderBlock::minLineHeightForReplacedRenderer(bool isFirstLine, Layou
if (!document().inNoQuirksMode() && replacedHeight)
return replacedHeight;
- if (!(style(isFirstLine)->lineBoxContain() & LineBoxContainBlock))
+ if (!(styleOrFirstLineStyle(isFirstLine)->lineBoxContain() & LineBoxContainBlock))
return 0;
return std::max<LayoutUnit>(replacedHeight, lineHeight(isFirstLine, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes));
@@ -3822,7 +3822,7 @@ int RenderBlock::firstLineBoxBaseline() const
if (childrenInline()) {
if (firstLineBox())
- return firstLineBox()->logicalTop() + style(true)->fontMetrics().ascent(firstRootBox()->baselineType());
+ return firstLineBox()->logicalTop() + styleOrFirstLineStyle(true)->fontMetrics().ascent(firstRootBox()->baselineType());
else
return -1;
}
@@ -3862,7 +3862,7 @@ int RenderBlock::lastLineBoxBaseline(LineDirectionMode lineDirection) const
+ (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight());
}
if (lastLineBox())
- return lastLineBox()->logicalTop() + style(lastLineBox() == firstLineBox())->fontMetrics().ascent(lastRootBox()->baselineType());
+ return lastLineBox()->logicalTop() + styleOrFirstLineStyle(lastLineBox() == firstLineBox())->fontMetrics().ascent(lastRootBox()->baselineType());
return -1;
} else {
bool haveNormalFlowChild = false;
« no previous file with comments | « Source/core/rendering/RenderBR.cpp ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698