ASSERTION FAILED: !value || (value->isPrimitiveValue()) in...

ASSERTION FAILED: !value || (value->isPrimitiveValue()) in WebCore::StyleProperties::getLayeredShorthandValue.
https://bugs.webkit.org/show_bug.cgi?id=125146

Patch by László Langó <lango@inf.u-szeged.hu> on 2013-12-03
Reviewed by Darin Adler.

Source/WebCore:

Do not presume that |yValue| is primitive if |value| is implicit in StylePropertySerializer.
An implicit y-value can become explicit if specified as a separate longhand.
At the same time, its new value can be non-primitive.

Backported from Blink:
http://src.chromium.org/viewvc/blink?view=rev&rev=153678

Test: fast/css/webkit-mask-crash-implicit.html

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getLayeredShorthandValue):

LayoutTests:

* fast/css/webkit-mask-crash-implicit-expected.txt: Added.
* fast/css/webkit-mask-crash-implicit.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4acccd43
2013-12-03 László Langó <lango@inf.u-szeged.hu>
ASSERTION FAILED: !value || (value->isPrimitiveValue()) in WebCore::StyleProperties::getLayeredShorthandValue.
https://bugs.webkit.org/show_bug.cgi?id=125146
Reviewed by Darin Adler.
* fast/css/webkit-mask-crash-implicit-expected.txt: Added.
* fast/css/webkit-mask-crash-implicit.html: Added.
2013-12-03 Rob Buis <rob.buis@samsung.com>
[css shapes] layout for new ellipse syntax
......
FAIL document.styleSheets[1].rules[0].style.cssText should be -webkit-mask-repeat: repeat-x; -webkit-mask-repeat-y: inherit;. Was -webkit-mask: inherit;.
FAIL document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask') should be . Was inherit.
FAIL document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat') should be repeat inherit. Was inherit.
<!DOCTYPE html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<style>
.box {
-webkit-mask-repeat: repeat-x; -webkit-mask-repeat-y: inherit;
}
</style>
<script>
if (window.internals)
testRunner.dumpAsText();
shouldBeEqualToString("document.styleSheets[1].rules[0].style.cssText", "-webkit-mask-repeat: repeat-x; -webkit-mask-repeat-y: inherit;");
shouldBeEqualToString("document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask')", "");
shouldBeEqualToString("document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat')", "repeat inherit");
</script>
</head>
<body>
</body>
</html>
\ No newline at end of file
2013-12-03 László Langó <lango@inf.u-szeged.hu>
ASSERTION FAILED: !value || (value->isPrimitiveValue()) in WebCore::StyleProperties::getLayeredShorthandValue.
https://bugs.webkit.org/show_bug.cgi?id=125146
Reviewed by Darin Adler.
Do not presume that |yValue| is primitive if |value| is implicit in StylePropertySerializer.
An implicit y-value can become explicit if specified as a separate longhand.
At the same time, its new value can be non-primitive.
Backported from Blink:
http://src.chromium.org/viewvc/blink?view=rev&rev=153678
Test: fast/css/webkit-mask-crash-implicit.html
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getLayeredShorthandValue):
2013-12-03 Rob Buis <rob.buis@samsung.com>
Fix build break after r160007.
......@@ -411,6 +411,9 @@ String StyleProperties::getLayeredShorthandValue(const StylePropertyShorthand& s
else
yValue = nextValue;
if (!value->isPrimitiveValue() || !yValue->isPrimitiveValue())
continue;
CSSValueID xId = toCSSPrimitiveValue(value.get())->getValueID();
CSSValueID yId = toCSSPrimitiveValue(yValue.get())->getValueID();
if (xId != yId) {
......
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