Eliminate CachedFrame::m_mousePressNode
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Apr 2014 21:24:04 +0000 (21:24 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Apr 2014 21:24:04 +0000 (21:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131626

Reviewed by Brady Eidson.

I couldn't find any observable effect of this change.

* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::clear):
* history/CachedFrame.h:
(WebCore::CachedFrame::documentLoader):
(WebCore::CachedFrame::mousePressNode): Deleted.
Eliminated m_mousePressNode, accessor, and code that reached out to EventHandler.

* page/EventHandler.cpp:
(WebCore::EventHandler::mousePressNode): Deleted.
(WebCore::EventHandler::setMousePressNode): Deleted.
* page/EventHandler.h:
(WebCore::EventHandler::setMousePressed): Deleted. This function was already unused.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167267 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/history/CachedFrame.cpp
Source/WebCore/history/CachedFrame.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/EventHandler.h

index 1bafd1c..9390fd9 100644 (file)
@@ -1,3 +1,27 @@
+2014-04-14  Alexey Proskuryakov  <ap@apple.com>
+
+        Eliminate CachedFrame::m_mousePressNode
+        https://bugs.webkit.org/show_bug.cgi?id=131626
+
+        Reviewed by Brady Eidson.
+
+        I couldn't find any observable effect of this change.
+
+        * history/CachedFrame.cpp:
+        (WebCore::CachedFrameBase::CachedFrameBase):
+        (WebCore::CachedFrameBase::restore):
+        (WebCore::CachedFrame::clear):
+        * history/CachedFrame.h:
+        (WebCore::CachedFrame::documentLoader):
+        (WebCore::CachedFrame::mousePressNode): Deleted.
+        Eliminated m_mousePressNode, accessor, and code that reached out to EventHandler.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::mousePressNode): Deleted.
+        (WebCore::EventHandler::setMousePressNode): Deleted.
+        * page/EventHandler.h:
+        (WebCore::EventHandler::setMousePressed): Deleted. This function was already unused.
+
 2014-04-14  Simon Fraser  <simon.fraser@apple.com>
 
         Run filter animations in the UI process with UI-side compositing
index 84a9a94..348690a 100644 (file)
@@ -31,7 +31,6 @@
 #include "DOMWindow.h"
 #include "Document.h"
 #include "DocumentLoader.h"
-#include "EventHandler.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
 #include "FocusController.h"
@@ -64,7 +63,6 @@ CachedFrameBase::CachedFrameBase(Frame& frame)
     : m_document(frame.document())
     , m_documentLoader(frame.loader().documentLoader())
     , m_view(frame.view())
-    , m_mousePressNode(frame.eventHandler().mousePressNode())
     , m_url(frame.document()->url())
     , m_isMainFrame(!frame.tree().parent())
     , m_isComposited(frame.view()->hasCompositedContent())
@@ -94,7 +92,6 @@ void CachedFrameBase::restore()
         m_document->accessSVGExtensions()->unpauseAnimations();
 
     frame.animation().resumeAnimationsForDocument(m_document.get());
-    frame.eventHandler().setMousePressNode(m_mousePressNode.get());
     m_document->resumeActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInactive);
     m_document->resumeScriptedAnimationControllerCallbacks();
 
@@ -238,7 +235,6 @@ void CachedFrame::clear()
 
     m_document = nullptr;
     m_view = nullptr;
-    m_mousePressNode = nullptr;
     m_url = URL();
 
     m_cachedFramePlatformData = nullptr;
index 30c3686..497cc6f 100644 (file)
@@ -56,7 +56,6 @@ protected:
     RefPtr<Document> m_document;
     RefPtr<DocumentLoader> m_documentLoader;
     RefPtr<FrameView> m_view;
-    RefPtr<Node> m_mousePressNode;
     URL m_url;
     std::unique_ptr<ScriptCachedFrameData> m_cachedFrameScriptData;
     std::unique_ptr<CachedFramePlatformData> m_cachedFramePlatformData;
@@ -81,7 +80,6 @@ public:
     using CachedFrameBase::view;
     using CachedFrameBase::url;
     DocumentLoader* documentLoader() const { return m_documentLoader.get(); }
-    Node* mousePressNode() const { return m_mousePressNode.get(); }
 
     int descendantFrameCount() const;
 };
index f3e60c9..b2b529e 100644 (file)
@@ -1094,16 +1094,6 @@ void EventHandler::stopAutoscrollTimer(bool rendererIsBeingDestroyed)
     m_autoscrollController->stopAutoscrollTimer(rendererIsBeingDestroyed);
 }
 
-Node* EventHandler::mousePressNode() const
-{
-    return m_mousePressNode.get();
-}
-
-void EventHandler::setMousePressNode(PassRefPtr<Node> node)
-{
-    m_mousePressNode = node;
-}
-
 bool EventHandler::scrollOverflow(ScrollDirection direction, ScrollGranularity granularity, Node* startingNode)
 {
     Node* node = startingNode;
index 84f7cbf..7ef797b 100644 (file)
@@ -130,9 +130,6 @@ public:
     void updateSelectionForMouseDrag();
 #endif
 
-    Node* mousePressNode() const;
-    void setMousePressNode(PassRefPtr<Node>);
-
 #if ENABLE(PAN_SCROLLING)
     void didPanScrollStart();
     void didPanScrollStop();
@@ -154,7 +151,7 @@ public:
         const LayoutSize& padding = LayoutSize());
 
     bool mousePressed() const { return m_mousePressed; }
-    void setMousePressed(bool pressed) { m_mousePressed = pressed; }
+    Node* mousePressNode() const { return m_mousePressNode.get(); }
 
     void setCapturingMouseEventsElement(PassRefPtr<Element>); // A caller is responsible for resetting capturing element to 0.