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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.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/LayoutTextControlSingleLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp b/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp
index 138efd024b1388d9d43a83fbb76c1594ed67a420..66675f5dee8dc6a56de4f99ae1a4e3506d14a1f4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp
@@ -274,7 +274,7 @@ PassRefPtr<ComputedStyle> LayoutTextControlSingleLine::createInnerEditorStyle(co
textBlockStyle->setOverflowWrap(NormalOverflowWrap);
textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllipsis : TextOverflowClip);
- int computedLineHeight = lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes);
+ int computedLineHeight = lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes).toInt();
// Do not allow line-height to be smaller than our default.
if (textBlockStyle->fontSize() >= computedLineHeight)
textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTextControl.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698