Source/WebCore/ChangeLog

 12012-04-26 Rob Buis <rbuis@rim.com>
 2
 3 SVG inline style of 'marker-*' does not override
 4 https://bugs.webkit.org/show_bug.cgi?id=84824
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Properly handle CSSValueNone for clip-path, filter, mask and marker-* properties. Instead
 9 of bailing out, set the none value explicitly, since an earlier match may have set it to
 10 something other than none.
 11
 12 Tests: svg/custom/inline-style-overrides-clipPath-expected.svg
 13 svg/custom/inline-style-overrides-clipPath.svg
 14 svg/custom/inline-style-overrides-filter-expected.svg
 15 svg/custom/inline-style-overrides-filter.svg
 16 svg/custom/inline-style-overrides-markers-expected.svg
 17 svg/custom/inline-style-overrides-markers.svg
 18 svg/custom/inline-style-overrides-mask-expected.svg
 19 svg/custom/inline-style-overrides-mask.svg
 20
 21 * css/SVGCSSStyleSelector.cpp:
 22 (WebCore::StyleResolver::applySVGProperty):
 23
1242012-04-24 Andreas Kling <kling@webkit.org>
225
326 REGRESSION(r115099): html5lib/runner.html crashes.

Source/WebCore/css/SVGCSSStyleSelector.cpp

@@void StyleResolver::applySVGProperty(CSSPropertyID id, CSSValue* value)
357357 int type = primitiveValue->primitiveType();
358358 if (type == CSSPrimitiveValue::CSS_URI)
359359 s = primitiveValue->getStringValue();
360  else
361  return;
362360
363361 svgstyle->setMarkerStartResource(SVGURIReference::fragmentIdentifierFromIRIString(s, m_element->document()));
364362 break;

@@void StyleResolver::applySVGProperty(CSSPropertyID id, CSSValue* value)
373371 int type = primitiveValue->primitiveType();
374372 if (type == CSSPrimitiveValue::CSS_URI)
375373 s = primitiveValue->getStringValue();
376  else
377  return;
378374
379375 svgstyle->setMarkerMidResource(SVGURIReference::fragmentIdentifierFromIRIString(s, m_element->document()));
380376 break;

@@void StyleResolver::applySVGProperty(CSSPropertyID id, CSSValue* value)
389385 int type = primitiveValue->primitiveType();
390386 if (type == CSSPrimitiveValue::CSS_URI)
391387 s = primitiveValue->getStringValue();
392  else
393  return;
394388
395389 svgstyle->setMarkerEndResource(SVGURIReference::fragmentIdentifierFromIRIString(s, m_element->document()));
396390 break;

@@void StyleResolver::applySVGProperty(CSSPropertyID id, CSSValue* value)
428422 int type = primitiveValue->primitiveType();
429423 if (type == CSSPrimitiveValue::CSS_URI)
430424 s = primitiveValue->getStringValue();
431  else
432  return;
433425
434426 svgstyle->setFilterResource(SVGURIReference::fragmentIdentifierFromIRIString(s, m_element->document()));
435427 break;

@@void StyleResolver::applySVGProperty(CSSPropertyID id, CSSValue* value)
444436 int type = primitiveValue->primitiveType();
445437 if (type == CSSPrimitiveValue::CSS_URI)
446438 s = primitiveValue->getStringValue();
447  else
448  return;
449439
450440 svgstyle->setMaskerResource(SVGURIReference::fragmentIdentifierFromIRIString(s, m_element->document()));
451441 break;

@@void StyleResolver::applySVGProperty(CSSPropertyID id, CSSValue* value)
460450 int type = primitiveValue->primitiveType();
461451 if (type == CSSPrimitiveValue::CSS_URI)
462452 s = primitiveValue->getStringValue();
463  else
464  return;
465453
466454 svgstyle->setClipperResource(SVGURIReference::fragmentIdentifierFromIRIString(s, m_element->document()));
467455 break;

LayoutTests/ChangeLog

 12012-04-26 Rob Buis <rbuis@rim.com>
 2
 3 SVG inline style of 'marker-*' does not override
 4 https://bugs.webkit.org/show_bug.cgi?id=84824
 5
 6 Add tests for clip-path, filter, mask and marker-* properties.
 7
 8 Reviewed by NOBODY (OOPS!).
 9
 10 * svg/custom/inline-style-overrides-clipPath-expected.svg: Added.
 11 * svg/custom/inline-style-overrides-clipPath.svg: Added.
 12 * svg/custom/inline-style-overrides-filter-expected.svg: Added.
 13 * svg/custom/inline-style-overrides-filter.svg: Added.
 14 * svg/custom/inline-style-overrides-markers-expected.svg: Added.
 15 * svg/custom/inline-style-overrides-markers.svg: Added.
 16 * svg/custom/inline-style-overrides-mask-expected.svg: Added.
 17 * svg/custom/inline-style-overrides-mask.svg: Added.
 18
1192012-04-24 Rob Buis <rbuis@rim.com>
220
321 REGRESSION (r115083-r115087): 6 tests failing on Lion Release (WebKit2 Tests)

LayoutTests/svg/custom/inline-style-overrides-clipPath-expected.svg

 1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 2 <rect width="100" height="100" style="fill:green"/>
 3</svg>

LayoutTests/svg/custom/inline-style-overrides-clipPath.svg

 1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 2 <style type="text/css"><![CDATA[
 3 rect {
 4 fill: green;
 5 clip-path: url(#path);
 6 }
 7 ]]>
 8 </style>
 9 <defs>
 10 <clipPath id="path">
 11 <rect width="50" height="50" />
 12 </clipPath>
 13 </defs>
 14
 15 <rect width="100" height="100" style="clip-path: none;" />
 16</svg>

LayoutTests/svg/custom/inline-style-overrides-filter-expected.svg

 1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 2 <rect width="100" height="100" style="fill:green"/>
 3</svg>

LayoutTests/svg/custom/inline-style-overrides-filter.svg

 1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 2 <style type="text/css"><![CDATA[
 3 rect {
 4 fill: green;
 5 filter: url(#filter);
 6 }
 7 ]]>
 8 </style>
 9 <defs>
 10 <filter id="filter" filterUnits="userSpaceOnUse" x="0" y="0" width="100" height="100">
 11 <feGaussianBlur in="SourceAlpha" stdDeviation="4" />
 12 </filter>
 13 </defs>
 14
 15 <rect width="100" height="100" style="filter: none;" />
 16</svg>

LayoutTests/svg/custom/inline-style-overrides-markers-expected.svg

 1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/>

LayoutTests/svg/custom/inline-style-overrides-markers.svg

 1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 2 <style type="text/css"><![CDATA[
 3 line {
 4 stroke: green;
 5 stroke-width: 50px;
 6 marker-start: url(#marker);
 7 marker-mid: url(#marker);
 8 marker-end: url(#marker);
 9 }
 10 ]]>
 11 </style>
 12 <defs>
 13 <marker id="marker" viewBox="0 0 10 10" refX="1" refY="5"
 14 markerUnits="strokeWidth" orient="auto"
 15 markerWidth="2" markerHeight="2">
 16 <polyline points="0,0 10,0 10,10 0,10 0,0" fill="red" />
 17 </marker>
 18 </defs>
 19
 20 <line x1="100" y1="100" x2="100" y2="100" style="marker-start: none;marker-mid: none;marker-end: none;" />
 21</svg>

LayoutTests/svg/custom/inline-style-overrides-mask-expected.svg

 1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 2 <rect width="100" height="100" style="fill:green"/>
 3</svg>

LayoutTests/svg/custom/inline-style-overrides-mask.svg

 1<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 2 <style type="text/css"><![CDATA[
 3 #rect {
 4 fill: green;
 5 mask: url(#mask);
 6 }
 7 ]]>
 8 </style>
 9 <defs>
 10 <mask id="mask" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100">
 11 <rect x="0" y="0" width="100" height="100" fill="black"/>
 12 </mask>
 13 </defs>
 14
 15 <rect width="100" height="100" style="fill: red;" />
 16 <rect id="rect" width="100" height="100" style="mask: none;" />
 17</svg>