OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |