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

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

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/line/InlineBox.h
diff --git a/third_party/WebKit/Source/core/layout/line/InlineBox.h b/third_party/WebKit/Source/core/layout/line/InlineBox.h
index 40d75eb10c8285bd1c2b218b66830a5e6661d4b4..02f7e63b1905fccf9ad96722a237614fedd1779a 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineBox.h
+++ b/third_party/WebKit/Source/core/layout/line/InlineBox.h
@@ -211,9 +211,9 @@ public:
else
setY(left);
}
- int pixelSnappedLogicalLeft() const { return logicalLeft(); }
+ int pixelSnappedLogicalLeft() const { return logicalLeft().toInt(); }
int pixelSnappedLogicalRight() const { return logicalRight().ceil(); }
- int pixelSnappedLogicalTop() const { return logicalTop(); }
+ int pixelSnappedLogicalTop() const { return logicalTop().toInt(); }
int pixelSnappedLogicalBottom() const { return logicalBottom().ceil(); }
// The logicalTop[ position is the top edge of the line box in a horizontal line and the left edge in a vertical line.
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/EllipsisBox.cpp ('k') | third_party/WebKit/Source/core/layout/line/InlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698