Title: [155234] trunk/Source/WebCore
Revision
155234
Author
[email protected]
Date
2013-09-06 21:15:35 -0700 (Fri, 06 Sep 2013)

Log Message

Elements retained by AccessibilityImageMapLink leak
https://bugs.webkit.org/show_bug.cgi?id=120917

Reviewed by Chris Fleizach.

Merge https://chromium.googlesource.com/chromium/blink/+/df0bd288efe65e5e38425fbdcdfc68b5a2a79e42

Unfortunately, the test added by the Blink change doesn't reproduce a leak in WebKit.

* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::detachFromParent):
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::detachFromParent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (155233 => 155234)


--- trunk/Source/WebCore/ChangeLog	2013-09-07 02:38:12 UTC (rev 155233)
+++ trunk/Source/WebCore/ChangeLog	2013-09-07 04:15:35 UTC (rev 155234)
@@ -1,3 +1,20 @@
+2013-09-06  Ryosuke Niwa  <[email protected]>
+
+        Elements retained by AccessibilityImageMapLink leak
+        https://bugs.webkit.org/show_bug.cgi?id=120917
+
+        Reviewed by Chris Fleizach.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/df0bd288efe65e5e38425fbdcdfc68b5a2a79e42
+
+        Unfortunately, the test added by the Blink change doesn't reproduce a leak in WebKit.
+
+        * accessibility/AccessibilityImageMapLink.cpp:
+        (WebCore::AccessibilityImageMapLink::detachFromParent):
+        * accessibility/AccessibilityImageMapLink.h:
+        * accessibility/AccessibilityMockObject.h:
+        (WebCore::AccessibilityMockObject::detachFromParent):
+
 2013-09-06  Andreas Kling  <[email protected]>
 
         Make Obj-C bindings generator less #include-happy.

Modified: trunk/Source/WebCore/accessibility/AccessibilityImageMapLink.cpp (155233 => 155234)


--- trunk/Source/WebCore/accessibility/AccessibilityImageMapLink.cpp	2013-09-07 02:38:12 UTC (rev 155233)
+++ trunk/Source/WebCore/accessibility/AccessibilityImageMapLink.cpp	2013-09-07 04:15:35 UTC (rev 155234)
@@ -147,7 +147,14 @@
     
     return renderer;
 }
-    
+
+void AccessibilityImageMapLink::detachFromParent()
+{
+    AccessibilityMockObject::detachFromParent();
+    m_areaElement = 0;
+    m_mapElement = 0;
+}
+
 Path AccessibilityImageMapLink::elementPath() const
 {
     RenderObject* renderer = imageMapLinkRenderer();

Modified: trunk/Source/WebCore/accessibility/AccessibilityImageMapLink.h (155233 => 155234)


--- trunk/Source/WebCore/accessibility/AccessibilityImageMapLink.h	2013-09-07 02:38:12 UTC (rev 155233)
+++ trunk/Source/WebCore/accessibility/AccessibilityImageMapLink.h	2013-09-07 04:15:35 UTC (rev 155234)
@@ -71,7 +71,9 @@
 private:    
     RefPtr<HTMLAreaElement> m_areaElement;
     RefPtr<HTMLMapElement> m_mapElement;
-    
+
+    virtual void detachFromParent() OVERRIDE;
+
     virtual Path elementPath() const;
     RenderObject* imageMapLinkRenderer() const;
     virtual void accessibilityText(Vector<AccessibilityText>&);

Modified: trunk/Source/WebCore/accessibility/AccessibilityMockObject.h (155233 => 155234)


--- trunk/Source/WebCore/accessibility/AccessibilityMockObject.h	2013-09-07 02:38:12 UTC (rev 155233)
+++ trunk/Source/WebCore/accessibility/AccessibilityMockObject.h	2013-09-07 04:15:35 UTC (rev 155234)
@@ -40,16 +40,17 @@
     virtual AccessibilityObject* parentObject() const { return m_parent; }
     virtual void setParent(AccessibilityObject* parent) { m_parent = parent; };
     virtual bool isEnabled() const { return true; }
-    
+
 protected:
     AccessibilityObject* m_parent;
 
+    // Must be called when the parent object clears its children.
+    virtual void detachFromParent() { m_parent = 0; }
+
 private:
     virtual bool isMockObject() const { return true; }
 
     virtual bool computeAccessibilityIsIgnored() const;
-    // Must be called when the parent object clears its children.
-    virtual void detachFromParent() { m_parent = 0; }
 }; 
     
 inline AccessibilityMockObject* toAccessibilityMockObject(AccessibilityObject* object)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to