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

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

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 years, 5 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/RenderInline.h ('k') | Source/core/rendering/RenderListBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderInline.cpp
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index 80041d5a9347a75ed72c0db09d8dfafa1641db3b..1f31e0fd90643ea95cdf8e4dac0599d4e6cec00e 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -217,8 +217,8 @@ void RenderInline::updateAlwaysCreateLineBoxes(bool fullLayout)
if (!alwaysCreateLineBoxes && checkFonts && document().styleEngine()->usesFirstLineRules()) {
// Have to check the first line style as well.
- parentStyle = parent()->style(true);
- RenderStyle* childStyle = style(true);
+ parentStyle = parent()->style(FirstLineStyle);
+ RenderStyle* childStyle = style(FirstLineStyle);
alwaysCreateLineBoxes = !parentStyle->font().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle->font().fontMetrics())
|| childStyle->verticalAlign() != BASELINE
|| parentStyle->lineHeight() != childStyle->lineHeight();
@@ -1277,9 +1277,9 @@ InlineFlowBox* RenderInline::createAndAppendInlineFlowBox()
return flowBox;
}
-LayoutUnit RenderInline::lineHeight(bool firstLine, LineDirectionMode /*direction*/, LinePositionMode /*linePositionMode*/) const
+LayoutUnit RenderInline::lineHeight(OwnOrFirstLineStyle firstLine, LineDirectionMode /*direction*/, LinePositionMode /*linePositionMode*/) const
{
- if (firstLine && document().styleEngine()->usesFirstLineRules()) {
+ if (firstLine == FirstLineStyle && document().styleEngine()->usesFirstLineRules()) {
RenderStyle* s = style(firstLine);
if (s != style())
return s->computedLineHeight();
@@ -1288,7 +1288,7 @@ LayoutUnit RenderInline::lineHeight(bool firstLine, LineDirectionMode /*directio
return style()->computedLineHeight();
}
-int RenderInline::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
+int RenderInline::baselinePosition(FontBaseline baselineType, OwnOrFirstLineStyle firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
{
ASSERT(linePositionMode == PositionOnContainingLine);
const FontMetrics& fontMetrics = style(firstLine)->fontMetrics();
« no previous file with comments | « Source/core/rendering/RenderInline.h ('k') | Source/core/rendering/RenderListBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698