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

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

Issue 1375803002: Snap inline box boundaries to layout units during line breaking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Add comment about currentWidth Created 5 years, 3 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 | « no previous file | third_party/WebKit/Source/core/layout/line/LineWidth.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 061e927fb62678ebf188a774f12dbe57c8b1a95a..846bca474bd59dd5a7a5467a03b90a674a6ab462 100644
--- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
+++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -278,6 +278,12 @@ inline void BreakingContext::increment()
m_currentCharacterIsSpace = false;
m_current.moveToStartOf(m_nextObject);
+
+ // When the line box tree is created, this position in the line will be snapped to
+ // LayoutUnit's, and those measurements will be used by the paint code. Do the
+ // equivalent snapping here, to get consistent line measurements.
+ m_width.snapUncommittedWidth();
+
m_atStart = false;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/line/LineWidth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698