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 7aa2d25f8ed0f5c7f6a2a93eade37108fe25b0c4..9a1449edc90663aaf00d23585491d70ecff16a58 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h |
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h |
@@ -534,22 +534,23 @@ public: |
const LengthSize& borderBottomRightRadius() const { return surround->border.bottomRight(); } |
bool hasBorderRadius() const { return surround->border.hasBorderRadius(); } |
- int borderLeftWidth() const { return surround->border.borderLeftWidth(); } |
+ float borderLeftWidth() const { return surround->border.borderLeftWidth(); } |
EBorderStyle borderLeftStyle() const { return surround->border.left().style(); } |
- int borderRightWidth() const { return surround->border.borderRightWidth(); } |
+ float borderRightWidth() const { return surround->border.borderRightWidth(); } |
EBorderStyle borderRightStyle() const { return surround->border.right().style(); } |
- int borderTopWidth() const { return surround->border.borderTopWidth(); } |
+ float borderTopWidth() const { return surround->border.borderTopWidth(); } |
EBorderStyle borderTopStyle() const { return surround->border.top().style(); } |
- int borderBottomWidth() const { return surround->border.borderBottomWidth(); } |
+ float borderBottomWidth() const { return surround->border.borderBottomWidth(); } |
EBorderStyle borderBottomStyle() const { return surround->border.bottom().style(); } |
- int borderBeforeWidth() const; |
- int borderAfterWidth() const; |
- int borderStartWidth() const; |
- int borderEndWidth() const; |
- int borderOverWidth() const; |
- int borderUnderWidth() const; |
+ float borderBeforeWidth() const; |
+ float borderAfterWidth() const; |
+ float borderStartWidth() const; |
+ float borderEndWidth() const; |
+ float borderOverWidth() const; |
+ float borderUnderWidth() const; |
+ // TODO(bugsnash): change return type to float when outline offset is changed to float |
int outlineWidth() const |
{ |
if (m_background->outline().style() == BNONE) |
@@ -1112,16 +1113,32 @@ public: |
FloatRoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, |
const LayoutRectOutsets insets, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const; |
- void setBorderLeftWidth(unsigned v) { SET_VAR(surround, border.m_left.m_width, v); } |
+ void setBorderLeftWidth(float v) |
+ { |
+ ASSERT(v >= 0); |
+ SET_VAR(surround, border.m_left.m_width, v); |
+ } |
void setBorderLeftStyle(EBorderStyle v) { SET_VAR(surround, border.m_left.m_style, v); } |
void setBorderLeftColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(surround, border.m_left, v); } |
- void setBorderRightWidth(unsigned v) { SET_VAR(surround, border.m_right.m_width, v); } |
+ void setBorderRightWidth(float v) |
+ { |
+ ASSERT(v >= 0); |
+ SET_VAR(surround, border.m_right.m_width, v); |
+ } |
void setBorderRightStyle(EBorderStyle v) { SET_VAR(surround, border.m_right.m_style, v); } |
void setBorderRightColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(surround, border.m_right, v); } |
- void setBorderTopWidth(unsigned v) { SET_VAR(surround, border.m_top.m_width, v); } |
+ void setBorderTopWidth(float v) |
+ { |
+ ASSERT(v >= 0); |
+ SET_VAR(surround, border.m_top.m_width, v); |
+ } |
void setBorderTopStyle(EBorderStyle v) { SET_VAR(surround, border.m_top.m_style, v); } |
void setBorderTopColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(surround, border.m_top, v); } |
- void setBorderBottomWidth(unsigned v) { SET_VAR(surround, border.m_bottom.m_width, v); } |
+ void setBorderBottomWidth(float v) |
+ { |
+ ASSERT(v >= 0); |
+ SET_VAR(surround, border.m_bottom.m_width, v); |
+ } |
void setBorderBottomStyle(EBorderStyle v) { SET_VAR(surround, border.m_bottom.m_style, v); } |
void setBorderBottomColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(surround, border.m_bottom, v); } |
@@ -1672,7 +1689,7 @@ public: |
static ECursor initialCursor() { return CURSOR_AUTO; } |
static Color initialColor() { return Color::black; } |
static StyleImage* initialListStyleImage() { return 0; } |
- static unsigned initialBorderWidth() { return 3; } |
+ static float initialBorderWidth() { return 3.0f; } |
static unsigned short initialColumnRuleWidth() { return 3; } |
static unsigned short initialOutlineWidth() { return 3; } |
static float initialLetterWordSpacing() { return 0.0f; } |