Commit 24d88faf authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

2011-01-18 Krithigassree Sambamurthy <krithigassree.sambamurthy@nokia.com>

        Reviewed by Simon Fraser.

        Support background-clip: content-box
        https://bugs.webkit.org/show_bug.cgi?id=48771

        Addded content-box as a valid background-clip value.

        * WebCore/css/CSSParser.cpp:
        (WebCore::parseBackgroundClip):
2011-01-18  Krithigassree Sambamurthy  <krithigassree.sambamurthy@nokia.com>

        Reviewed by Simon Fraser.

        Support background-clip: content-box
        https://bugs.webkit.org/show_bug.cgi?id=48771

        Added test cases to check the various valid background-clip values.

        * fast/css/background-clip-text-expected.txt:
        * fast/css/background-clip-values-expected.checksum: Added.
        * fast/css/background-clip-values-expected.txt: Added.
        * fast/css/background-clip-values.html: Added.
        * fast/css/script-tests/background-clip-text.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 866b5d48
2011-01-18 Krithigassree Sambamurthy <krithigassree.sambamurthy@nokia.com>
Reviewed by Simon Fraser.
Support background-clip: content-box
https://bugs.webkit.org/show_bug.cgi?id=48771
Addded content-box as a valid background-clip value.
* WebCore/css/CSSParser.cpp:
(WebCore::parseBackgroundClip):
2011-01-18 Hayato Ito <hayato@chromium.org>
Reviewed by Kent Tamura.
......
2011-01-18 Krithigassree Sambamurthy <krithigassree.sambamurthy@nokia.com>
Reviewed by Simon Fraser.
Support background-clip: content-box
https://bugs.webkit.org/show_bug.cgi?id=48771
Added test cases to check the various valid background-clip values.
* fast/css/background-clip-text-expected.txt:
* fast/css/background-clip-values-expected.checksum: Added.
* fast/css/background-clip-values-expected.txt: Added.
* fast/css/background-clip-values.html: Added.
* fast/css/script-tests/background-clip-text.js:
2011-01-18 Chris Fleizach <cfleizach@apple.com>
 
Reviewed by Darin Adler.
......
......@@ -5,6 +5,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS test("background-clip: -webkit-text", "background-clip") is "-webkit-text"
PASS test("background-clip: -webkit-text", "-webkit-background-clip") is null
PASS test("background-clip: content-box", "background-clip") is "content-box"
PASS test("background-clip: padding-box", "background-clip") is "padding-box"
PASS test("background-clip: border-box", "background-clip") is "border-box"
PASS test("background-clip: text", "background-clip") is null
PASS test("background-clip: text", "-webkit-background-clip") is null
PASS test("-webkit-background-clip: -webkit-text", "background-clip") is null
......
fafe81b6ca9645ab386aec2870607c28
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 280x135 [bgcolor=#008000] [border: (15px dashed #000000)]
RenderBlock {DIV} at (0,135) size 280x135 [bgcolor=#008000] [border: (15px dashed #000000)]
RenderBlock {DIV} at (0,270) size 280x135 [bgcolor=#008000] [border: (15px dashed #000000)]
<html>
<head>
<title>Testing Background clip values</title>
<style type="text/css">
div {
border: 15px dashed black;
background-color:green;
padding: 15px 25px;
height: 75px;
width: 200px;
}
#box1 {
background-clip: content-box;
}
#box2 {
background-clip: padding-box;
}
#box3 {
background-clip: border-box;
}
</style>
</head>
<body>
<div id="box1">
<!-- Background color should be clipped to the content box. Padding space is white.-->
</div>
<div id="box2">
<!-- Background color should be clipped to the padding box. Padding space is green.-->
</div>
<div id="box3">
<!--Background color should be clipped to the border box. Green should be visible within the dashed border.-->
</div>
</body>
</html>
......@@ -17,6 +17,10 @@ function test(declaration, property)
shouldBe('test("background-clip: -webkit-text", "background-clip")', '"-webkit-text"');
shouldBe('test("background-clip: -webkit-text", "-webkit-background-clip")', 'null');
shouldBe('test("background-clip: content-box", "background-clip")', '"content-box"');
shouldBe('test("background-clip: padding-box", "background-clip")', '"padding-box"');
shouldBe('test("background-clip: border-box", "background-clip")', '"border-box"');
shouldBe('test("background-clip: text", "background-clip")', 'null');
shouldBe('test("background-clip: text", "-webkit-background-clip")', 'null');
......
......@@ -1872,7 +1872,8 @@ void CSSParser::addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval)
static bool parseBackgroundClip(CSSParserValue* parserValue, RefPtr<CSSValue>& cssValue)
{
if (parserValue->id == CSSValueBorderBox || parserValue->id == CSSValuePaddingBox || parserValue->id == CSSValueWebkitText) {
if (parserValue->id == CSSValueBorderBox || parserValue->id == CSSValuePaddingBox
|| parserValue->id == CSSValueContentBox || parserValue->id == CSSValueWebkitText) {
cssValue = CSSPrimitiveValue::createIdentifier(parserValue->id);
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment