<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[171591] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/171591">171591</a></dd>
<dt>Author</dt> <dd>krit@webkit.org</dd>
<dt>Date</dt> <dd>2014-07-25 02:52:25 -0700 (Fri, 25 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Turn x/y to presentation attributes
https://bugs.webkit.org/show_bug.cgi?id=135215
Source/WebCore:
Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24
Reviewed by Dean Jackson.
This follows the patch for width and height presentation attributes and
turns x and y to presentation attributes as well:
http://trac.webkit.org/changeset/171341
Tests: svg/css/parse-length.html
transitions/svg-layout-transition.html
Added copyright where I forgot it in previous patch.
* css/CSSComputedStyleDeclaration.cpp: Computed style of x and y.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID): Add x and y to list.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y.
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue): Parse x and y property.
* css/SVGCSSPropertyNames.in: Add x and y to list of names.
* css/StyleResolver.h:
* page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length.
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/style/RenderStyle.h: Add x and y setters and getters.
* rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData.
(WebCore::SVGRenderStyle::SVGRenderStyle):
(WebCore::SVGRenderStyle::operator==):
(WebCore::SVGRenderStyle::copyNonInheritedFrom):
(WebCore::SVGRenderStyle::diff):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::setX):
(WebCore::SVGRenderStyle::setY):
(WebCore::SVGRenderStyle::x):
(WebCore::SVGRenderStyle::y):
* rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing.
(WebCore::StyleLayoutData::StyleLayoutData):
(WebCore::StyleLayoutData::copy):
(WebCore::StyleLayoutData::operator==):
* rendering/style/SVGRenderStyleDefs.h:
(WebCore::StyleLayoutData::create):
(WebCore::StyleLayoutData::operator!=):
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::updateShapeFromElement):
* rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values.
(WebCore::updatePathFromRectElement):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection.
* svg/SVGElement.cpp: Add x and y to the relevant property lists.
(WebCore::populateAttributeNameToCSSPropertyIDMap):
(WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
* svg/SVGFilterElement.cpp: Style update on change of x and y.
(WebCore::SVGFilterElement::svgAttributeChanged):
* svg/SVGMaskElement.cpp: Ditto.
(WebCore::SVGMaskElement::svgAttributeChanged):
* svg/SVGPatternElement.cpp: Ditto.
(WebCore::SVGPatternElement::svgAttributeChanged):
* svg/SVGRectElement.cpp: Ditto.
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they
are lists instead of individual values. Solution about to be discussed
in the WG. Keep current behavior for now.
(WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute):
(WebCore::SVGTextPositioningElement::isPresentationAttribute):
* svg/SVGTextPositioningElement.h:
LayoutTests:
Test parsing of x and y attributes. Rendering and SVG animation
covered by existing tests.
CSS Transition test, test transition from specified attribute value
to new property value.
Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24
Reviewed by Dean Jackson.
* svg/css/parse-length-expected.txt: Added.
* svg/css/parse-length.html: Renamed from LayoutTests/svg/css/parse-width.html.
* svg/css/parse-width-expected.txt: Removed.
* transitions/svg-layout-transition-expected.txt: Added.
* transitions/svg-layout-transition.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSParsercpp">trunk/Source/WebCore/css/SVGCSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSVGCSSPropertyNamesin">trunk/Source/WebCore/css/SVGCSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolverh">trunk/Source/WebCore/css/StyleResolver.h</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleSVGRenderStylecpp">trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleSVGRenderStyleh">trunk/Source/WebCore/rendering/style/SVGRenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleSVGRenderStyleDefscpp">trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleSVGRenderStyleDefsh">trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRectcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGPathDatacpp">trunk/Source/WebCore/rendering/svg/SVGPathData.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateElementcpp">trunk/Source/WebCore/svg/SVGAnimateElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimationElementcpp">trunk/Source/WebCore/svg/SVGAnimationElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementcpp">trunk/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFilterElementcpp">trunk/Source/WebCore/svg/SVGFilterElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGForeignObjectElementcpp">trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGImageElementcpp">trunk/Source/WebCore/svg/SVGImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLengthContextcpp">trunk/Source/WebCore/svg/SVGLengthContext.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGMaskElementcpp">trunk/Source/WebCore/svg/SVGMaskElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPatternElementcpp">trunk/Source/WebCore/svg/SVGPatternElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGRectElementcpp">trunk/Source/WebCore/svg/SVGRectElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGSVGElementcpp">trunk/Source/WebCore/svg/SVGSVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTextPositioningElementcpp">trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTextPositioningElementh">trunk/Source/WebCore/svg/SVGTextPositioningElement.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvgcssparselengthexpectedtxt">trunk/LayoutTests/svg/css/parse-length-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcssparselengthhtml">trunk/LayoutTests/svg/css/parse-length.html</a></li>
<li><a href="#trunkLayoutTeststransitionssvglayouttransitionexpectedtxt">trunk/LayoutTests/transitions/svg-layout-transition-expected.txt</a></li>
<li><a href="#trunkLayoutTeststransitionssvglayouttransitionhtml">trunk/LayoutTests/transitions/svg-layout-transition.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvgcssparsewidthexpectedtxt">trunk/LayoutTests/svg/css/parse-width-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcssparsewidthhtml">trunk/LayoutTests/svg/css/parse-width.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/LayoutTests/ChangeLog        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-07-24 Dirk Schulze <krit@webkit.org>
+
+ Turn x/y to presentation attributes
+ https://bugs.webkit.org/show_bug.cgi?id=135215
+
+ Test parsing of x and y attributes. Rendering and SVG animation
+ covered by existing tests.
+ CSS Transition test, test transition from specified attribute value
+ to new property value.
+
+ Reviewed by Dean Jackson.
+
+ * svg/css/parse-length-expected.txt: Added.
+ * svg/css/parse-length.html: Renamed from LayoutTests/svg/css/parse-width.html.
+ * svg/css/parse-width-expected.txt: Removed.
+ * transitions/svg-layout-transition-expected.txt: Added.
+ * transitions/svg-layout-transition.html: Added.
+
</ins><span class="cx"> 2014-07-24 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> CSS JIT: Implement Pseudo Element
</span></span></pre></div>
<a id="trunkLayoutTestssvgcssparselengthexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/parse-length-expected.txt (0 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/parse-length-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/css/parse-length-expected.txt        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="auto"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width=" 100"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100 "
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x=" 100"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="100 "
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y=" 100"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="100 "
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100 px"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100px;"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100px !important"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="{ 100px }"
+CONSOLE MESSAGE: Error: Invalid negative value for <rect> attribute width="-100px"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="auto"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="100 px"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="100px;"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="100px !important"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute x="{ 100px }"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="auto"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="100 px"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="100px;"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="100px !important"
+CONSOLE MESSAGE: Error: Invalid value for <rect> attribute y="{ 100px }"
+Test that 'with' presentation attribute is parsed with CSS presentation rules.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS computedStyle("width", "auto") is "auto"
+PASS computedStyle("width", " 100") is "100px"
+PASS computedStyle("width", "100 ") is "100px"
+PASS computedStyle("width", "100px") is "100px"
+PASS computedStyle("width", "1em") is "16px"
+PASS computedStyle("width", "1ex") is "12.800000190734863px"
+PASS computedStyle("width", "20%") is "20%"
+PASS computedStyle("x", " 100") is "100px"
+PASS computedStyle("x", "100 ") is "100px"
+PASS computedStyle("x", "100px") is "100px"
+PASS computedStyle("x", "1em") is "16px"
+PASS computedStyle("x", "1ex") is "12.800000190734863px"
+PASS computedStyle("x", "20%") is "20%"
+PASS computedStyle("x", "-200px") is "-200px"
+PASS computedStyle("y", " 100") is "100px"
+PASS computedStyle("y", "100 ") is "100px"
+PASS computedStyle("y", "100px") is "100px"
+PASS computedStyle("y", "1em") is "16px"
+PASS computedStyle("y", "1ex") is "12.800000190734863px"
+PASS computedStyle("y", "20%") is "20%"
+PASS computedStyle("y", "-200px") is "-200px"
+PASS computedStyle("width", "100 px") is "auto"
+PASS computedStyle("width", "100px;") is "auto"
+PASS computedStyle("width", "100px !important") is "auto"
+PASS computedStyle("width", "{ 100px }") is "auto"
+PASS computedStyle("width", "-100px") is "auto"
+PASS computedStyle("x", "auto") is "0px"
+PASS computedStyle("x", "100 px") is "0px"
+PASS computedStyle("x", "100px;") is "0px"
+PASS computedStyle("x", "100px !important") is "0px"
+PASS computedStyle("x", "{ 100px }") is "0px"
+PASS computedStyle("y", "auto") is "0px"
+PASS computedStyle("y", "100 px") is "0px"
+PASS computedStyle("y", "100px;") is "0px"
+PASS computedStyle("y", "100px !important") is "0px"
+PASS computedStyle("y", "{ 100px }") is "0px"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssparselengthhtmlfromrev171588trunkLayoutTestssvgcssparsewidthhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/svg/css/parse-length.html (from rev 171588, trunk/LayoutTests/svg/css/parse-width.html) (0 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/parse-length.html         (rev 0)
+++ trunk/LayoutTests/svg/css/parse-length.html        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -0,0 +1,88 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<style>
+* { font-size: 16px; }
+svg, rect { font-family: 'Ahem'; }
+div { font-size: 8px; }
+</style>
+<html>
+<svg id="svg" width="0" height="0"></svg>
+<script src="../../resources/js-test-pre.js"></script>
+<script>
+description("Test that 'width' presentation attribute is parsed with CSS presentation rules.");
+
+function computedStyle(property, value) {
+ var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
+ document.getElementById('svg').appendChild(rect);
+ rect.setAttribute(property, value);
+ var computedValue = getComputedStyle(rect).getPropertyValue(property);
+ document.getElementById('svg').removeChild(rect);
+ return computedValue;
+}
+
+function testComputed(property, value, expected) {
+ shouldBeEqualToString('computedStyle("' + property + '", "' + value + '")', expected);
+}
+
+function negativeTest(property, value) {
+ testComputed(property, value, "auto");
+}
+
+function negativeTestZero(property, value) {
+ testComputed(property, value, "0px");
+}
+
+// Test 'width'.
+testComputed("width", "auto", "auto");
+testComputed("width", " 100", "100px");
+testComputed("width", "100 ", "100px");
+testComputed("width", "100px", "100px");
+testComputed("width", "1em", "16px");
+testComputed("width", "1ex", "12.800000190734863px");
+testComputed("width", "20%", "20%");
+// FIXME: Vieport units not implemented for SVG at the moment.
+// testComputed("width", "1vh", "7.869999885559082px");
+// testComputed("width", "1vw", "14.029999732971191px");
+
+// Test 'x'.
+testComputed("x", " 100", "100px");
+testComputed("x", "100 ", "100px");
+testComputed("x", "100px", "100px");
+testComputed("x", "1em", "16px");
+testComputed("x", "1ex", "12.800000190734863px");
+testComputed("x", "20%", "20%");
+testComputed("x", "-200px", "-200px");
+
+// Test 'y'.
+testComputed("y", " 100", "100px");
+testComputed("y", "100 ", "100px");
+testComputed("y", "100px", "100px");
+testComputed("y", "1em", "16px");
+testComputed("y", "1ex", "12.800000190734863px");
+testComputed("y", "20%", "20%");
+testComputed("y", "-200px", "-200px");
+
+// Negative tests for 'width'.
+negativeTest("width", "100 px");
+negativeTest("width", "100px;");
+negativeTest("width", "100px !important");
+negativeTest("width", "{ 100px }");
+negativeTest("width", "-100px");
+
+// Negative tests for 'x'.
+negativeTestZero("x", "auto", "auto");
+negativeTestZero("x", "100 px");
+negativeTestZero("x", "100px;");
+negativeTestZero("x", "100px !important");
+negativeTestZero("x", "{ 100px }");
+
+// Negative tests for 'y'.
+negativeTestZero("y", "auto");
+negativeTestZero("y", "100 px");
+negativeTestZero("y", "100px;");
+negativeTestZero("y", "100px !important");
+negativeTestZero("y", "{ 100px }");
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssparsewidthexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/svg/css/parse-width-expected.txt (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/parse-width-expected.txt        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/LayoutTests/svg/css/parse-width-expected.txt        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>-CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="auto"
-CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width=" 100"
-CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100 "
-CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100 px"
-CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100px;"
-CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="100px !important"
-CONSOLE MESSAGE: Error: Invalid value for <rect> attribute width="{ 100px }"
-CONSOLE MESSAGE: Error: Invalid negative value for <rect> attribute width="-100px"
-Test that 'with' presentation attribute is parsed with CSS presentation rules.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS computedStyle("width", "auto") is "auto"
-PASS computedStyle("width", " 100") is "100px"
-PASS computedStyle("width", "100 ") is "100px"
-PASS computedStyle("width", "100px") is "100px"
-PASS computedStyle("width", "1em") is "16px"
-PASS computedStyle("width", "1ex") is "12.800000190734863px"
-PASS computedStyle("width", "20%") is "20%"
-PASS computedStyle("width", "100 px") is "auto"
-PASS computedStyle("width", "100px;") is "auto"
-PASS computedStyle("width", "100px !important") is "auto"
-PASS computedStyle("width", "{ 100px }") is "auto"
-PASS computedStyle("width", "-100px") is "auto"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestssvgcssparsewidthhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/svg/css/parse-width.html (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/parse-width.html        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/LayoutTests/svg/css/parse-width.html        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<style>
-* { font-size: 16px; }
-svg, rect { font-family: 'Ahem'; }
-div { font-size: 8px; }
-</style>
-<html>
-<svg id="svg" width="0" height="0"></svg>
-<script src="../../resources/js-test-pre.js"></script>
-<script>
-description("Test that 'with' presentation attribute is parsed with CSS presentation rules.");
-
-function computedStyle(property, value) {
- var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
- document.getElementById('svg').appendChild(rect);
- rect.setAttribute(property, value);
- var computedValue = getComputedStyle(rect).getPropertyValue(property);
- document.getElementById('svg').removeChild(rect);
- return computedValue;
-}
-
-function testComputed(property, value, expected) {
- shouldBeEqualToString('computedStyle("' + property + '", "' + value + '")', expected);
-}
-
-function negativeTest(property, value) {
- testComputed(property, value, "auto");
-}
-
-// test mask-image
-testComputed("width", "auto", "auto");
-testComputed("width", " 100", "100px");
-testComputed("width", "100 ", "100px");
-testComputed("width", "100px", "100px");
-testComputed("width", "1em", "16px");
-testComputed("width", "1ex", "12.800000190734863px");
-testComputed("width", "20%", "20%");
-// FIXME: Vieport units not implemented for SVG at the moment.
-// testComputed("width", "1vh", "7.869999885559082px");
-// testComputed("width", "1vw", "14.029999732971191px");
-
-// negative tests
-negativeTest("width", "100 px");
-negativeTest("width", "100px;");
-negativeTest("width", "100px !important");
-negativeTest("width", "{ 100px }");
-negativeTest("width", "-100px");
-
-</script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTeststransitionssvglayouttransitionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/transitions/svg-layout-transition-expected.txt (0 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/transitions/svg-layout-transition-expected.txt         (rev 0)
+++ trunk/LayoutTests/transitions/svg-layout-transition-expected.txt        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+PASS - "x" property for "x" element at 0.5s saw something close to: 150
+PASS - "y" property for "y" element at 0.5s saw something close to: 150
+PASS - "width" property for "width" element at 0.5s saw something close to: 150
+PASS - "height" property for "height" element at 0.5s saw something close to: 150
+
</ins></span></pre></div>
<a id="trunkLayoutTeststransitionssvglayouttransitionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/transitions/svg-layout-transition.html (0 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/transitions/svg-layout-transition.html         (rev 0)
+++ trunk/LayoutTests/transitions/svg-layout-transition.html        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -0,0 +1,74 @@
</span><ins>+<!DOCTYPE>
+
+<html>
+<head>
+ <style>
+ .init {
+ -webkit-transition-duration: 1s;
+ -webkit-transition-timing-function: linear;
+ }
+
+ #x {
+ -webkit-transition-property: x;
+ }
+ #x.final {
+ x: 200px;
+ }
+
+ #y {
+ -webkit-transition-property: y;
+ }
+ #y.final {
+ y: 200px;
+ }
+
+ #width {
+ -webkit-transition-property: width;
+ }
+ #width.final {
+ width: 200px;
+ }
+
+ #height {
+ -webkit-transition-property: height;
+ }
+ #height.final {
+ height: 200px;
+ }
+
+ </style>
+ <script src="resources/transition-test-helpers.js"></script>
+ <script type="text/javascript">
+
+ const expectedValues = [
+ // [time, element-id, property, expected-value, tolerance]
+ [0.5, 'x', 'x', 150, 20],
+ [0.5, 'y', 'y', 150, 20],
+ [0.5, 'width', 'width', 150, 20],
+ [0.5, 'height', 'height', 150, 20],
+ ];
+
+ function setupTest()
+ {
+ document.getElementById('x').setAttribute('class', 'init final');
+ document.getElementById('y').setAttribute('class', 'init final');
+ document.getElementById('width').setAttribute('class', 'init final');
+ document.getElementById('height').setAttribute('class', 'init final');
+ }
+
+ runTransitionTest(expectedValues, setupTest, usePauseAPI);
+ </script>
+</head>
+<body>
+ <svg>
+ <rect x="100" y="100" width="100" height="100" class="init" id="x"/>
+ <rect x="100" y="100" width="100" height="100" class="init" id="y"/>
+ <rect x="100" y="100" width="100" height="100" class="init" id="width"/>
+ <rect x="100" y="100" width="100" height="100" class="init" id="height"/>
+ </svg>
+
+ <div id="result">
+ </div>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/ChangeLog        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1,3 +1,74 @@
</span><ins>+2014-07-24 Dirk Schulze <krit@webkit.org>
+
+ Turn x/y to presentation attributes
+ https://bugs.webkit.org/show_bug.cgi?id=135215
+
+ Reviewed by Dean Jackson.
+
+ This follows the patch for width and height presentation attributes and
+ turns x and y to presentation attributes as well:
+
+ http://trac.webkit.org/changeset/171341
+
+ Tests: svg/css/parse-length.html
+ transitions/svg-layout-transition.html
+
+ Added copyright where I forgot it in previous patch.
+
+ * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y.
+ (WebCore::ComputedStyleExtractor::propertyValue):
+ * css/CSSParser.cpp:
+ (WebCore::isSimpleLengthPropertyID): Add x and y to list.
+ * css/DeprecatedStyleBuilder.cpp:
+ (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y.
+ * css/SVGCSSParser.cpp:
+ (WebCore::CSSParser::parseSVGValue): Parse x and y property.
+ * css/SVGCSSPropertyNames.in: Add x and y to list of names.
+ * css/StyleResolver.h:
+ * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length.
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ * rendering/style/RenderStyle.h: Add x and y setters and getters.
+ * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData.
+ (WebCore::SVGRenderStyle::SVGRenderStyle):
+ (WebCore::SVGRenderStyle::operator==):
+ (WebCore::SVGRenderStyle::copyNonInheritedFrom):
+ (WebCore::SVGRenderStyle::diff):
+ * rendering/style/SVGRenderStyle.h:
+ (WebCore::SVGRenderStyle::setX):
+ (WebCore::SVGRenderStyle::setY):
+ (WebCore::SVGRenderStyle::x):
+ (WebCore::SVGRenderStyle::y):
+ * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing.
+ (WebCore::StyleLayoutData::StyleLayoutData):
+ (WebCore::StyleLayoutData::copy):
+ (WebCore::StyleLayoutData::operator==):
+ * rendering/style/SVGRenderStyleDefs.h:
+ (WebCore::StyleLayoutData::create):
+ (WebCore::StyleLayoutData::operator!=):
+ * rendering/svg/RenderSVGRect.cpp:
+ (WebCore::RenderSVGRect::updateShapeFromElement):
+ * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values.
+ (WebCore::updatePathFromRectElement):
+ * svg/SVGAnimationElement.cpp:
+ (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection.
+ * svg/SVGElement.cpp: Add x and y to the relevant property lists.
+ (WebCore::populateAttributeNameToCSSPropertyIDMap):
+ (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
+ * svg/SVGFilterElement.cpp: Style update on change of x and y.
+ (WebCore::SVGFilterElement::svgAttributeChanged):
+ * svg/SVGMaskElement.cpp: Ditto.
+ (WebCore::SVGMaskElement::svgAttributeChanged):
+ * svg/SVGPatternElement.cpp: Ditto.
+ (WebCore::SVGPatternElement::svgAttributeChanged):
+ * svg/SVGRectElement.cpp: Ditto.
+ (WebCore::SVGRectElement::svgAttributeChanged):
+ * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they
+ are lists instead of individual values. Solution about to be discussed
+ in the WG. Keep current behavior for now.
+ (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute):
+ (WebCore::SVGTextPositioningElement::isPresentationAttribute):
+ * svg/SVGTextPositioningElement.h:
+
</ins><span class="cx"> 2014-07-24 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> CSS JIT: Implement Pseudo Element
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -428,7 +428,9 @@
</span><span class="cx"> CSSPropertyGlyphOrientationHorizontal,
</span><span class="cx"> CSSPropertyGlyphOrientationVertical,
</span><span class="cx"> CSSPropertyWebkitSvgShadow,
</span><del>- CSSPropertyVectorEffect
</del><ins>+ CSSPropertyVectorEffect,
+ CSSPropertyX,
+ CSSPropertyY
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> const unsigned numComputedProperties = WTF_ARRAY_LENGTH(computedProperties);
</span><span class="lines">@@ -2897,6 +2899,12 @@
</span><span class="cx"> case CSSPropertyBackgroundRepeatY:
</span><span class="cx"> break;
</span><span class="cx">
</span><ins>+ // New positioning properties for SVG.
+ case CSSPropertyX:
+ return zoomAdjustedPixelValueForLength(style->svgStyle().x(), style.get());
+ case CSSPropertyY:
+ return zoomAdjustedPixelValueForLength(style->svgStyle().y(), style.get());
+
</ins><span class="cx"> /* Unimplemented CSS 3 properties (including CSS3 shorthand properties) */
</span><span class="cx"> case CSSPropertyWebkitTextEmphasis:
</span><span class="cx"> case CSSPropertyTextLineThrough:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -569,6 +569,8 @@
</span><span class="cx"> case CSSPropertyWebkitMarginBefore:
</span><span class="cx"> case CSSPropertyWebkitMarginEnd:
</span><span class="cx"> case CSSPropertyWebkitMarginStart:
</span><ins>+ case CSSPropertyX:
+ case CSSPropertyY:
</ins><span class="cx"> acceptsNegativeNumbers = true;
</span><span class="cx"> return true;
</span><span class="cx"> default:
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -2593,6 +2593,10 @@
</span><span class="cx">
</span><span class="cx"> // UAs must treat 'word-wrap' as an alternate name for the 'overflow-wrap' property. So using the same handlers.
</span><span class="cx"> setPropertyHandler(CSSPropertyWordWrap, ApplyPropertyDefault<EOverflowWrap, &RenderStyle::overflowWrap, EOverflowWrap, &RenderStyle::setOverflowWrap, EOverflowWrap, &RenderStyle::initialOverflowWrap>::createHandler());
</span><ins>+
+ setPropertyHandler(CSSPropertyX, ApplyPropertyLength<&RenderStyle::x, &RenderStyle::setX, &RenderStyle::initialZeroLength>::createHandler());
+ setPropertyHandler(CSSPropertyY, ApplyPropertyLength<&RenderStyle::y, &RenderStyle::setY, &RenderStyle::initialZeroLength>::createHandler());
+
</ins><span class="cx"> setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::zIndex, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHasAutoZIndex>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyZoom, ApplyPropertyZoom::createHandler());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSParser.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSParser.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/css/SVGCSSParser.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -299,6 +299,10 @@
</span><span class="cx"> m_implicitShorthand = false;
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><ins>+ case CSSPropertyX:
+ case CSSPropertyY:
+ valid_primitive = (!id && validUnit(value, FLength | FPercent));
+ break;
</ins><span class="cx"> default:
</span><span class="cx"> // If you crash here, it's because you added a css property and are not handling it
</span><span class="cx"> // in either this switch statement or the one in CSSParser::parseValue
</span></span></pre></div>
<a id="trunkSourceWebCorecssSVGCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SVGCSSPropertyNames.in (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SVGCSSPropertyNames.in        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/css/SVGCSSPropertyNames.in        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -51,3 +51,7 @@
</span><span class="cx"> writing-mode [Inherited]
</span><span class="cx">
</span><span class="cx"> -webkit-svg-shadow
</span><ins>+
+x
+y
+
</ins></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.h (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.h        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/css/StyleResolver.h        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -88,6 +88,7 @@
</span><span class="cx"> class StyleSheet;
</span><span class="cx"> class StyleSheetList;
</span><span class="cx"> class StyledElement;
</span><ins>+class SVGSVGElement;
</ins><span class="cx"> class ViewportStyleResolver;
</span><span class="cx"> class WebKitCSSFilterValue;
</span><span class="cx"> struct ResourceLoaderOptions;
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1256,6 +1256,9 @@
</span><span class="cx"> new PropertyWrapper<SVGLength>(CSSPropertyStrokeDashoffset, &RenderStyle::strokeDashOffset, &RenderStyle::setStrokeDashOffset),
</span><span class="cx"> new PropertyWrapper<float>(CSSPropertyStrokeMiterlimit, &RenderStyle::strokeMiterLimit, &RenderStyle::setStrokeMiterLimit),
</span><span class="cx">
</span><ins>+ new LengthPropertyWrapper<Length>(CSSPropertyX, &RenderStyle::x, &RenderStyle::setX),
+ new LengthPropertyWrapper<Length>(CSSPropertyY, &RenderStyle::y, &RenderStyle::setY),
+
</ins><span class="cx"> new PropertyWrapper<float>(CSSPropertyFloodOpacity, &RenderStyle::floodOpacity, &RenderStyle::setFloodOpacity),
</span><span class="cx"> new PropertyWrapperMaybeInvalidColor(CSSPropertyFloodColor, &RenderStyle::floodColor, &RenderStyle::setFloodColor),
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1632,6 +1632,11 @@
</span><span class="cx"> float strokeMiterLimit() const { return svgStyle().strokeMiterLimit(); }
</span><span class="cx"> void setStrokeMiterLimit(float f) { accessSVGStyle().setStrokeMiterLimit(f); }
</span><span class="cx">
</span><ins>+ const Length& x() const { return svgStyle().x(); }
+ void setX(Length x) { accessSVGStyle().setX(x); }
+ const Length& y() const { return svgStyle().y(); }
+ void setY(Length y) { accessSVGStyle().setY(y); }
+
</ins><span class="cx"> float floodOpacity() const { return svgStyle().floodOpacity(); }
</span><span class="cx"> void setFloodOpacity(float f) { accessSVGStyle().setFloodOpacity(f); }
</span><span class="cx">
</span><span class="lines">@@ -1787,6 +1792,7 @@
</span><span class="cx"> static Length initialMargin() { return Length(Fixed); }
</span><span class="cx"> static Length initialPadding() { return Length(Fixed); }
</span><span class="cx"> static Length initialTextIndent() { return Length(Fixed); }
</span><ins>+ static Length initialZeroLength() { return Length(Fixed); }
</ins><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx"> static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
</span><span class="cx"> static TextIndentType initialTextIndentType() { return TextIndentNormal; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleSVGRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx"> , stops(defaultSVGStyle().stops)
</span><span class="cx"> , misc(defaultSVGStyle().misc)
</span><span class="cx"> , shadowSVG(defaultSVGStyle().shadowSVG)
</span><ins>+ , layout(defaultSVGStyle().layout)
</ins><span class="cx"> , resources(defaultSVGStyle().resources)
</span><span class="cx"> {
</span><span class="cx"> setBitDefaults();
</span><span class="lines">@@ -69,6 +70,7 @@
</span><span class="cx"> , stops(StyleStopData::create())
</span><span class="cx"> , misc(StyleMiscData::create())
</span><span class="cx"> , shadowSVG(StyleShadowSVGData::create())
</span><ins>+ , layout(StyleLayoutData::create())
</ins><span class="cx"> , resources(StyleResourceData::create())
</span><span class="cx"> {
</span><span class="cx"> setBitDefaults();
</span><span class="lines">@@ -85,6 +87,7 @@
</span><span class="cx"> , stops(other.stops)
</span><span class="cx"> , misc(other.misc)
</span><span class="cx"> , shadowSVG(other.shadowSVG)
</span><ins>+ , layout(other.layout)
</ins><span class="cx"> , resources(other.resources)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -106,6 +109,7 @@
</span><span class="cx"> && stops == other.stops
</span><span class="cx"> && misc == other.misc
</span><span class="cx"> && shadowSVG == other.shadowSVG
</span><ins>+ && layout == other.layout
</ins><span class="cx"> && inheritedResources == other.inheritedResources
</span><span class="cx"> && resources == other.resources
</span><span class="cx"> && svg_inherited_flags == other.svg_inherited_flags
</span><span class="lines">@@ -140,6 +144,7 @@
</span><span class="cx"> stops = other->stops;
</span><span class="cx"> misc = other->misc;
</span><span class="cx"> shadowSVG = other->shadowSVG;
</span><ins>+ layout = other->layout;
</ins><span class="cx"> resources = other->resources;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -223,6 +228,10 @@
</span><span class="cx"> if (shadowSVG != other->shadowSVG)
</span><span class="cx"> return StyleDifferenceLayout;
</span><span class="cx">
</span><ins>+ // The x or y properties require relayout.
+ if (layout != other->layout)
+ return StyleDifferenceLayout;
+
</ins><span class="cx"> // Some stroke properties, requires relayouts, as the cached stroke boundaries need to be recalculated.
</span><span class="cx"> if (stroke != other->stroke) {
</span><span class="cx"> if (stroke->width != other->stroke->width
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleSVGRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyle.h (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/SVGRenderStyle.h        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyle.h        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -3,6 +3,7 @@
</span><span class="cx"> 2004, 2005 Rob Buis <buis@kde.org>
</span><span class="cx"> Copyright (C) 2005, 2006 Apple Inc.
</span><span class="cx"> Copyright (C) Research In Motion Limited 2010. All rights reserved.
</span><ins>+ Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx">
</span><span class="cx"> This library is free software; you can redistribute it and/or
</span><span class="cx"> modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -145,6 +146,16 @@
</span><span class="cx"> void setGlyphOrientationVertical(EGlyphOrientation val) { svg_inherited_flags._glyphOrientationVertical = val; }
</span><span class="cx"> void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; }
</span><span class="cx"> void setPaintOrder(PaintOrder val) { svg_inherited_flags.paintOrder = val; }
</span><ins>+ void setX(const Length& obj)
+ {
+ if (!(layout->x == obj))
+ layout.access()->x = obj;
+ }
+ void setY(const Length& obj)
+ {
+ if (!(layout->y == obj))
+ layout.access()->y = obj;
+ }
</ins><span class="cx">
</span><span class="cx"> void setFillOpacity(float obj)
</span><span class="cx"> {
</span><span class="lines">@@ -342,6 +353,8 @@
</span><span class="cx"> const Color& lightingColor() const { return misc->lightingColor; }
</span><span class="cx"> SVGLength baselineShiftValue() const { return misc->baselineShiftValue; }
</span><span class="cx"> ShadowData* shadow() const { return shadowSVG->shadow.get(); }
</span><ins>+ const Length& x() const { return layout->x; }
+ const Length& y() const { return layout->y; }
</ins><span class="cx"> String clipperResource() const { return resources->clipper; }
</span><span class="cx"> String filterResource() const { return resources->filter; }
</span><span class="cx"> String maskerResource() const { return resources->masker; }
</span><span class="lines">@@ -440,6 +453,7 @@
</span><span class="cx"> DataRef<StyleStopData> stops;
</span><span class="cx"> DataRef<StyleMiscData> misc;
</span><span class="cx"> DataRef<StyleShadowSVGData> shadowSVG;
</span><ins>+ DataRef<StyleLayoutData> layout;
</ins><span class="cx"> DataRef<StyleResourceData> resources;
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleSVGRenderStyleDefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx"> 2004, 2005, 2007 Rob Buis <buis@kde.org>
</span><span class="cx"> Copyright (C) Research In Motion Limited 2010. All rights reserved.
</span><ins>+ Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx">
</span><span class="cx"> Based on khtml code by:
</span><span class="cx"> Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
</span><span class="lines">@@ -276,4 +277,28 @@
</span><span class="cx"> && markerEnd == other.markerEnd;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+StyleLayoutData::StyleLayoutData()
+ : x(RenderStyle::initialZeroLength())
+ , y(RenderStyle::initialZeroLength())
+{
</ins><span class="cx"> }
</span><ins>+
+inline StyleLayoutData::StyleLayoutData(const StyleLayoutData& other)
+ : RefCounted<StyleLayoutData>()
+ , x(other.x)
+ , y(other.y)
+{
+}
+
+PassRef<StyleLayoutData> StyleLayoutData::copy() const
+{
+ return adoptRef(*new StyleLayoutData(*this));
+}
+
+bool StyleLayoutData::operator==(const StyleLayoutData& other) const
+{
+ return x == other.x
+ && y == other.y;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleSVGRenderStyleDefsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx"> 2004, 2005 Rob Buis <buis@kde.org>
</span><span class="cx"> Copyright (C) Research In Motion Limited 2010. All rights reserved.
</span><ins>+ Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx">
</span><span class="cx"> Based on khtml code by:
</span><span class="cx"> Copyright (C) 2000-2003 Lars Knoll (knoll@kde.org)
</span><span class="lines">@@ -28,6 +29,7 @@
</span><span class="cx"> #ifndef SVGRenderStyleDefs_h
</span><span class="cx"> #define SVGRenderStyleDefs_h
</span><span class="cx">
</span><ins>+#include "Length.h"
</ins><span class="cx"> #include "SVGLength.h"
</span><span class="cx"> #include "SVGPaint.h"
</span><span class="cx"> #include "ShadowData.h"
</span><span class="lines">@@ -288,6 +290,26 @@
</span><span class="cx"> StyleInheritedResourceData(const StyleInheritedResourceData&);
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+ // Positioning and sizing properties.
+ class StyleLayoutData : public RefCounted<StyleLayoutData> {
+ public:
+ static PassRef<StyleLayoutData> create() { return adoptRef(*new StyleLayoutData); }
+ PassRef<StyleLayoutData> copy() const;
+
+ bool operator==(const StyleLayoutData&) const;
+ bool operator!=(const StyleLayoutData& other) const
+ {
+ return !(*this == other);
+ }
+
+ Length x;
+ Length y;
+
+ private:
+ StyleLayoutData();
+ StyleLayoutData(const StyleLayoutData&);
+ };
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // SVGRenderStyleDefs_h
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -73,7 +73,9 @@
</span><span class="cx"> m_usePathFallback = false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_fillBoundingBox = FloatRect(FloatPoint(rectElement().x().value(lengthContext), rectElement().y().value(lengthContext)), boundingBoxSize);
</del><ins>+ m_fillBoundingBox = FloatRect(FloatPoint(lengthContext.valueForLength(style().svgStyle().x(), LengthModeWidth),
+ lengthContext.valueForLength(style().svgStyle().y(), LengthModeHeight)),
+ boundingBoxSize);
</ins><span class="cx">
</span><span class="cx"> // To decide if the stroke contains a point we create two rects which represent the inner and
</span><span class="cx"> // the outer stroke borders. A stroke contains the point, if the point is between them.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGPathDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGPathData.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGPathData.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/rendering/svg/SVGPathData.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -119,8 +119,8 @@
</span><span class="cx"> float height = lengthContext.valueForLength(style.height(), LengthModeHeight);
</span><span class="cx"> if (height <= 0)
</span><span class="cx"> return;
</span><del>- float x = rect->x().value(lengthContext);
- float y = rect->y().value(lengthContext);
</del><ins>+ float x = lengthContext.valueForLength(style.svgStyle().x(), LengthModeWidth);
+ float y = lengthContext.valueForLength(style.svgStyle().y(), LengthModeHeight);
</ins><span class="cx"> float rx = rect->rx().value(lengthContext);
</span><span class="cx"> float ry = rect->ry().value(lengthContext);
</span><span class="cx"> bool hasRx = rx > 0;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGAnimateElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -3,6 +3,7 @@
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
</span><span class="cx"> * Copyright (C) 2008 Apple Inc. All rights reserved.
</span><span class="cx"> * Copyright (C) Research In Motion Limited 2011. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimationElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimationElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimationElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -5,6 +5,7 @@
</span><span class="cx"> * Copyright (C) 2008 Apple Inc. All rights reserved.
</span><span class="cx"> * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
</span><span class="cx"> * Copyright (C) Research In Motion Limited 2010. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -355,8 +356,7 @@
</span><span class="cx">
</span><span class="cx"> bool SVGAnimationElement::isTargetAttributeCSSProperty(SVGElement* element, const QualifiedName& attributeName)
</span><span class="cx"> {
</span><del>- // FIXME: Must be isSVGTextPositioningElement(element) instead.
- if (isSVGTextElement(element)
</del><ins>+ if (element->isTextContent()
</ins><span class="cx"> && (attributeName == SVGNames::xAttr || attributeName == SVGNames::yAttr))
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -144,6 +144,8 @@
</span><span class="cx"> &SVGNames::widthAttr,
</span><span class="cx"> &word_spacingAttr,
</span><span class="cx"> &writing_modeAttr,
</span><ins>+ &xAttr,
+ &yAttr,
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> for (unsigned i = 0; i < WTF_ARRAY_LENGTH(attributeNames); ++i) {
</span><span class="lines">@@ -244,6 +246,8 @@
</span><span class="cx"> static const TableEntry table[] = {
</span><span class="cx"> { SVGNames::heightAttr, AnimatedLength },
</span><span class="cx"> { SVGNames::widthAttr, AnimatedLength },
</span><ins>+ { xAttr, AnimatedLength },
+ { yAttr, AnimatedLength },
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> for (unsigned i = 0; i < WTF_ARRAY_LENGTH(table); ++i)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFilterElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFilterElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFilterElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGFilterElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -4,6 +4,7 @@
</span><span class="cx"> * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
</span><span class="cx"> * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
</span><span class="cx"> * Copyright (C) Research In Motion Limited 2010. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -168,16 +169,14 @@
</span><span class="cx">
</span><span class="cx"> SVGElementInstance::InvalidationGuard invalidationGuard(this);
</span><span class="cx">
</span><del>- if (attrName == SVGNames::widthAttr
</del><ins>+ if (attrName == SVGNames::xAttr
+ || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr
</ins><span class="cx"> || attrName == SVGNames::heightAttr) {
</span><span class="cx"> invalidateSVGPresentationAttributeStyle();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (attrName == SVGNames::xAttr
- || attrName == SVGNames::yAttr)
- updateRelativeLengthsInformation();
-
</del><span class="cx"> if (RenderObject* object = renderer())
</span><span class="cx"> object->setNeedsLayout();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGForeignObjectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2006 Apple Inc. All rights reserved.
</span><span class="cx"> * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGImageElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGImageElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGImageElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Rob Buis <buis@kde.org>
</span><span class="cx"> * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLengthContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLengthContext.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLengthContext.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGLengthContext.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -3,6 +3,7 @@
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
</span><span class="cx"> * Copyright (C) 2007 Apple Inc. All rights reserved.
</span><span class="cx"> * Copyright (C) Research In Motion Limited 2011. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGMaskElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGMaskElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGMaskElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGMaskElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -4,6 +4,7 @@
</span><span class="cx"> * Copyright (C) 2005 Alexander Kellett <lypanov@kde.org>
</span><span class="cx"> * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
</span><span class="cx"> * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -135,16 +136,14 @@
</span><span class="cx">
</span><span class="cx"> SVGElementInstance::InvalidationGuard invalidationGuard(this);
</span><span class="cx">
</span><del>- if (attrName == SVGNames::widthAttr
</del><ins>+ if (attrName == SVGNames::xAttr
+ || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr
</ins><span class="cx"> || attrName == SVGNames::heightAttr) {
</span><span class="cx"> invalidateSVGPresentationAttributeStyle();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (attrName == SVGNames::xAttr
- || attrName == SVGNames::yAttr)
- updateRelativeLengthsInformation();
-
</del><span class="cx"> if (RenderObject* object = renderer())
</span><span class="cx"> object->setNeedsLayout();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPatternElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPatternElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPatternElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGPatternElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
</span><span class="cx"> * Copyright (C) Research In Motion Limited 2010. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -160,16 +161,14 @@
</span><span class="cx">
</span><span class="cx"> SVGElementInstance::InvalidationGuard invalidationGuard(this);
</span><span class="cx">
</span><del>- if (attrName == SVGNames::widthAttr
</del><ins>+ if (attrName == SVGNames::xAttr
+ || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr
</ins><span class="cx"> || attrName == SVGNames::heightAttr) {
</span><span class="cx"> invalidateSVGPresentationAttributeStyle();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (attrName == SVGNames::xAttr
- || attrName == SVGNames::yAttr)
- updateRelativeLengthsInformation();
-
</del><span class="cx"> if (RenderObject* object = renderer())
</span><span class="cx"> object->setNeedsLayout();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGRectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGRectElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGRectElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGRectElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -121,15 +122,15 @@
</span><span class="cx">
</span><span class="cx"> SVGElementInstance::InvalidationGuard invalidationGuard(this);
</span><span class="cx">
</span><del>- if (attrName == SVGNames::widthAttr
</del><ins>+ if (attrName == SVGNames::xAttr
+ || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr
</ins><span class="cx"> || attrName == SVGNames::heightAttr) {
</span><span class="cx"> invalidateSVGPresentationAttributeStyle();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- bool isLengthAttribute = attrName == SVGNames::xAttr
- || attrName == SVGNames::yAttr
- || attrName == SVGNames::rxAttr
</del><ins>+ bool isLengthAttribute = attrName == SVGNames::rxAttr
</ins><span class="cx"> || attrName == SVGNames::ryAttr;
</span><span class="cx">
</span><span class="cx"> if (isLengthAttribute)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGSVGElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
</span><span class="cx"> * Copyright (C) 2007 Apple Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextPositioningElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx"> * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
</span><ins>+ * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -117,6 +118,20 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void SVGTextPositioningElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style)
+{
+ if (name == SVGNames::xAttr || name == SVGNames::yAttr)
+ return;
+ SVGTextContentElement::collectStyleForPresentationAttribute(name, value, style);
+}
+
+bool SVGTextPositioningElement::isPresentationAttribute(const QualifiedName& name) const
+{
+ if (name == SVGNames::xAttr || name == SVGNames::yAttr)
+ return false;
+ return SVGTextContentElement::isPresentationAttribute(name);
+}
+
</ins><span class="cx"> void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrName)
</span><span class="cx"> {
</span><span class="cx"> if (!isSupportedAttribute(attrName)) {
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextPositioningElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextPositioningElement.h (171590 => 171591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextPositioningElement.h        2014-07-25 07:17:12 UTC (rev 171590)
+++ trunk/Source/WebCore/svg/SVGTextPositioningElement.h        2014-07-25 09:52:25 UTC (rev 171591)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx"> protected:
</span><span class="cx"> SVGTextPositioningElement(const QualifiedName&, Document&);
</span><span class="cx">
</span><ins>+ virtual bool isPresentationAttribute(const QualifiedName&) const override final;
+ virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override final;
</ins><span class="cx"> bool isSupportedAttribute(const QualifiedName&);
</span><span class="cx"> virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
</span><span class="cx"> virtual void svgAttributeChanged(const QualifiedName&) override;
</span></span></pre>
</div>
</div>
</body>
</html>