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

Unified Diff: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Issue 1647313003: Continue converting to explicit LayoutUnit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicitContstructors
Patch Set: Add TODO Created 4 years, 11 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
Index: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
diff --git a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
index 6b341afb7a9e962294b43cfb5032d05e5f30cb4a..8e79c18088237702bbf017b623aa81fba1185d0c 100644
--- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
+++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -340,7 +340,7 @@ inline bool shouldAddBorderPaddingMargin(LineLayoutItem child, bool &checkSide)
inline LayoutUnit inlineLogicalWidthFromAncestorsIfNeeded(LineLayoutItem child, bool start = true, bool end = true)
{
unsigned lineDepth = 1;
- LayoutUnit extraWidth = 0;
+ LayoutUnit extraWidth;
LineLayoutItem parent = child.parent();
while (parent.isLayoutInline() && lineDepth++ < cMaxLineDepth) {
LineLayoutInline parentAsLayoutInline(parent);
@@ -532,7 +532,7 @@ ALWAYS_INLINE TextDirection textDirectionFromUnicode(WTF::Unicode::Direction dir
ALWAYS_INLINE float textWidth(LineLayoutText text, unsigned from, unsigned len, const Font& font, float xPos, bool collapseWhiteSpace, HashSet<const SimpleFontData*>* fallbackFonts = nullptr, FloatRect* glyphBounds = nullptr)
{
if ((!from && len == text.textLength()) || text.style()->hasTextCombine())
- return text.width(from, len, font, xPos, text.style()->direction(), fallbackFonts, glyphBounds);
+ return text.width(from, len, font, LayoutUnit(xPos), text.style()->direction(), fallbackFonts, glyphBounds);
TextRun run = constructTextRun(font, text, from, len, text.styleRef());
run.setTabSize(!collapseWhiteSpace, text.style()->tabSize());

Powered by Google App Engine
This is Rietveld 408576698