<!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>[168266] releases/WebKitGTK/webkit-2.4</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/168266">168266</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-05 01:18:01 -0700 (Mon, 05 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/164917">r164917</a> - Fix lifetime handling of SVGPropertyTearOffs
&lt;http://webkit.org/b/129211&gt;
&lt;rdar://problem/15696025&gt;

Reviewed by Maciej Stachowiak.

Merged from Blink (patch by Ojan Vafai):
https://src.chromium.org/viewvc/blink?revision=157801&amp;view=revision
http://crbug.com/288771

    -Replace SVGStaticPropertyWithParentTearOff with SVGMatrixTearOff
    since it's only used in that one place. This means we can get rid
    of the templatizing and the method pointer.
    -Change SVGPropertyTearOff to keep track of it's child tearoffs
    and call detachWrapper on its child tearoffs when it's destroyed
    or when it's wrapper is detached.
    -Have SVGPropertyTearOff hold WeakPtrs to the child tearoffs
    to avoid having a cycle.

Source/WebCore:

Test: svg/transforms/svg-matrix-tearoff-crash.html

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue):
* svg/properties/SVGMatrixTearOff.h: Renamed from Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h.
(WebCore::SVGMatrixTearOff::create):
(WebCore::SVGMatrixTearOff::commitChange):
(WebCore::SVGMatrixTearOff::SVGMatrixTearOff):
* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::addChild):
(WebCore::SVGPropertyTearOff::detachChildren):

LayoutTests:

* svg/transforms/svg-matrix-tearoff-crash-expected.txt: Added.
* svg/transforms/svg-matrix-tearoff-crash.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit24LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoreGNUmakefilelistam">releases/WebKitGTK/webkit-2.4/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoreWebCorevcxprojWebCorevcxproj">releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoreWebCorevcxprojWebCorevcxprojfilters">releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoreWebCorexcodeprojprojectpbxproj">releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCorebindingsscriptsCodeGeneratorJSpm">releases/WebKitGTK/webkit-2.4/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoresvgpropertiesSVGPropertyTearOffh">releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGPropertyTearOff.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit24LayoutTestssvgtransformssvgmatrixtearoffcrashexpectedtxt">releases/WebKitGTK/webkit-2.4/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit24LayoutTestssvgtransformssvgmatrixtearoffcrashhtml">releases/WebKitGTK/webkit-2.4/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoresvgpropertiesSVGMatrixTearOffh">releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGMatrixTearOff.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit24SourceWebCoresvgpropertiesSVGStaticPropertyWithParentTearOffh">releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit24LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2014-03-01  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
+        Fix lifetime handling of SVGPropertyTearOffs
+        &lt;http://webkit.org/b/129211&gt;
+        &lt;rdar://problem/15696025&gt;
+
+        Reviewed by Maciej Stachowiak.
+
+        Merged from Blink (patch by Ojan Vafai):
+        https://src.chromium.org/viewvc/blink?revision=157801&amp;view=revision
+        http://crbug.com/288771
+
+            -Replace SVGStaticPropertyWithParentTearOff with SVGMatrixTearOff
+            since it's only used in that one place. This means we can get rid
+            of the templatizing and the method pointer.
+            -Change SVGPropertyTearOff to keep track of it's child tearoffs
+            and call detachWrapper on its child tearoffs when it's destroyed
+            or when it's wrapper is detached.
+            -Have SVGPropertyTearOff hold WeakPtrs to the child tearoffs
+            to avoid having a cycle.
+
+        * svg/transforms/svg-matrix-tearoff-crash-expected.txt: Added.
+        * svg/transforms/svg-matrix-tearoff-crash.html: Added.
+
</ins><span class="cx"> 2014-03-25  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Hold a reference to firstSuccessfulSubmitButton in HTMLFormElement::submit
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24LayoutTestssvgtransformssvgmatrixtearoffcrashexpectedtxt"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.4/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt (0 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt                                (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+This test passes if it doesn't crash under ASAN. 
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit24LayoutTestssvgtransformssvgmatrixtearoffcrashhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.4/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html (0 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;script&gt;
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+function eventhandler1() {
+    var transformList = document.createElementNS(&quot;http://www.w3.org/2000/svg&quot;, &quot;radialGradient&quot;).gradientTransform.baseVal;
+    var transform = document.querySelector(&quot;svg&quot;).createSVGTransform();
+    transformList.appendItem(transform);
+    var matrix = transform.matrix;
+    transformList.initialize(transform);
+    matrix.flipX();
+}
+&lt;/script&gt;
+This test passes if it doesn't crash under ASAN.
+&lt;svg onload=&quot;eventhandler1()&quot;&gt;
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-03-01  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
+        Fix lifetime handling of SVGPropertyTearOffs
+        &lt;http://webkit.org/b/129211&gt;
+        &lt;rdar://problem/15696025&gt;
+
+        Reviewed by Maciej Stachowiak.
+
+        Merged from Blink (patch by Ojan Vafai):
+        https://src.chromium.org/viewvc/blink?revision=157801&amp;view=revision
+        http://crbug.com/288771
+
+            -Replace SVGStaticPropertyWithParentTearOff with SVGMatrixTearOff
+            since it's only used in that one place. This means we can get rid
+            of the templatizing and the method pointer.
+            -Change SVGPropertyTearOff to keep track of it's child tearoffs
+            and call detachWrapper on its child tearoffs when it's destroyed
+            or when it's wrapper is detached.
+            -Have SVGPropertyTearOff hold WeakPtrs to the child tearoffs
+            to avoid having a cycle.
+
+        Test: svg/transforms/svg-matrix-tearoff-crash.html
+
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (NativeToJSValue):
+        * svg/properties/SVGMatrixTearOff.h: Renamed from Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h.
+        (WebCore::SVGMatrixTearOff::create):
+        (WebCore::SVGMatrixTearOff::commitChange):
+        (WebCore::SVGMatrixTearOff::SVGMatrixTearOff):
+        * svg/properties/SVGPropertyTearOff.h:
+        (WebCore::SVGPropertyTearOff::addChild):
+        (WebCore::SVGPropertyTearOff::detachChildren):
+
</ins><span class="cx"> 2014-03-25  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Hold a reference to firstSuccessfulSubmitButton in HTMLFormElement::submit
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/GNUmakefile.list.am (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/GNUmakefile.list.am        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/GNUmakefile.list.am        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -4942,6 +4942,7 @@
</span><span class="cx">         Source/WebCore/svg/properties/SVGAnimatedTransformListPropertyTearOff.h \
</span><span class="cx">         Source/WebCore/svg/properties/SVGListProperty.h \
</span><span class="cx">         Source/WebCore/svg/properties/SVGListPropertyTearOff.h \
</span><ins>+        Source/WebCore/svg/properties/SVGMatrixTearOff.h \
</ins><span class="cx">         Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.cpp \
</span><span class="cx">         Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h \
</span><span class="cx">         Source/WebCore/svg/properties/SVGProperty.h \
</span><span class="lines">@@ -4951,7 +4952,6 @@
</span><span class="cx">         Source/WebCore/svg/properties/SVGPropertyTraits.h \
</span><span class="cx">         Source/WebCore/svg/properties/SVGStaticListPropertyTearOff.h \
</span><span class="cx">         Source/WebCore/svg/properties/SVGStaticPropertyTearOff.h \
</span><del>-        Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h \
</del><span class="cx">         Source/WebCore/svg/properties/SVGTransformListPropertyTearOff.h \
</span><span class="cx">         Source/WebCore/svg/RadialGradientAttributes.h \
</span><span class="cx">         Source/WebCore/svg/SVGAElement.cpp \
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -20767,6 +20767,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGAttributeToPropertyMap.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGListProperty.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGListPropertyTearOff.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\svg\properties\SVGMatrixTearOff.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGPathSegListPropertyTearOff.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGProperty.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGPropertyInfo.h&quot; /&gt;
</span><span class="lines">@@ -20774,7 +20775,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGPropertyTraits.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGStaticListPropertyTearOff.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGStaticPropertyTearOff.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\svg\properties\SVGStaticPropertyWithParentTearOff.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGTransformListPropertyTearOff.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\ForwardingHeaders\runtime\ArgList.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\ForwardingHeaders\runtime\Identifier.h&quot; /&gt;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -12005,6 +12005,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGListPropertyTearOff.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering\svg\properties&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\svg\properties\SVGMatrixTearOff.h&quot;&gt;
+      &lt;Filter&gt;rendering\svg\properties&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGPathSegListPropertyTearOff.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering\svg\properties&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="lines">@@ -12026,9 +12029,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGStaticPropertyTearOff.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering\svg\properties&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\svg\properties\SVGStaticPropertyWithParentTearOff.h&quot;&gt;
-      &lt;Filter&gt;rendering\svg\properties&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\svg\properties\SVGTransformListPropertyTearOff.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;rendering\svg\properties&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.xcodeproj/project.pbxproj (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -420,7 +420,7 @@
</span><span class="cx">                 08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C859BF1274575300A5728D /* SVGAnimatedRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 08C925190FCC7C4A00480DEC /* FilterEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C925170FCC7C4A00480DEC /* FilterEffect.cpp */; };
</span><span class="cx">                 08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C925180FCC7C4A00480DEC /* FilterEffect.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                08CA3D4412894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                08CA3D4412894A3800FFF260 /* SVGMatrixTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 08D46CE3127AD5FC0089694B /* SVGAnimatedEnumeration.h in Headers */ = {isa = PBXBuildFile; fileRef = 08D46CE2127AD5FC0089694B /* SVGAnimatedEnumeration.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 08E4FE460E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */; };
</span><span class="cx">                 08EDE19F12A50B8E00B95797 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08EDE19E12A50B8E00B95797 /* SVGRect.h */; };
</span><span class="lines">@@ -7158,7 +7158,7 @@
</span><span class="cx">                 08C859BF1274575300A5728D /* SVGAnimatedRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedRect.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 08C925170FCC7C4A00480DEC /* FilterEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FilterEffect.cpp; path = filters/FilterEffect.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 08C925180FCC7C4A00480DEC /* FilterEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilterEffect.h; path = filters/FilterEffect.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGStaticPropertyWithParentTearOff.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrixTearOff.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 08D29440138669E40097C89B /* SVGTextRunRenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextRunRenderingContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 08D46CE2127AD5FC0089694B /* SVGAnimatedEnumeration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedEnumeration.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGLengthCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -14209,6 +14209,7 @@
</span><span class="cx">                                 08FB3F8313BC754C0099FC18 /* SVGAttributeToPropertyMap.h */,
</span><span class="cx">                                 0810764312828556007C63BA /* SVGListProperty.h */,
</span><span class="cx">                                 088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */,
</span><ins>+                                08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */,
</ins><span class="cx">                                 08FF101F12950F5900F00276 /* SVGPathSegListPropertyTearOff.cpp */,
</span><span class="cx">                                 084A0828128D7867002DB1F1 /* SVGPathSegListPropertyTearOff.h */,
</span><span class="cx">                                 088A0E01126EF1DB00978F7A /* SVGProperty.h */,
</span><span class="lines">@@ -14218,7 +14219,6 @@
</span><span class="cx">                                 088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */,
</span><span class="cx">                                 0880F70D1282B46D00948505 /* SVGStaticListPropertyTearOff.h */,
</span><span class="cx">                                 0813A4E91284132600992511 /* SVGStaticPropertyTearOff.h */,
</span><del>-                                08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */,
</del><span class="cx">                                 08C7136D128956A3001B107E /* SVGTransformListPropertyTearOff.h */,
</span><span class="cx">                         );
</span><span class="cx">                         path = properties;
</span><span class="lines">@@ -25467,6 +25467,7 @@
</span><span class="cx">                                 B2227A440D00BF220071B782 /* SVGMarkerElement.h in Headers */,
</span><span class="cx">                                 B2227A470D00BF220071B782 /* SVGMaskElement.h in Headers */,
</span><span class="cx">                                 0806E57A12893045007CED32 /* SVGMatrix.h in Headers */,
</span><ins>+                                08CA3D4412894A3800FFF260 /* SVGMatrixTearOff.h in Headers */,
</ins><span class="cx">                                 B2227A4B0D00BF220071B782 /* SVGMetadataElement.h in Headers */,
</span><span class="cx">                                 B2A1F2B10CEF0ABF00442F6A /* SVGMissingGlyphElement.h in Headers */,
</span><span class="cx">                                 B2227A4E0D00BF220071B782 /* SVGMPathElement.h in Headers */,
</span><span class="lines">@@ -25536,7 +25537,6 @@
</span><span class="cx">                                 E4AFD0100DAF335500F5F55C /* SVGSMILElement.h in Headers */,
</span><span class="cx">                                 0880F70E1282B46D00948505 /* SVGStaticListPropertyTearOff.h in Headers */,
</span><span class="cx">                                 0813A4EA1284132600992511 /* SVGStaticPropertyTearOff.h in Headers */,
</span><del>-                                08CA3D4412894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h in Headers */,
</del><span class="cx">                                 B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */,
</span><span class="cx">                                 B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */,
</span><span class="cx">                                 B2227AB80D00BF220071B782 /* SVGStyleElement.h in Headers */,
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -3688,10 +3688,9 @@
</span><span class="cx"> 
</span><span class="cx">             my $selfIsTearOffType = $codeGenerator-&gt;IsSVGTypeNeedingTearOff($interfaceName);
</span><span class="cx">             if ($selfIsTearOffType) {
</span><del>-                AddToImplIncludes(&quot;SVGStaticPropertyWithParentTearOff.h&quot;, $conditional);
-                $tearOffType =~ s/SVGPropertyTearOff&lt;/SVGStaticPropertyWithParentTearOff&lt;$interfaceName, /;
-
-                $value = &quot;${tearOffType}::create(castedThis-&gt;impl(), $value, $updateMethod)&quot;;
</del><ins>+                AddToImplIncludes(&quot;SVGMatrixTearOff.h&quot;, $conditional);
+                # FIXME: Blink: Don't create a new one everytime we access the matrix property. This means, e.g, === won't work.
+                $value = &quot;SVGMatrixTearOff::create(castedThis-&gt;impl(), $value)&quot;;
</ins><span class="cx">             } else {
</span><span class="cx">                 AddToImplIncludes(&quot;SVGStaticPropertyTearOff.h&quot;, $conditional);
</span><span class="cx">                 $tearOffType =~ s/SVGPropertyTearOff&lt;/SVGStaticPropertyTearOff&lt;$interfaceName, /;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoresvgpropertiesSVGMatrixTearOffhfromrev168264releasesWebKitGTKwebkit24SourceWebCoresvgpropertiesSVGStaticPropertyWithParentTearOffh"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGMatrixTearOff.h (from rev 168264, releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h) (0 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGMatrixTearOff.h                                (rev 0)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGMatrixTearOff.h        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SVGMatrixTearOff_h
+#define SVGMatrixTearOff_h
+
+#if ENABLE(SVG)
+#include &quot;SVGPropertyTearOff.h&quot;
+#include &quot;SVGTransform.h&quot;
+
+namespace WebCore {
+
+class SVGMatrixTearOff : public SVGPropertyTearOff&lt;SVGMatrix&gt; {
+public:
+    // Used for non-animated POD types that are not associated with a SVGAnimatedProperty object, nor with a XML DOM attribute
+    // and that contain a parent type that's exposed to the bindings via a SVGStaticPropertyTearOff object
+    // (for example: SVGTransform::matrix).
+    static PassRefPtr&lt;SVGMatrixTearOff&gt; create(SVGPropertyTearOff&lt;SVGTransform&gt;&amp; parent, SVGMatrix&amp; value)
+    {
+        RefPtr&lt;SVGMatrixTearOff&gt; result = adoptRef(new SVGMatrixTearOff(&amp;parent, value));
+        parent.addChild(result-&gt;m_weakFactory.createWeakPtr());
+        return result.release();
+    }
+
+    virtual void commitChange()
+    {
+        m_parent-&gt;propertyReference().updateSVGMatrix();
+        m_parent-&gt;commitChange();
+    }
+
+private:
+    SVGMatrixTearOff(SVGPropertyTearOff&lt;SVGTransform&gt;* parent, SVGMatrix&amp; value)
+        : SVGPropertyTearOff&lt;SVGMatrix&gt;(0, UndefinedRole, value)
+        , m_parent(parent)
+        , m_weakFactory(this)
+    {
+    }
+
+    RefPtr&lt;SVGPropertyTearOff&lt;SVGTransform&gt;&gt; m_parent;
+    WeakPtrFactory&lt;SVGPropertyTearOffBase&gt; m_weakFactory;
+};
+
+}
+
+#endif // ENABLE(SVG)
+#endif // SVGMatrixTearOff_h
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoresvgpropertiesSVGPropertyTearOffh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGPropertyTearOff.h (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGPropertyTearOff.h        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGPropertyTearOff.h        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -24,11 +24,17 @@
</span><span class="cx"> #include &quot;SVGAnimatedProperty.h&quot;
</span><span class="cx"> #include &quot;SVGElement.h&quot;
</span><span class="cx"> #include &quot;SVGProperty.h&quot;
</span><ins>+#include &lt;wtf/WeakPtr.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class SVGPropertyTearOffBase : public SVGProperty {
+public:
+    virtual void detachWrapper() = 0;
+};
+
</ins><span class="cx"> template&lt;typename PropertyType&gt;
</span><del>-class SVGPropertyTearOff : public SVGProperty {
</del><ins>+class SVGPropertyTearOff : public SVGPropertyTearOffBase {
</ins><span class="cx"> public:
</span><span class="cx">     typedef SVGPropertyTearOff&lt;PropertyType&gt; Self;
</span><span class="cx"> 
</span><span class="lines">@@ -72,11 +78,18 @@
</span><span class="cx">         return m_contextElement.get();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void detachWrapper()
</del><ins>+    void addChild(WeakPtr&lt;SVGPropertyTearOffBase&gt; child)
</ins><span class="cx">     {
</span><ins>+        m_childTearOffs.append(child);
+    }
+
+    virtual void detachWrapper() override
+    {
</ins><span class="cx">         if (m_valueIsCopy)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><ins>+        detachChildren();
+
</ins><span class="cx">         // Switch from a live value, to a non-live value.
</span><span class="cx">         // For example: &lt;text x=&quot;50&quot;/&gt;
</span><span class="cx">         // var item = text.x.baseVal.getItem(0);
</span><span class="lines">@@ -133,10 +146,20 @@
</span><span class="cx">             delete m_value;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    void detachChildren()
+    {
+        for (const auto&amp; childTearOff : m_childTearOffs) {
+            if (childTearOff.get())
+                childTearOff.get()-&gt;detachWrapper();
+        }
+        m_childTearOffs.clear();
+    }
+
</ins><span class="cx">     RefPtr&lt;SVGElement&gt; m_contextElement;
</span><span class="cx">     SVGAnimatedProperty* m_animatedProperty;
</span><span class="cx">     SVGPropertyRole m_role;
</span><span class="cx">     PropertyType* m_value;
</span><ins>+    Vector&lt;WeakPtr&lt;SVGPropertyTearOffBase&gt;&gt; m_childTearOffs;
</ins><span class="cx">     bool m_valueIsCopy : 1;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceWebCoresvgpropertiesSVGStaticPropertyWithParentTearOffh"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h (168265 => 168266)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h        2014-05-05 08:08:28 UTC (rev 168265)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h        2014-05-05 08:18:01 UTC (rev 168266)
</span><span class="lines">@@ -1,71 +0,0 @@
</span><del>-/*
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef SVGStaticPropertyWithParentTearOff_h
-#define SVGStaticPropertyWithParentTearOff_h
-
-#if ENABLE(SVG)
-#include &quot;SVGPropertyTearOff.h&quot;
-
-namespace WebCore {
-
-#if COMPILER(MSVC)
-// UpdateMethod is 12 bytes. We have to pack to a size greater than or equal to that to avoid an
-// alignment warning (C4121). 16 is the next-largest size allowed for packing, so we use that.
-#pragma pack(push, 16)
-#endif
-template&lt;typename ParentType, typename PropertyType&gt;
-class SVGStaticPropertyWithParentTearOff : public SVGPropertyTearOff&lt;PropertyType&gt; {
-public:
-    typedef SVGStaticPropertyWithParentTearOff&lt;ParentType, PropertyType&gt; Self;
-    typedef void (ParentType::*UpdateMethod)();
-
-    // Used for non-animated POD types that are not associated with a SVGAnimatedProperty object, nor with a XML DOM attribute
-    // and that contain a parent type that's exposed to the bindings via a SVGStaticPropertyTearOff object
-    // (for example: SVGTransform::matrix).
-    static PassRefPtr&lt;Self&gt; create(SVGProperty&amp; parent, PropertyType&amp; value, UpdateMethod update)
-    {
-        return adoptRef(new Self(&amp;parent, value, update));
-    }
-
-    virtual void commitChange()
-    {
-        (static_cast&lt;SVGPropertyTearOff&lt;ParentType&gt;*&gt;(m_parent.get())-&gt;propertyReference().*m_update)();
-        m_parent-&gt;commitChange();
-    }
-
-private:
-    SVGStaticPropertyWithParentTearOff(SVGProperty* parent, PropertyType&amp; value, UpdateMethod update)
-        : SVGPropertyTearOff&lt;PropertyType&gt;(0, UndefinedRole, value)
-        , m_update(update)
-        , m_parent(parent)
-    {
-    }
-
-    UpdateMethod m_update;
-    RefPtr&lt;SVGProperty&gt; m_parent;
-};
-#if COMPILER(MSVC)
-#pragma pack(pop)
-#endif
-
-}
-
-#endif // ENABLE(SVG)
-#endif // SVGStaticPropertyWithParentTearOff_h
</del></span></pre>
</div>
</div>

</body>
</html>