Title: [175485] trunk/Source/WebCore
Revision
175485
Author
akl...@apple.com
Date
2014-11-03 12:17:44 -0800 (Mon, 03 Nov 2014)

Log Message

RenderCounter shouldn't need a pre-destructor hook.
<https://webkit.org/b/138316>

Reviewed by Antti Koivisto.

RenderCounter will automatically register/unregister itself with
the RenderView when constructed/destroyed.

It was using a willBeDestroyed() hook because it used to be that you
couldn't get to the RenderView in the destructor. That's no longer
an issue as Document promises that RenderView is the last render tree
node to go away.

* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::~RenderCounter):
(WebCore::RenderCounter::willBeDestroyed): Deleted.
* rendering/RenderCounter.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (175484 => 175485)


--- trunk/Source/WebCore/ChangeLog	2014-11-03 20:08:22 UTC (rev 175484)
+++ trunk/Source/WebCore/ChangeLog	2014-11-03 20:17:44 UTC (rev 175485)
@@ -1,3 +1,23 @@
+2014-11-03  Andreas Kling  <akl...@apple.com>
+
+        RenderCounter shouldn't need a pre-destructor hook.
+        <https://webkit.org/b/138316>
+
+        Reviewed by Antti Koivisto.
+
+        RenderCounter will automatically register/unregister itself with
+        the RenderView when constructed/destroyed.
+
+        It was using a willBeDestroyed() hook because it used to be that you
+        couldn't get to the RenderView in the destructor. That's no longer
+        an issue as Document promises that RenderView is the last render tree
+        node to go away.
+
+        * rendering/RenderCounter.cpp:
+        (WebCore::RenderCounter::~RenderCounter):
+        (WebCore::RenderCounter::willBeDestroyed): Deleted.
+        * rendering/RenderCounter.h:
+
 2014-11-03  Tim Horton  <timothy_hor...@apple.com>
 
         Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap

Modified: trunk/Source/WebCore/rendering/RenderCounter.cpp (175484 => 175485)


--- trunk/Source/WebCore/rendering/RenderCounter.cpp	2014-11-03 20:08:22 UTC (rev 175484)
+++ trunk/Source/WebCore/rendering/RenderCounter.cpp	2014-11-03 20:17:44 UTC (rev 175485)
@@ -350,18 +350,14 @@
 
 RenderCounter::~RenderCounter()
 {
+    view().removeRenderCounter();
+
     if (m_counterNode) {
         m_counterNode->removeRenderer(this);
         ASSERT(!m_counterNode);
     }
 }
 
-void RenderCounter::willBeDestroyed()
-{
-    view().removeRenderCounter();
-    RenderText::willBeDestroyed();
-}
-
 const char* RenderCounter::renderName() const
 {
     return "RenderCounter";

Modified: trunk/Source/WebCore/rendering/RenderCounter.h (175484 => 175485)


--- trunk/Source/WebCore/rendering/RenderCounter.h	2014-11-03 20:08:22 UTC (rev 175484)
+++ trunk/Source/WebCore/rendering/RenderCounter.h	2014-11-03 20:17:44 UTC (rev 175485)
@@ -42,9 +42,6 @@
 
     void updateCounter();
 
-protected:
-    virtual void willBeDestroyed() override;
-
 private:
     virtual const char* renderName() const override;
     virtual bool isCounter() const override;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to