<!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>[168176] branches/safari-537.76-branch</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/168176">168176</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2014-05-02 11:12:04 -0700 (Fri, 02 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/164917">r164917</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari53776branchLayoutTestsChangeLog">branches/safari-537.76-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari53776branchSourceWebCoreChangeLog">branches/safari-537.76-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari53776branchSourceWebCoreGNUmakefilelistam">branches/safari-537.76-branch/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#branchessafari53776branchSourceWebCoreWebCorevcxprojWebCorevcxproj">branches/safari-537.76-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#branchessafari53776branchSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">branches/safari-537.76-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#branchessafari53776branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-537.76-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari53776branchSourceWebCorebindingsscriptsCodeGeneratorJSpm">branches/safari-537.76-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#branchessafari53776branchSourceWebCoresvgpropertiesSVGPropertyTearOffh">branches/safari-537.76-branch/Source/WebCore/svg/properties/SVGPropertyTearOff.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari53776branchLayoutTestssvgtransformssvgmatrixtearoffcrashexpectedtxt">branches/safari-537.76-branch/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt</a></li>
<li><a href="#branchessafari53776branchLayoutTestssvgtransformssvgmatrixtearoffcrashhtml">branches/safari-537.76-branch/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html</a></li>
<li><a href="#branchessafari53776branchSourceWebCoresvgpropertiesSVGMatrixTearOffh">branches/safari-537.76-branch/Source/WebCore/svg/properties/SVGMatrixTearOff.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari53776branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/LayoutTests/ChangeLog (168175 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/LayoutTests/ChangeLog        2014-05-02 17:29:22 UTC (rev 168175)
+++ branches/safari-537.76-branch/LayoutTests/ChangeLog        2014-05-02 18:12:04 UTC (rev 168176)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2014-05-01  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r164917.
+
+    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.
+    
+2014-05-01  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r167295.
</span><span class="cx"> 
</span><span class="cx">     2014-04-14  Jon Honeycutt  &lt;jhoneycutt@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari53776branchLayoutTestssvgtransformssvgmatrixtearoffcrashexpectedtxtfromrev164917trunkLayoutTestssvgtransformssvgmatrixtearoffcrashexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-537.76-branch/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt (from rev 164917, trunk/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt) (0 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt                                (rev 0)
+++ branches/safari-537.76-branch/LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt        2014-05-02 18:12:04 UTC (rev 168176)
</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="branchessafari53776branchLayoutTestssvgtransformssvgmatrixtearoffcrashhtmlfromrev164917trunkLayoutTestssvgtransformssvgmatrixtearoffcrashhtml"></a>
<div class="copfile"><h4>Copied: branches/safari-537.76-branch/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html (from rev 164917, trunk/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html) (0 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html                                (rev 0)
+++ branches/safari-537.76-branch/LayoutTests/svg/transforms/svg-matrix-tearoff-crash.html        2014-05-02 18:12:04 UTC (rev 168176)
</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="branchessafari53776branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/ChangeLog (168175 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/ChangeLog        2014-05-02 17:29:22 UTC (rev 168175)
+++ branches/safari-537.76-branch/Source/WebCore/ChangeLog        2014-05-02 18:12:04 UTC (rev 168176)
</span><span class="lines">@@ -1,5 +1,46 @@
</span><span class="cx"> 2014-05-01  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r164917.
+
+    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):
+    
+2014-05-01  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r167295.
</span><span class="cx"> 
</span><span class="cx">     2014-04-14  Jon Honeycutt  &lt;jhoneycutt@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari53776branchSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/GNUmakefile.list.am (168175 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/GNUmakefile.list.am        2014-05-02 17:29:22 UTC (rev 168175)
+++ branches/safari-537.76-branch/Source/WebCore/GNUmakefile.list.am        2014-05-02 18:12:04 UTC (rev 168176)
</span><span class="lines">@@ -5002,6 +5002,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">@@ -5010,7 +5011,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="branchessafari53776branchSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (168175 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-05-02 17:29:22 UTC (rev 168175)
+++ branches/safari-537.76-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-05-02 18:12:04 UTC (rev 168176)
</span><span class="lines">@@ -20478,6 +20478,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">@@ -20485,7 +20486,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="branchessafari53776branchSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (168175 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-05-02 17:29:22 UTC (rev 168175)
+++ branches/safari-537.76-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-05-02 18:12:04 UTC (rev 168176)
</span><span class="lines">@@ -12012,6 +12012,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">@@ -12033,9 +12036,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="branchessafari53776branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (168175 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-02 17:29:22 UTC (rev 168175)
+++ branches/safari-537.76-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-05-02 18:12:04 UTC (rev 168176)
</span><span class="lines">@@ -213,7 +213,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">@@ -6431,7 +6431,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">@@ -12986,6 +12986,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">@@ -12994,7 +12995,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">@@ -23575,6 +23575,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">@@ -23640,7 +23641,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">                                 B2227AB80D00BF220071B783 /* SVGStyledElement.h in Headers */,
</span></span></pre></div>
<a id="branchessafari53776branchSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (168175 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2014-05-02 17:29:22 UTC (rev 168175)
+++ branches/safari-537.76-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2014-05-02 18:12:04 UTC (rev 168176)
</span><span class="lines">@@ -3686,16 +3686,15 @@
</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, /;
</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"> 
</span><span class="cx">                 if ($value =~ /matrix/ and $interfaceName eq &quot;SVGTransform&quot;) {
</span><span class="cx">                     # SVGTransform offers a matrix() method for internal usage that returns an AffineTransform
</span><span class="cx">                     # and a svgMatrix() method returning a SVGMatrix, used for the bindings.
</span><span class="cx">                     $value =~ s/matrix/svgMatrix/;
</span><span class="cx">                 }
</span><del>-
-                $value = &quot;${tearOffType}::create(castedThis-&gt;impl(), $value, $updateMethod)&quot;;
</del><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="branchessafari53776branchSourceWebCoresvgpropertiesSVGMatrixTearOffhfromrev164917trunkSourceWebCoresvgpropertiesSVGMatrixTearOffh"></a>
<div class="copfile"><h4>Copied: branches/safari-537.76-branch/Source/WebCore/svg/properties/SVGMatrixTearOff.h (from rev 164917, trunk/Source/WebCore/svg/properties/SVGMatrixTearOff.h) (0 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/svg/properties/SVGMatrixTearOff.h                                (rev 0)
+++ branches/safari-537.76-branch/Source/WebCore/svg/properties/SVGMatrixTearOff.h        2014-05-02 18:12:04 UTC (rev 168176)
</span><span class="lines">@@ -0,0 +1,60 @@
</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
+
+#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;* parent, SVGMatrix&amp; value)
+    {
+        RefPtr&lt;SVGMatrixTearOff&gt; result = adoptRef(new SVGMatrixTearOff(parent, value));
+        parent-&gt;addChild(result-&gt;m_weakFactory.createWeakPtr());
+        return result.release();
+    }
+
+    virtual void commitChange()
+    {
+        m_parent-&gt;propertyReference().updateMatrix();
+        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 // SVGMatrixTearOff_h
</ins></span></pre></div>
<a id="branchessafari53776branchSourceWebCoresvgpropertiesSVGPropertyTearOffh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/svg/properties/SVGPropertyTearOff.h (168175 => 168176)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/svg/properties/SVGPropertyTearOff.h        2014-05-02 17:29:22 UTC (rev 168175)
+++ branches/safari-537.76-branch/Source/WebCore/svg/properties/SVGPropertyTearOff.h        2014-05-02 18:12:04 UTC (rev 168176)
</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>
</div>

</body>
</html>