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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.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/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index d4ecea553149fae5db25b9120f62e06e9f4021a2..300cd3703edd3d9b9e2b96b1d1497bed4c3fef18 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1493,7 +1493,7 @@ int ComputedStyle::computedLineHeight() const
return getFontMetrics().lineSpacing();
if (lh.hasPercent())
- return minimumValueForLength(lh, LayoutUnit(computedFontSize()));
+ return minimumValueForLength(lh, LayoutUnit(computedFontSize())).toInt();
return std::min(lh.value(), LayoutUnit::max().toFloat());
}
@@ -1956,22 +1956,22 @@ void ComputedStyle::getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLef
{
bool horizontal = isHorizontalWritingMode();
- edges[BSTop] = BorderEdge(LayoutUnit(borderTopWidth()),
+ edges[BSTop] = BorderEdge(borderTopWidth(),
visitedDependentColor(CSSPropertyBorderTopColor),
borderTopStyle(),
horizontal || includeLogicalLeftEdge);
- edges[BSRight] = BorderEdge(LayoutUnit(borderRightWidth()),
+ edges[BSRight] = BorderEdge(borderRightWidth(),
visitedDependentColor(CSSPropertyBorderRightColor),
borderRightStyle(),
!horizontal || includeLogicalRightEdge);
- edges[BSBottom] = BorderEdge(LayoutUnit(borderBottomWidth()),
+ edges[BSBottom] = BorderEdge(borderBottomWidth(),
visitedDependentColor(CSSPropertyBorderBottomColor),
borderBottomStyle(),
horizontal || includeLogicalRightEdge);
- edges[BSLeft] = BorderEdge(LayoutUnit(borderLeftWidth()),
+ edges[BSLeft] = BorderEdge(borderLeftWidth(),
visitedDependentColor(CSSPropertyBorderLeftColor),
borderLeftStyle(),
!horizontal || includeLogicalLeftEdge);
« no previous file with comments | « third_party/WebKit/Source/core/paint/ViewPainter.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698