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

Unified Diff: third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp

Issue 2578873004: Simplify by using the same code for didMoveIntoFrameHost and MoveBetween. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
diff --git a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
index 49df064719b01e83a1f281be20e93eac41d121ee..b088b797fccfd7d94d5bce1925af3ef97b612c82 100644
--- a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
+++ b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp
@@ -191,15 +191,8 @@ void EventHandlerRegistry::didMoveBetweenFrameHosts(EventTarget& target,
FrameHost* oldFrameHost,
FrameHost* newFrameHost) {
ASSERT(newFrameHost != oldFrameHost);
- for (size_t i = 0; i < EventHandlerClassCount; ++i) {
- EventHandlerClass handlerClass = static_cast<EventHandlerClass>(i);
- const EventTargetSet* targets =
- &oldFrameHost->eventHandlerRegistry().m_targets[handlerClass];
- for (unsigned count = targets->count(&target); count > 0; --count)
- newFrameHost->eventHandlerRegistry().didAddEventHandler(target,
- handlerClass);
- }
- oldFrameHost->eventHandlerRegistry().didRemoveAllEventHandlers(target);
+ oldFrameHost->eventHandlerRegistry().didMoveOutOfFrameHost(target);
+ newFrameHost->eventHandlerRegistry().didMoveIntoFrameHost(target);
}
void EventHandlerRegistry::didRemoveAllEventHandlers(EventTarget& target) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698