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

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

Issue 2261663002: Disallow cast/implicit conversion from LayoutUnit to int/unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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/LayoutTableSection.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
index da9a5e58610bd99affffefce1179ab6979f09e34..f6145c595db79e71b0385dda2e2fbf366ab2e0c4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -1096,7 +1096,7 @@ void LayoutTableSection::layoutRows()
// We'll also do a basic increase of the row height to accommodate the cell if it's bigger, but this isn't quite right
// either. It's at least stable though and won't result in an infinite # of relayouts that may never stabilize.
LayoutUnit oldLogicalHeight = cell->logicalHeight();
- rowHeightIncreaseForPagination = std::max<int>(rowHeightIncreaseForPagination, oldLogicalHeight - rHeight);
+ rowHeightIncreaseForPagination = std::max<int>(rowHeightIncreaseForPagination, (oldLogicalHeight - rHeight).toInt());
cell->setLogicalHeight(LayoutUnit(rHeight));
cell->computeOverflow(oldLogicalHeight, false);
}
@@ -1157,7 +1157,7 @@ int LayoutTableSection::paginationStrutForRow(LayoutTableRow* row, LayoutUnit lo
// completely. No point in leaving a page completely blank.
return 0;
}
- return paginationStrut;
+ return paginationStrut.toInt();
}
void LayoutTableSection::computeOverflowFromCells()
@@ -1372,7 +1372,7 @@ int LayoutTableSection::firstLineBoxBaseline() const
const CellStruct& cs = firstRow.at(i);
const LayoutTableCell* cell = cs.primaryCell();
if (cell)
- firstLineBaseline = std::max<int>(firstLineBaseline, cell->logicalTop() + cell->borderBefore() + cell->paddingBefore() + cell->contentLogicalHeight());
+ firstLineBaseline = std::max<int>(firstLineBaseline, (cell->logicalTop() + cell->borderBefore() + cell->paddingBefore() + cell->contentLogicalHeight()).toInt());
}
return firstLineBaseline;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698