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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.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: Added trivial tests safe to rebaseline to TestExpectations Created 4 years, 10 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 c3b28edacb650bac880d9eb4cb8ec91bafe68ee0..bdef0966e56303b15efbd56512ecefac823c9817 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -52,7 +52,8 @@ namespace blink {
struct SameSizeAsBorderValue {
RGBA32 m_color;
- unsigned m_width;
+ float m_width;
+ unsigned m_style;
};
static_assert(sizeof(BorderValue) == sizeof(SameSizeAsBorderValue), "BorderValue should stay small");
@@ -1608,7 +1609,7 @@ const BorderValue& ComputedStyle::borderEnd() const
return isLeftToRightDirection() ? borderBottom() : borderTop();
}
-int ComputedStyle::borderBeforeWidth() const
+float ComputedStyle::borderBeforeWidth() const
{
switch (writingMode()) {
case TopToBottomWritingMode:
@@ -1622,7 +1623,7 @@ int ComputedStyle::borderBeforeWidth() const
return borderTopWidth();
}
-int ComputedStyle::borderAfterWidth() const
+float ComputedStyle::borderAfterWidth() const
{
switch (writingMode()) {
case TopToBottomWritingMode:
@@ -1636,26 +1637,26 @@ int ComputedStyle::borderAfterWidth() const
return borderBottomWidth();
}
-int ComputedStyle::borderStartWidth() const
+float ComputedStyle::borderStartWidth() const
{
if (isHorizontalWritingMode())
return isLeftToRightDirection() ? borderLeftWidth() : borderRightWidth();
return isLeftToRightDirection() ? borderTopWidth() : borderBottomWidth();
}
-int ComputedStyle::borderEndWidth() const
+float ComputedStyle::borderEndWidth() const
{
if (isHorizontalWritingMode())
return isLeftToRightDirection() ? borderRightWidth() : borderLeftWidth();
return isLeftToRightDirection() ? borderBottomWidth() : borderTopWidth();
}
-int ComputedStyle::borderOverWidth() const
+float ComputedStyle::borderOverWidth() const
{
return isHorizontalWritingMode() ? borderTopWidth() : borderRightWidth();
}
-int ComputedStyle::borderUnderWidth() const
+float ComputedStyle::borderUnderWidth() const
{
return isHorizontalWritingMode() ? borderBottomWidth() : borderLeftWidth();
}
@@ -1695,6 +1696,7 @@ void ComputedStyle::setMotionPath(PassRefPtr<StylePath> path)
rareNonInheritedData.access()->m_transform.access()->m_motion.m_path = path;
}
+// TODO(bugsnash): change return value to float when outline is changed to float
int ComputedStyle::outlineOutsetExtent() const
{
if (!hasOutline())
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/OutlineValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698