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

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

Issue 391483002: Revert 177812 "Migrate touch events to EventHandlerRegistry" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 5 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 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 return eventHandlerCount(*document, EventHandlerRegistry::ScrollEvent); 1303 return eventHandlerCount(*document, EventHandlerRegistry::ScrollEvent);
1304 } 1304 }
1305 1305
1306 unsigned Internals::touchEventHandlerCount(Document* document, ExceptionState& e xceptionState) 1306 unsigned Internals::touchEventHandlerCount(Document* document, ExceptionState& e xceptionState)
1307 { 1307 {
1308 if (!document) { 1308 if (!document) {
1309 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available."); 1309 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available.");
1310 return 0; 1310 return 0;
1311 } 1311 }
1312 1312
1313 return eventHandlerCount(*document, EventHandlerRegistry::TouchEvent); 1313 const TouchEventTargetSet* touchHandlers = document->touchEventTargets();
1314 if (!touchHandlers)
1315 return 0;
1316
1317 unsigned count = 0;
1318 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter != touchHandlers->end(); ++iter)
1319 count += iter->value;
1320 return count;
1314 } 1321 }
1315 1322
1316 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) 1323 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType)
1317 { 1324 {
1318 *layerOffset = IntSize(); 1325 *layerOffset = IntSize();
1319 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot-> compositedLayerMapping()->mainGraphicsLayer()) { 1326 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot-> compositedLayerMapping()->mainGraphicsLayer()) {
1320 LayoutRect rect; 1327 LayoutRect rect;
1321 RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), re ct); 1328 RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), re ct);
1322 *layerOffset = IntSize(rect.x(), rect.y()); 1329 *layerOffset = IntSize(rect.x(), rect.y());
1323 return searchRoot; 1330 return searchRoot;
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
2350 } 2357 }
2351 networkStateNotifier().setWebConnectionTypeForTest(webtype); 2358 networkStateNotifier().setWebConnectionTypeForTest(webtype);
2352 } 2359 }
2353 2360
2354 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context) 2361 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context)
2355 { 2362 {
2356 return context->hitRegionsCount(); 2363 return context->hitRegionsCount();
2357 } 2364 }
2358 2365
2359 } // namespace WebCore 2366 } // namespace WebCore
OLDNEW
« no previous file with comments | « trunk/Source/core/rendering/RenderObject.cpp ('k') | trunk/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698