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

Unified Diff: Source/core/testing/Internals.cpp

Issue 237963014: Track scroll event handlers in nested documents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Oilpan build fix. Created 6 years, 8 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
« no previous file with comments | « Source/core/page/Page.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 10f83a5affbba066e4aed8d8cd1ffabc9002db29..5c65e593315a69569d2d1a960f074b09d3cfdae1 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -56,7 +56,6 @@
#include "core/dom/DocumentMarker.h"
#include "core/dom/DocumentMarkerController.h"
#include "core/dom/Element.h"
-#include "core/dom/EventHandlerRegistry.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/FullscreenElementStack.h"
#include "core/dom/NodeRenderStyle.h"
@@ -105,6 +104,7 @@
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/EventHandler.h"
+#include "core/page/EventHandlerRegistry.h"
#include "core/page/Page.h"
#include "core/page/PagePopupController.h"
#include "core/page/PrintContext.h"
@@ -1248,7 +1248,9 @@ unsigned Internals::activeDOMObjectCount(Document* document, ExceptionState& exc
static unsigned eventHandlerCount(Document& document, EventHandlerRegistry::EventHandlerClass handlerClass)
{
- EventHandlerRegistry* registry = EventHandlerRegistry::from(document);
+ if (!document.page())
+ return 0;
+ EventHandlerRegistry* registry = EventHandlerRegistry::from(*document.page());
unsigned count = 0;
const EventTargetSet* targets = registry->eventHandlerTargets(handlerClass);
if (targets) {
« no previous file with comments | « Source/core/page/Page.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698