Fix calculation of rgba's alpha in CSS custom text
authormikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 05:26:24 +0000 (05:26 +0000)
committermikelawther@chromium.org <mikelawther@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 05:26:24 +0000 (05:26 +0000)
commitde5226d47ea81ce34e751503d1fe8fdbfcdc682e
tree3c0c8eb9b03c4141663db2f26939e8461c8e6b96
parent30113f5604b83bfe0ec50ea719b75d43852daf43
Fix calculation of rgba's alpha in CSS custom text
https://bugs.webkit.org/show_bug.cgi?id=91355

Reviewed by Ryosuke Niwa.

Source/WebCore:

Alpha values are stored as an 8 bit value. To convert this to a float in the
range [0,1], we need to divide by 255, not 256.

Test: fast/css/rgba-custom-text.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::customCssText):

LayoutTests:

* css3/calc/color-hsl-expected.txt:
* css3/calc/color-rgb-expected.txt:
* editing/execCommand/query-command-value-background-color-expected.txt:
* editing/execCommand/query-command-value-background-color.html:
* fast/css/rgba-custom-text-expected.txt: Added.
* fast/css/rgba-custom-text.html: Added.
* media/track/track-cue-rendering-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/calc/color-hsl-expected.txt
LayoutTests/css3/calc/color-rgb-expected.txt
LayoutTests/editing/execCommand/query-command-value-background-color-expected.txt
LayoutTests/editing/execCommand/query-command-value-background-color.html
LayoutTests/fast/css/rgba-custom-text-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/rgba-custom-text.html [new file with mode: 0644]
LayoutTests/media/track/track-cue-rendering-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValue.cpp