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

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

Issue 351033003: Simplify use of styleOrFirstLineStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@rename-style-bool-to-0
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/RenderInline.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 604a5d7a1023ed020bad10899689da36ea0bd224..45e5999736d739278736e0c35c43291e5612bc73 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -3747,8 +3747,7 @@ LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction,
if (isReplaced() && linePositionMode == PositionOnContainingLine)
return RenderBox::lineHeight(firstLine, direction, linePositionMode);
- RenderStyle* s = styleOrFirstLineStyle(firstLine && document().styleEngine()->usesFirstLineRules());
- return s->computedLineHeight();
+ return styleOrFirstLineStyle(firstLine)->computedLineHeight();
}
int RenderBlock::beforeMarginInLineDirection(LineDirectionMode direction) const
@@ -3822,7 +3821,7 @@ int RenderBlock::firstLineBoxBaseline() const
if (childrenInline()) {
if (firstLineBox())
- return firstLineBox()->logicalTop() + styleOrFirstLineStyle(true)->fontMetrics().ascent(firstRootBox()->baselineType());
+ return firstLineBox()->logicalTop() + firstLineStyle()->fontMetrics().ascent(firstRootBox()->baselineType());
else
return -1;
}
« no previous file with comments | « Source/core/rendering/RenderBR.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698