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

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

Issue 2895933004: Pass the correct BorderWidth value when creating BorderValues (Closed)
Patch Set: add computedstyle unit tes Created 3 years, 7 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.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index b9a36fccf04c7df6705cf9f6ffc499403233dd5b..e1a644aec1cfadd6e0f158bb1855a4fbc661971f 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -2779,20 +2779,28 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
void SetBorderImageSlicesFill(bool);
const BorderValue BorderLeft() const {
- return BorderValue(BorderLeftStyle(), BorderLeftColor(), BorderLeftWidth(),
- OutlineStyleIsAuto());
+ return BorderValue(
+ BorderLeftStyle(), BorderLeftColor(),
+ static_cast<float>(BorderLeftWidthInternal()) / kBorderWidthDenominator,
+ OutlineStyleIsAuto());
}
const BorderValue BorderRight() const {
return BorderValue(BorderRightStyle(), BorderRightColor(),
- BorderRightWidth(), OutlineStyleIsAuto());
+ static_cast<float>(BorderRightWidthInternal()) /
+ kBorderWidthDenominator,
+ OutlineStyleIsAuto());
}
const BorderValue BorderTop() const {
- return BorderValue(BorderTopStyle(), BorderTopColor(), BorderTopWidth(),
- OutlineStyleIsAuto());
+ return BorderValue(
+ BorderTopStyle(), BorderTopColor(),
+ static_cast<float>(BorderTopWidthInternal()) / kBorderWidthDenominator,
+ OutlineStyleIsAuto());
}
const BorderValue BorderBottom() const {
return BorderValue(BorderBottomStyle(), BorderBottomColor(),
- BorderBottomWidth(), OutlineStyleIsAuto());
+ static_cast<float>(BorderBottomWidthInternal()) /
+ kBorderWidthDenominator,
+ OutlineStyleIsAuto());
}
bool BorderSizeEquals(const ComputedStyle& o) const {

Powered by Google App Engine
This is Rietveld 408576698