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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 1574933002: Changed type of border-width longhands from unsigned to float. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made transitions use fractional border widths, added assert that border widths are positive, and r… Created 4 years, 11 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index f064c617979cd42dffdc43c4738a1603d497bc94..71205150729012037a93950356c1acd58c327c1e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -435,8 +435,8 @@ LayoutUnit LayoutBox::scrollWidth() const
// For objects with visible overflow, this matches IE.
// FIXME: Need to work right with writing modes.
if (style()->isLeftToRightDirection())
- return std::max(clientWidth(), layoutOverflowRect().maxX() - borderLeft());
- return clientWidth() - std::min(LayoutUnit(), layoutOverflowRect().x() - borderLeft());
+ return std::max(clientWidth(), static_cast<LayoutUnit>((layoutOverflowRect().maxX() - borderLeft())));
+ return clientWidth() - std::min(LayoutUnit(), static_cast<LayoutUnit>((layoutOverflowRect().x() - borderLeft())));
}
LayoutUnit LayoutBox::scrollHeight() const
@@ -445,7 +445,7 @@ LayoutUnit LayoutBox::scrollHeight() const
return layer()->scrollableArea()->scrollHeight();
// For objects with visible overflow, this matches IE.
// FIXME: Need to work right with writing modes.
- return std::max(clientHeight(), layoutOverflowRect().maxY() - borderTop());
+ return std::max(clientHeight(), static_cast<LayoutUnit>((layoutOverflowRect().maxY() - borderTop())));
alancutter (OOO until 2018) 2016/01/20 06:06:23 Use LayoutUnit() instead of static_cast<LayoutUnit
}
LayoutUnit LayoutBox::scrollLeft() const

Powered by Google App Engine
This is Rietveld 408576698