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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.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/LayoutTableCell.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
index eb1a8260179b81039b035d7b71c08e89f7762374..fd10fa350e7f43f5e4a35d895794ef467635ca2f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
@@ -388,7 +388,7 @@ int LayoutTableCell::cellBaselinePosition() const
int firstLineBaseline = firstLineBoxBaseline();
if (firstLineBaseline != -1)
return firstLineBaseline;
- return borderBefore() + paddingBefore() + contentLogicalHeight();
+ return (borderBefore() + paddingBefore() + contentLogicalHeight()).toInt();
}
void LayoutTableCell::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
@@ -1011,8 +1011,8 @@ void LayoutTableCell::scrollbarsChanged(bool horizontalScrollbarChanged, bool ve
totalHeight -= scrollbarHeight;
LayoutUnit newBeforePadding = (totalHeight - heightWithoutIntrinsicPadding) / 2;
LayoutUnit newAfterPadding = totalHeight - heightWithoutIntrinsicPadding - newBeforePadding;
- setIntrinsicPaddingBefore(newBeforePadding);
- setIntrinsicPaddingAfter(newAfterPadding);
+ setIntrinsicPaddingBefore(newBeforePadding.toInt());
+ setIntrinsicPaddingAfter(newAfterPadding.toInt());
} else {
setIntrinsicPaddingAfter(intrinsicPaddingAfter() - scrollbarHeight);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698