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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 return eventHandlerCount(*document, EventHandlerRegistry::ScrollEvent); | 1272 return eventHandlerCount(*document, EventHandlerRegistry::ScrollEvent); |
1273 } | 1273 } |
1274 | 1274 |
1275 unsigned Internals::touchEventHandlerCount(Document* document, ExceptionState& e
xceptionState) | 1275 unsigned Internals::touchEventHandlerCount(Document* document, ExceptionState& e
xceptionState) |
1276 { | 1276 { |
1277 if (!document) { | 1277 if (!document) { |
1278 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); | 1278 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); |
1279 return 0; | 1279 return 0; |
1280 } | 1280 } |
1281 | 1281 |
1282 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); | 1282 return eventHandlerCount(*document, EventHandlerRegistry::TouchEvent); |
1283 if (!touchHandlers) | |
1284 return 0; | |
1285 | |
1286 unsigned count = 0; | |
1287 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) | |
1288 count += iter->value; | |
1289 return count; | |
1290 } | 1283 } |
1291 | 1284 |
1292 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) | 1285 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) |
1293 { | 1286 { |
1294 *layerOffset = IntSize(); | 1287 *layerOffset = IntSize(); |
1295 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->
compositedLayerMapping()->mainGraphicsLayer()) { | 1288 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->
compositedLayerMapping()->mainGraphicsLayer()) { |
1296 CompositedLayerMappingPtr compositedLayerMapping = searchRoot->composite
dLayerMapping(); | 1289 CompositedLayerMappingPtr compositedLayerMapping = searchRoot->composite
dLayerMapping(); |
1297 LayoutSize offset = compositedLayerMapping->contentOffsetInCompositingLa
yer(); | 1290 LayoutSize offset = compositedLayerMapping->contentOffsetInCompositingLa
yer(); |
1298 *layerOffset = IntSize(offset.width(), offset.height()); | 1291 *layerOffset = IntSize(offset.width(), offset.height()); |
1299 return searchRoot; | 1292 return searchRoot; |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2369 } else if (type == "none") { | 2362 } else if (type == "none") { |
2370 webtype = blink::ConnectionTypeNone; | 2363 webtype = blink::ConnectionTypeNone; |
2371 } else { | 2364 } else { |
2372 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); | 2365 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); |
2373 return; | 2366 return; |
2374 } | 2367 } |
2375 networkStateNotifier().setWebConnectionTypeForTest(webtype); | 2368 networkStateNotifier().setWebConnectionTypeForTest(webtype); |
2376 } | 2369 } |
2377 | 2370 |
2378 } // namespace WebCore | 2371 } // namespace WebCore |
OLD | NEW |