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/LayoutTextControl.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/LayoutTextControl.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp b/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp
index a22b9cc1a84897ae9aac20b2c2f5c6902c3c568a..c01d6e8a694d113bb9324ae758a5da75e3e1510e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp
@@ -83,7 +83,7 @@ void LayoutTextControl::adjustInnerEditorStyle(ComputedStyle& textBlockStyle) co
int LayoutTextControl::textBlockLogicalHeight() const
{
- return logicalHeight() - borderAndPaddingLogicalHeight();
+ return (logicalHeight() - borderAndPaddingLogicalHeight()).toInt();
}
int LayoutTextControl::textBlockLogicalWidth() const
@@ -95,7 +95,7 @@ int LayoutTextControl::textBlockLogicalWidth() const
if (innerEditor->layoutObject())
unitWidth -= innerEditor->layoutBox()->paddingStart() + innerEditor->layoutBox()->paddingEnd();
- return unitWidth;
+ return unitWidth.toInt();
}
void LayoutTextControl::updateFromElement()

Powered by Google App Engine
This is Rietveld 408576698