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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTable.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/LayoutTable.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
index 49cb722772441adc4b0b8de0dadc42f8574307b1..fcdb4dfdcb35035ef0c850e9ca39327eff509f05 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -659,9 +659,9 @@ void LayoutTable::addOverflowFromChildren()
// Technically it's odd that we are incorporating the borders into layout overflow, which is only supposed to be about overflow from our
// descendant objects, but since tables don't support overflow:auto, this works out fine.
if (collapseBorders()) {
- int rightBorderOverflow = size().width() + outerBorderRight() - borderRight();
+ int rightBorderOverflow = (size().width() + outerBorderRight() - borderRight()).toInt();
int leftBorderOverflow = borderLeft() - outerBorderLeft();
- int bottomBorderOverflow = size().height() + outerBorderBottom() - borderBottom();
+ int bottomBorderOverflow = (size().height() + outerBorderBottom() - borderBottom()).toInt();
int topBorderOverflow = borderTop() - outerBorderTop();
IntRect borderOverflowRect(leftBorderOverflow, topBorderOverflow, rightBorderOverflow - leftBorderOverflow, bottomBorderOverflow - topBorderOverflow);
if (borderOverflowRect != pixelSnappedBorderBoxRect()) {
@@ -731,7 +731,7 @@ void LayoutTable::computePreferredLogicalWidths()
computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
- int bordersPaddingAndSpacing = bordersPaddingAndSpacingInRowDirection();
+ int bordersPaddingAndSpacing = bordersPaddingAndSpacingInRowDirection().toInt();
m_minPreferredLogicalWidth += bordersPaddingAndSpacing;
m_maxPreferredLogicalWidth += bordersPaddingAndSpacing;
@@ -1341,12 +1341,12 @@ int LayoutTable::firstLineBoxBaseline() const
int baseline = topNonEmptySection->firstLineBoxBaseline();
if (baseline >= 0)
- return topNonEmptySection->logicalTop() + baseline;
+ return (topNonEmptySection->logicalTop() + baseline).toInt();
// FF, Presto and IE use the top of the section as the baseline if its first row is empty of cells or content.
// The baseline of an empty row isn't specified by CSS 2.1.
if (topNonEmptySection->firstRow() && !topNonEmptySection->firstRow()->firstCell())
- return topNonEmptySection->logicalTop();
+ return topNonEmptySection->logicalTop().toInt();
return -1;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698