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

Unified Diff: Source/core/rendering/line/BreakingContextInlineHeaders.h

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/RootInlineBox.cpp ('k') | Source/core/rendering/line/LineWidth.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/line/BreakingContextInlineHeaders.h
diff --git a/Source/core/rendering/line/BreakingContextInlineHeaders.h b/Source/core/rendering/line/BreakingContextInlineHeaders.h
index 7e9184dc1ddd955f6b1ce72564f78bc0e7deb327..c2689386908db1a3ef46197a4b72bd2e1767a814 100644
--- a/Source/core/rendering/line/BreakingContextInlineHeaders.h
+++ b/Source/core/rendering/line/BreakingContextInlineHeaders.h
@@ -166,7 +166,7 @@ inline bool requiresLineBoxForContent(RenderInline* flow, const LineInfo& lineIn
{
RenderObject* parent = flow->parent();
if (flow->document().inNoQuirksMode()
- && (flow->style(lineInfo.isFirstLine())->lineHeight() != parent->style(lineInfo.isFirstLine())->lineHeight()
+ && (flow->style(lineInfo.isFirstLine() ? FirstLineStyle : OwnStyle)->lineHeight() != parent->style(lineInfo.isFirstLine() ? FirstLineStyle : OwnStyle)->lineHeight()
|| flow->style()->verticalAlign() != parent->style()->verticalAlign()
|| !parent->style()->font().fontMetrics().hasIdenticalAscentDescentAndLineGap(flow->style()->font().fontMetrics())))
return true;
@@ -545,7 +545,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
}
}
- RenderStyle* style = renderText->style(m_lineInfo.isFirstLine());
+ RenderStyle* style = renderText->style(m_lineInfo.isFirstLine() ? FirstLineStyle : OwnStyle);
const Font& font = style->font();
bool isFixedPitch = font.isFixedPitch();
« no previous file with comments | « Source/core/rendering/RootInlineBox.cpp ('k') | Source/core/rendering/line/LineWidth.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698