Strange Result for getComputedStyle on borderWidth set in em
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 12:59:52 +0000 (12:59 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 12:59:52 +0000 (12:59 +0000)
commit31e4cf3bad2b839f93b98d7173aeabcca4b9bbbe
treec4979f127bda2236318740e3a5de4bd7dbbd6dad
parent220c2dbfebf679dc77c75c8a2b38fcb69af74bc9
Strange Result for getComputedStyle on borderWidth set in em
https://bugs.webkit.org/show_bug.cgi?id=18294

Reviewed by Tony Chang.

Source/WebCore:

BorderValue stores its width on a 12 bits unsigned. This patch
increase it to 27. The patch also modify the way to set the
width or to get it, we now use a unsigned rather than a short.

Test: fast/css/border-width-large.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLength):
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* page/animation/AnimationBase.cpp:
(WebCore::blendFunc):
(WebCore::AnimationBase::ensurePropertyMap):
* platform/animation/AnimationUtilities.h:
(WebCore::blend):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
* rendering/style/BorderData.h:
(WebCore::BorderData::borderLeftWidth):
(WebCore::BorderData::borderRightWidth):
(WebCore::BorderData::borderTopWidth):
(WebCore::BorderData::borderBottomWidth):
* rendering/style/BorderValue.h:
(WebCore::BorderValue::width):
* rendering/style/RenderStyle.cpp:
* rendering/style/RenderStyle.h:
(WebCore::RenderStyleBitfields::borderLeftWidth):
(WebCore::RenderStyleBitfields::borderRightWidth):
(WebCore::RenderStyleBitfields::borderTopWidth):
(WebCore::RenderStyleBitfields::borderBottomWidth):
(WebCore::RenderStyleBitfields::setBorderLeftWidth):
(WebCore::RenderStyleBitfields::setBorderRightWidth):
(WebCore::RenderStyleBitfields::setBorderTopWidth):
(WebCore::RenderStyleBitfields::setBorderBottomWidth):
(WebCore::RenderStyleBitfields::initialBorderWidth):
(WebCore::RenderStyleBitfields::initialColumnRuleWidth):
(WebCore::RenderStyleBitfields::initialOutlineWidth):

LayoutTests:

This test covers that setting big values to border-width will
return correct values.

* fast/css/border-width-large-expected.txt: Added.
* fast/css/border-width-large.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/border-width-large-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/border-width-large.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSStyleApplyProperty.cpp
Source/WebCore/page/animation/AnimationBase.cpp
Source/WebCore/platform/animation/AnimationUtilities.h
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/style/BorderData.h
Source/WebCore/rendering/style/BorderValue.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h