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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1653673002: Even more explicit LayoutUnit conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moarConstructors
Patch Set: address comments 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/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 15e54a673ecc57d24d690b9bb86e99f29d32e5d8..8d759f42b74da4125cf0989d379d5dbd013754b4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -433,7 +433,7 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru
const Font& font = layoutText->style(lineInfo.isFirstLine())->font();
- LayoutUnit hyphenWidth = 0;
+ LayoutUnit hyphenWidth;
if (toInlineTextBox(run->m_box)->hasHyphen())
hyphenWidth = layoutText->hyphenWidth(font, run->direction());
@@ -912,7 +912,7 @@ void LayoutBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState,
layoutState.updatePaintInvalidationRangeFromBox(lineBox);
if (paginated) {
- LayoutUnit adjustment = 0;
+ LayoutUnit adjustment;
adjustLinePositionForPagination(*lineBox, adjustment);
if (adjustment) {
LayoutUnit oldLineWidth = availableLogicalWidthForLine(oldLogicalHeight, layoutState.lineInfo().isFirstLine() ? IndentText : DoNotIndentText);
@@ -1640,7 +1640,7 @@ RootInlineBox* LayoutBlockFlow::determineStartPosition(LineLayoutState& layoutSt
if (!layoutState.isFullLayout()) {
// Paginate all of the clean lines.
bool paginated = view()->layoutState() && view()->layoutState()->isPaginated();
- LayoutUnit paginationDelta = 0;
+ LayoutUnit paginationDelta;
for (curr = firstRootBox(); curr && !curr->isDirty(); curr = curr->nextRootBox()) {
if (paginated) {
paginationDelta -= curr->paginationStrut();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698