[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
simon.fraser at apple.com
simon.fraser at apple.com
Wed Dec 22 15:20:51 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 8987f0b76f884f236a308a31f5b9ce60f5e8754a
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 1 20:39:48 2010 +0000
2010-11-01 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dave Hyatt.
Multiple background properties are not retrievable via DOM method getComputedStyle
https://bugs.webkit.org/show_bug.cgi?id=23203
Return lists of values from getComputedStyle() for multiple backgrounds,
and multiple masks.
Test: fast/backgrounds/multiple-backgrounds-computed-style.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fillSizeToCSSValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 11206cd..4d382f2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-01 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Multiple background properties are not retrievable via DOM method getComputedStyle
+ https://bugs.webkit.org/show_bug.cgi?id=23203
+
+ Script test for multiple backgrounds and masks in getComputedStyle().
+
+ * fast/backgrounds/multiple-backgrounds-computed-style-expected.txt: Added.
+ * fast/backgrounds/multiple-backgrounds-computed-style.html: Added.
+ * fast/backgrounds/script-tests/TEMPLATE.html: Added.
+ * fast/backgrounds/script-tests/multiple-backgrounds-computed-style.js: Added.
+ (test):
+
2010-11-01 Mihai Parparita <mihaip at chromium.org>
Update the pixel expectations for fast/block/positioning for the Mac port.
diff --git a/LayoutTests/fast/backgrounds/multiple-backgrounds-computed-style-expected.txt b/LayoutTests/fast/backgrounds/multiple-backgrounds-computed-style-expected.txt
new file mode 100644
index 0000000..2dad0aa
--- /dev/null
+++ b/LayoutTests/fast/backgrounds/multiple-backgrounds-computed-style-expected.txt
@@ -0,0 +1,37 @@
+Blocked access to external URL http://example.com/foo.png
+Blocked access to external URL http://example.com/bar.png
+This tests checks that all of the input values for background-repeat parse correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("backgroundImage", "background: none 10px 10px, url(http://example.com/foo.png) 20px 20px;") is "none, url(http://example.com/foo.png)"
+PASS test("backgroundPosition", "background: none 10px 10px, url(http://example.com/foo.png) 20px 20px;") is "10px 10px, 20px 20px"
+PASS test("backgroundImage", "background-image: url(http://example.com/foo.png), none, url(http://example.com/bar.png);") is "url(http://example.com/foo.png), none, url(http://example.com/bar.png)"
+PASS test("backgroundRepeat", "background-repeat: repeat-x, repeat-y, repeat, no-repeat;") is "repeat-x, repeat-y, repeat, no-repeat"
+PASS test("backgroundSize", "background-size: contain, cover, 20px 10%;") is "contain, cover, 20px 10%"
+PASS test("webkitBackgroundSize", "-webkit-background-size: contain, cover, 20px 10%;") is "contain, cover, 20px 10%"
+PASS test("webkitBackgroundComposite", "-webkit-background-composite: source-over, copy, destination-in") is "source-over, copy, destination-in"
+PASS test("backgroundAttachment", "background-attachment: fixed, scroll, local;") is "fixed, scroll, local"
+PASS test("backgroundClip", "background-clip: border-box, padding-box;") is "border-box, padding-box"
+PASS test("webkitBackgroundClip", "-webkit-background-clip: border-box, padding-box;") is "border-box, padding-box"
+PASS test("backgroundOrigin", "background-origin: border-box, padding-box, content-box;") is "border-box, padding-box, content-box"
+PASS test("webkitBackgroundOrigin", "-webkit-background-origin: border-box, padding-box, content-box;") is "border-box, padding-box, content-box"
+PASS test("backgroundPosition", "background-position: 20px 30px, 10% 90%, top, left, center;") is "20px 30px, 10% 90%, 50% 0%, 0% 50%, 50% 50%"
+PASS test("backgroundPositionX", "background-position-x: 20px, 10%, right, left, center;") is "20px, 10%, 100%, 0%, 50%"
+PASS test("backgroundPositionY", "background-position-y: 20px, 10%, bottom, top, center;") is "20px, 10%, 100%, 0%, 50%"
+PASS test("webkitMaskImage", "-webkit-mask: none 10px 10px, url(http://example.com/foo.png) 20px 20px;") is "none, url(http://example.com/foo.png)"
+PASS test("webkitMaskPosition", "-webkit-mask: none 10px 10px, url(http://example.com/foo.png) 20px 20px;") is "10px 10px, 20px 20px"
+PASS test("webkitMaskImage", "-webkit-mask-image: none, url(http://example.com/bar.png);") is "none, url(http://example.com/bar.png)"
+PASS test("webkitMaskSize", "-webkit-mask-size: contain, cover, 20px 10%;") is "contain, cover, 20px 10%"
+PASS test("webkitMaskRepeat", "-webkit-mask-repeat: repeat-x, repeat-y, repeat, no-repeat;") is "repeat-x, repeat-y, repeat, no-repeat"
+PASS test("webkitMaskClip", "-webkit-mask-clip: border-box, padding-box;") is "border-box, padding-box"
+PASS test("webkitMaskOrigin", "-webkit-mask-origin: border-box, padding-box, content-box;") is "border-box, padding-box, content-box"
+PASS test("webkitMaskPosition", "-webkit-mask-position: 20px 30px, 10% 90%, top, left, center;") is "20px 30px, 10% 90%, 50% 0%, 0% 50%, 50% 50%"
+PASS test("webkitMaskPositionX", "-webkit-mask-position-x: 20px, 10%, right, left, center;") is "20px, 10%, 100%, 0%, 50%"
+PASS test("webkitMaskPositionY", "-webkit-mask-position-y: 20px, 10%, bottom, top, center;") is "20px, 10%, 100%, 0%, 50%"
+PASS test("webkitMaskComposite", "-webkit-mask-composite: source-over, copy, destination-in") is "source-over, copy, destination-in"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/backgrounds/multiple-backgrounds-computed-style.html b/LayoutTests/fast/backgrounds/multiple-backgrounds-computed-style.html
new file mode 100644
index 0000000..ec238fa
--- /dev/null
+++ b/LayoutTests/fast/backgrounds/multiple-backgrounds-computed-style.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/multiple-backgrounds-computed-style.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/backgrounds/script-tests/TEMPLATE.html b/LayoutTests/fast/backgrounds/script-tests/TEMPLATE.html
new file mode 100644
index 0000000..dc61cc8
--- /dev/null
+++ b/LayoutTests/fast/backgrounds/script-tests/TEMPLATE.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/backgrounds/script-tests/multiple-backgrounds-computed-style.js b/LayoutTests/fast/backgrounds/script-tests/multiple-backgrounds-computed-style.js
new file mode 100644
index 0000000..2a30520
--- /dev/null
+++ b/LayoutTests/fast/backgrounds/script-tests/multiple-backgrounds-computed-style.js
@@ -0,0 +1,48 @@
+description("This tests checks that all of the input values for background-repeat parse correctly.");
+
+function test(property, value)
+{
+ var div = document.createElement("div");
+ div.setAttribute("style", value);
+ document.body.appendChild(div);
+
+ var result = window.getComputedStyle(div, property)[property];
+ document.body.removeChild(div);
+ return result;
+}
+
+// shorthands
+shouldBe('test("backgroundImage", "background: none 10px 10px, url(http://example.com/foo.png) 20px 20px;")', '"none, url(http://example.com/foo.png)"');
+shouldBe('test("backgroundPosition", "background: none 10px 10px, url(http://example.com/foo.png) 20px 20px;")', '"10px 10px, 20px 20px"');
+
+// background longhands
+shouldBe('test("backgroundImage", "background-image: url(http://example.com/foo.png), none, url(http://example.com/bar.png);")', '"url(http://example.com/foo.png), none, url(http://example.com/bar.png)"');
+shouldBe('test("backgroundRepeat", "background-repeat: repeat-x, repeat-y, repeat, no-repeat;")', '"repeat-x, repeat-y, repeat, no-repeat"');
+shouldBe('test("backgroundSize", "background-size: contain, cover, 20px 10%;")', '"contain, cover, 20px 10%"');
+shouldBe('test("webkitBackgroundSize", "-webkit-background-size: contain, cover, 20px 10%;")', '"contain, cover, 20px 10%"');
+shouldBe('test("webkitBackgroundComposite", "-webkit-background-composite: source-over, copy, destination-in")', '"source-over, copy, destination-in"');
+shouldBe('test("backgroundAttachment", "background-attachment: fixed, scroll, local;")', '"fixed, scroll, local"');
+shouldBe('test("backgroundClip", "background-clip: border-box, padding-box;")', '"border-box, padding-box"');
+shouldBe('test("webkitBackgroundClip", "-webkit-background-clip: border-box, padding-box;")', '"border-box, padding-box"');
+shouldBe('test("backgroundOrigin", "background-origin: border-box, padding-box, content-box;")', '"border-box, padding-box, content-box"');
+shouldBe('test("webkitBackgroundOrigin", "-webkit-background-origin: border-box, padding-box, content-box;")', '"border-box, padding-box, content-box"');
+shouldBe('test("backgroundPosition", "background-position: 20px 30px, 10% 90%, top, left, center;")', '"20px 30px, 10% 90%, 50% 0%, 0% 50%, 50% 50%"');
+shouldBe('test("backgroundPositionX", "background-position-x: 20px, 10%, right, left, center;")', '"20px, 10%, 100%, 0%, 50%"');
+shouldBe('test("backgroundPositionY", "background-position-y: 20px, 10%, bottom, top, center;")', '"20px, 10%, 100%, 0%, 50%"');
+
+// mask shorthands
+shouldBe('test("webkitMaskImage", "-webkit-mask: none 10px 10px, url(http://example.com/foo.png) 20px 20px;")', '"none, url(http://example.com/foo.png)"');
+shouldBe('test("webkitMaskPosition", "-webkit-mask: none 10px 10px, url(http://example.com/foo.png) 20px 20px;")', '"10px 10px, 20px 20px"');
+
+// mask longhands
+shouldBe('test("webkitMaskImage", "-webkit-mask-image: none, url(http://example.com/bar.png);")', '"none, url(http://example.com/bar.png)"');
+shouldBe('test("webkitMaskSize", "-webkit-mask-size: contain, cover, 20px 10%;")', '"contain, cover, 20px 10%"');
+shouldBe('test("webkitMaskRepeat", "-webkit-mask-repeat: repeat-x, repeat-y, repeat, no-repeat;")', '"repeat-x, repeat-y, repeat, no-repeat"');
+shouldBe('test("webkitMaskClip", "-webkit-mask-clip: border-box, padding-box;")', '"border-box, padding-box"');
+shouldBe('test("webkitMaskOrigin", "-webkit-mask-origin: border-box, padding-box, content-box;")', '"border-box, padding-box, content-box"');
+shouldBe('test("webkitMaskPosition", "-webkit-mask-position: 20px 30px, 10% 90%, top, left, center;")', '"20px 30px, 10% 90%, 50% 0%, 0% 50%, 50% 50%"');
+shouldBe('test("webkitMaskPositionX", "-webkit-mask-position-x: 20px, 10%, right, left, center;")', '"20px, 10%, 100%, 0%, 50%"');
+shouldBe('test("webkitMaskPositionY", "-webkit-mask-position-y: 20px, 10%, bottom, top, center;")', '"20px, 10%, 100%, 0%, 50%"');
+shouldBe('test("webkitMaskComposite", "-webkit-mask-composite: source-over, copy, destination-in")', '"source-over, copy, destination-in"');
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9204088..393e522 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-01 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Multiple background properties are not retrievable via DOM method getComputedStyle
+ https://bugs.webkit.org/show_bug.cgi?id=23203
+
+ Return lists of values from getComputedStyle() for multiple backgrounds,
+ and multiple masks.
+
+ Test: fast/backgrounds/multiple-backgrounds-computed-style.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::fillSizeToCSSValue):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
2010-11-01 David Hyatt <hyatt at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index fdcab28..faa1771 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -700,6 +700,20 @@ static PassRefPtr<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepea
return list.release();
}
+static PassRefPtr<CSSValue> fillSizeToCSSValue(const FillSize& fillSize)
+{
+ if (fillSize.type == Contain)
+ return CSSPrimitiveValue::createIdentifier(CSSValueContain);
+
+ if (fillSize.type == Cover)
+ return CSSPrimitiveValue::createIdentifier(CSSValueCover);
+
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ list->append(CSSPrimitiveValue::create(fillSize.size.width()));
+ list->append(CSSPrimitiveValue::create(fillSize.size.height()));
+ return list.release();
+}
+
static void logUnimplementedPropertyID(int propertyID)
{
DEFINE_STATIC_LOCAL(HashSet<int>, propertyIDSet, ());
@@ -743,47 +757,141 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
case CSSPropertyBackgroundColor:
return CSSPrimitiveValue::createColor(m_allowVisitedStyle? style->visitedDependentColor(CSSPropertyBackgroundColor).rgb() : style->backgroundColor().rgb());
case CSSPropertyBackgroundImage:
- // FIXME: Broken for multiple backgrounds. https://bugs.webkit.org/show_bug.cgi?id=44853
- if (style->backgroundImage())
- return style->backgroundImage()->cssValue();
- return CSSPrimitiveValue::createIdentifier(CSSValueNone);
+ case CSSPropertyWebkitMaskImage: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskImage ? style->maskLayers() : style->backgroundLayers();
+ if (!layers)
+ return CSSPrimitiveValue::createIdentifier(CSSValueNone);
+
+ if (!layers->next()) {
+ if (layers->image())
+ return layers->image()->cssValue();
+
+ return CSSPrimitiveValue::createIdentifier(CSSValueNone);
+ }
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
+ if (currLayer->image())
+ list->append(currLayer->image()->cssValue());
+ else
+ list->append(CSSPrimitiveValue::createIdentifier(CSSValueNone));
+ }
+ return list.release();
+ }
case CSSPropertyBackgroundSize:
- case CSSPropertyWebkitBackgroundSize: {
- EFillSizeType size = style->backgroundSizeType();
- if (size == Contain)
- return CSSPrimitiveValue::createIdentifier(CSSValueContain);
- if (size == Cover)
- return CSSPrimitiveValue::createIdentifier(CSSValueCover);
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- list->append(CSSPrimitiveValue::create(style->backgroundSizeLength().width()));
- list->append(CSSPrimitiveValue::create(style->backgroundSizeLength().height()));
+ case CSSPropertyWebkitBackgroundSize:
+ case CSSPropertyWebkitMaskSize: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskSize ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return fillSizeToCSSValue(layers->size());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(fillSizeToCSSValue(currLayer->size()));
+
return list.release();
- }
+ }
case CSSPropertyBackgroundRepeat:
- return fillRepeatToCSSValue(style->backgroundRepeatX(), style->backgroundRepeatY());
+ case CSSPropertyWebkitMaskRepeat: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskRepeat ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return fillRepeatToCSSValue(layers->repeatX(), layers->repeatY());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(fillRepeatToCSSValue(currLayer->repeatX(), currLayer->repeatY()));
+
+ return list.release();
+ }
case CSSPropertyWebkitBackgroundComposite:
- return CSSPrimitiveValue::create(style->backgroundComposite());
+ case CSSPropertyWebkitMaskComposite: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskComposite ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return CSSPrimitiveValue::create(layers->composite());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(CSSPrimitiveValue::create(currLayer->composite()));
+
+ return list.release();
+ }
case CSSPropertyBackgroundAttachment:
- return CSSPrimitiveValue::create(style->backgroundAttachment());
+ case CSSPropertyWebkitMaskAttachment: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskAttachment ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return CSSPrimitiveValue::create(layers->attachment());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(CSSPrimitiveValue::create(currLayer->attachment()));
+
+ return list.release();
+ }
case CSSPropertyBackgroundClip:
case CSSPropertyBackgroundOrigin:
case CSSPropertyWebkitBackgroundClip:
- case CSSPropertyWebkitBackgroundOrigin: {
- EFillBox box = (propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyBackgroundClip) ? style->backgroundClip() : style->backgroundOrigin();
- return CSSPrimitiveValue::create(box);
+ case CSSPropertyWebkitBackgroundOrigin:
+ case CSSPropertyWebkitMaskClip:
+ case CSSPropertyWebkitMaskOrigin: {
+ const FillLayer* layers = (propertyID == CSSPropertyWebkitMaskClip || propertyID == CSSPropertyWebkitMaskOrigin) ? style->maskLayers() : style->backgroundLayers();
+ bool isClip = propertyID == CSSPropertyBackgroundClip || propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyWebkitMaskClip;
+ if (!layers->next()) {
+ EFillBox box = isClip ? layers->clip() : layers->origin();
+ return CSSPrimitiveValue::create(box);
+ }
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
+ EFillBox box = isClip ? currLayer->clip() : currLayer->origin();
+ list->append(CSSPrimitiveValue::create(box));
+ }
+
+ return list.release();
}
- case CSSPropertyBackgroundPosition: {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ case CSSPropertyBackgroundPosition:
+ case CSSPropertyWebkitMaskPosition: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPosition ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next()) {
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ list->append(CSSPrimitiveValue::create(layers->xPosition()));
+ list->append(CSSPrimitiveValue::create(layers->yPosition()));
+ return list.release();
+ }
- list->append(CSSPrimitiveValue::create(style->backgroundXPosition()));
- list->append(CSSPrimitiveValue::create(style->backgroundYPosition()));
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
+ RefPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated();
+ positionList->append(CSSPrimitiveValue::create(currLayer->xPosition()));
+ positionList->append(CSSPrimitiveValue::create(currLayer->yPosition()));
+ list->append(positionList);
+ }
return list.release();
}
case CSSPropertyBackgroundPositionX:
- return CSSPrimitiveValue::create(style->backgroundXPosition());
+ case CSSPropertyWebkitMaskPositionX: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPositionX ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return CSSPrimitiveValue::create(layers->xPosition());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(CSSPrimitiveValue::create(currLayer->xPosition()));
+
+ return list.release();
+ }
case CSSPropertyBackgroundPositionY:
- return CSSPrimitiveValue::create(style->backgroundYPosition());
+ case CSSPropertyWebkitMaskPositionY: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPositionY ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return CSSPrimitiveValue::create(layers->yPosition());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(CSSPrimitiveValue::create(currLayer->yPosition()));
+
+ return list.release();
+ }
case CSSPropertyBorderCollapse:
if (style->borderCollapse())
return CSSPrimitiveValue::createIdentifier(CSSValueCollapse);
@@ -1032,44 +1140,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
return CSSPrimitiveValue::create(style->marqueeLoopCount(), CSSPrimitiveValue::CSS_NUMBER);
case CSSPropertyWebkitMarqueeStyle:
return CSSPrimitiveValue::create(style->marqueeBehavior());
- case CSSPropertyWebkitMaskImage:
- if (style->maskImage())
- return style->maskImage()->cssValue();
- return CSSPrimitiveValue::createIdentifier(CSSValueNone);
- case CSSPropertyWebkitMaskSize: {
- EFillSizeType size = style->maskSizeType();
- if (size == Contain)
- return CSSPrimitiveValue::createIdentifier(CSSValueContain);
- if (size == Cover)
- return CSSPrimitiveValue::createIdentifier(CSSValueCover);
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- list->append(CSSPrimitiveValue::create(style->maskSizeLength().width()));
- list->append(CSSPrimitiveValue::create(style->maskSizeLength().height()));
- return list.release();
- }
- case CSSPropertyWebkitMaskRepeat:
- return fillRepeatToCSSValue(style->maskRepeatX(), style->maskRepeatY());
- case CSSPropertyWebkitMaskAttachment:
- return CSSPrimitiveValue::create(style->maskAttachment());
- case CSSPropertyWebkitMaskComposite:
- return CSSPrimitiveValue::create(style->maskComposite());
- case CSSPropertyWebkitMaskClip:
- case CSSPropertyWebkitMaskOrigin: {
- EFillBox box = (propertyID == CSSPropertyWebkitMaskClip ? style->maskClip() : style->maskOrigin());
- return CSSPrimitiveValue::create(box);
- }
- case CSSPropertyWebkitMaskPosition: {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-
- list->append(CSSPrimitiveValue::create(style->maskXPosition()));
- list->append(CSSPrimitiveValue::create(style->maskYPosition()));
-
- return list.release();
- }
- case CSSPropertyWebkitMaskPositionX:
- return CSSPrimitiveValue::create(style->maskXPosition());
- case CSSPropertyWebkitMaskPositionY:
- return CSSPrimitiveValue::create(style->maskYPosition());
case CSSPropertyWebkitUserModify:
return CSSPrimitiveValue::create(style->userModify());
case CSSPropertyMaxHeight: {
@@ -1327,9 +1397,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const AnimationList* t = style->animations();
if (t) {
- for (size_t i = 0; i < t->size(); ++i) {
+ for (size_t i = 0; i < t->size(); ++i)
list->append(CSSPrimitiveValue::create(t->animation(i)->name(), CSSPrimitiveValue::CSS_STRING));
- }
} else
list->append(CSSPrimitiveValue::createIdentifier(CSSValueNone));
return list.release();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list