Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: Source/core/dom/Node.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 0623975c6ac9cafdefc013ea77129692341cf520..607e6fcf78866e0fd601105dfe6859cde49538c8 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -1944,17 +1944,17 @@ void Node::didMoveToNewDocument(Document& oldDocument)
}
const EventListenerVector& mousewheelListeners = getEventListeners(EventTypeNames::mousewheel);
- WheelController* oldController = WheelController::from(&oldDocument);
- WheelController* newController = WheelController::from(&document());
+ WheelController* oldController = WheelController::from(oldDocument);
+ WheelController* newController = WheelController::from(document());
for (size_t i = 0; i < mousewheelListeners.size(); ++i) {
- oldController->didRemoveWheelEventHandler(&oldDocument);
- newController->didAddWheelEventHandler(&document());
+ oldController->didRemoveWheelEventHandler(oldDocument);
+ newController->didAddWheelEventHandler(document());
}
const EventListenerVector& wheelListeners = getEventListeners(EventTypeNames::wheel);
for (size_t i = 0; i < wheelListeners.size(); ++i) {
- oldController->didRemoveWheelEventHandler(&oldDocument);
- newController->didAddWheelEventHandler(&document());
+ oldController->didRemoveWheelEventHandler(oldDocument);
+ newController->didAddWheelEventHandler(document());
}
if (const TouchEventTargetSet* touchHandlers = oldDocument.touchEventTargets()) {
@@ -1985,7 +1985,7 @@ static inline bool tryAddEventListener(Node* targetNode, const AtomicString& eve
Document& document = targetNode->document();
document.addListenerTypeIfNeeded(eventType);
if (eventType == EventTypeNames::wheel || eventType == EventTypeNames::mousewheel)
- WheelController::from(&document)->didAddWheelEventHandler(&document);
+ WheelController::from(document)->didAddWheelEventHandler(document);
else if (isTouchEventType(eventType))
document.didAddTouchEventHandler(targetNode);
@@ -2006,7 +2006,7 @@ static inline bool tryRemoveEventListener(Node* targetNode, const AtomicString&
// listeners for each type, not just a bool - see https://bugs.webkit.org/show_bug.cgi?id=33861
Document& document = targetNode->document();
if (eventType == EventTypeNames::wheel || eventType == EventTypeNames::mousewheel)
- WheelController::from(&document)->didAddWheelEventHandler(&document);
+ WheelController::from(document)->didAddWheelEventHandler(document);
else if (isTouchEventType(eventType))
document.didRemoveTouchEventHandler(targetNode);

Powered by Google App Engine
This is Rietveld 408576698