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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Rebased patch set. Created 3 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/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 1b5ca74b866fff9cd404898b17106bbdb63c959f..48293a5c3e7757534abded7a4dade5b20a13f739 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -63,7 +63,7 @@ namespace blink {
struct SameSizeAsBorderValue {
RGBA32 m_color;
- unsigned m_width;
+ unsigned m_bitfield;
};
ASSERT_SIZE(BorderValue, SameSizeAsBorderValue);
@@ -2222,7 +2222,7 @@ const BorderValue& ComputedStyle::borderEnd() const {
return isLeftToRightDirection() ? borderBottom() : borderTop();
}
-int ComputedStyle::borderBeforeWidth() const {
+float ComputedStyle::borderBeforeWidth() const {
switch (getWritingMode()) {
case WritingMode::kHorizontalTb:
return borderTopWidth();
@@ -2235,7 +2235,7 @@ int ComputedStyle::borderBeforeWidth() const {
return borderTopWidth();
}
-int ComputedStyle::borderAfterWidth() const {
+float ComputedStyle::borderAfterWidth() const {
switch (getWritingMode()) {
case WritingMode::kHorizontalTb:
return borderBottomWidth();
@@ -2248,23 +2248,23 @@ 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();
}

Powered by Google App Engine
This is Rietveld 408576698