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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 225823007: Migrate wheel events to EventHandlerRegistry (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "core/dom/DocumentMarkerController.h" 57 #include "core/dom/DocumentMarkerController.h"
58 #include "core/dom/Element.h" 58 #include "core/dom/Element.h"
59 #include "core/dom/ExceptionCode.h" 59 #include "core/dom/ExceptionCode.h"
60 #include "core/dom/FullscreenElementStack.h" 60 #include "core/dom/FullscreenElementStack.h"
61 #include "core/dom/NodeRenderStyle.h" 61 #include "core/dom/NodeRenderStyle.h"
62 #include "core/dom/PseudoElement.h" 62 #include "core/dom/PseudoElement.h"
63 #include "core/dom/Range.h" 63 #include "core/dom/Range.h"
64 #include "core/dom/StaticNodeList.h" 64 #include "core/dom/StaticNodeList.h"
65 #include "core/dom/TreeScope.h" 65 #include "core/dom/TreeScope.h"
66 #include "core/dom/ViewportDescription.h" 66 #include "core/dom/ViewportDescription.h"
67 #include "core/dom/WheelController.h"
68 #include "core/dom/shadow/ComposedTreeWalker.h" 67 #include "core/dom/shadow/ComposedTreeWalker.h"
69 #include "core/dom/shadow/ElementShadow.h" 68 #include "core/dom/shadow/ElementShadow.h"
70 #include "core/dom/shadow/SelectRuleFeatureSet.h" 69 #include "core/dom/shadow/SelectRuleFeatureSet.h"
71 #include "core/dom/shadow/ShadowRoot.h" 70 #include "core/dom/shadow/ShadowRoot.h"
72 #include "core/editing/Editor.h" 71 #include "core/editing/Editor.h"
73 #include "core/editing/PlainTextRange.h" 72 #include "core/editing/PlainTextRange.h"
74 #include "core/editing/SpellCheckRequester.h" 73 #include "core/editing/SpellCheckRequester.h"
75 #include "core/editing/SpellChecker.h" 74 #include "core/editing/SpellChecker.h"
76 #include "core/editing/SurroundingText.h" 75 #include "core/editing/SurroundingText.h"
77 #include "core/editing/TextIterator.h" 76 #include "core/editing/TextIterator.h"
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 return count; 1261 return count;
1263 } 1262 }
1264 1263
1265 unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& e xceptionState) 1264 unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& e xceptionState)
1266 { 1265 {
1267 if (!document) { 1266 if (!document) {
1268 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available."); 1267 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available.");
1269 return 0; 1268 return 0;
1270 } 1269 }
1271 1270
1272 return WheelController::from(*document)->wheelEventHandlerCount(); 1271 return eventHandlerCount(*document, EventHandlerRegistry::WheelEvent);
1273 } 1272 }
1274 1273
1275 unsigned Internals::scrollEventHandlerCount(Document* document, ExceptionState& exceptionState) 1274 unsigned Internals::scrollEventHandlerCount(Document* document, ExceptionState& exceptionState)
1276 { 1275 {
1277 if (!document) { 1276 if (!document) {
1278 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available."); 1277 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available.");
1279 return 0; 1278 return 0;
1280 } 1279 }
1281 1280
1282 return eventHandlerCount(*document, EventHandlerRegistry::ScrollEvent); 1281 return eventHandlerCount(*document, EventHandlerRegistry::ScrollEvent);
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
2369 } else if (type == "none") { 2368 } else if (type == "none") {
2370 webtype = blink::ConnectionTypeNone; 2369 webtype = blink::ConnectionTypeNone;
2371 } else { 2370 } else {
2372 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile dToEnumerate("connection type", type)); 2371 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile dToEnumerate("connection type", type));
2373 return; 2372 return;
2374 } 2373 }
2375 networkStateNotifier().setWebConnectionTypeForTest(webtype); 2374 networkStateNotifier().setWebConnectionTypeForTest(webtype);
2376 } 2375 }
2377 2376
2378 } // namespace WebCore 2377 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698