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 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 unsigned count = 0; | 1297 unsigned count = 0; |
1298 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) | 1298 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) |
1299 count += iter->value; | 1299 count += iter->value; |
1300 return count; | 1300 return count; |
1301 } | 1301 } |
1302 | 1302 |
1303 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) | 1303 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra
phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) |
1304 { | 1304 { |
1305 *layerOffset = IntSize(); | 1305 *layerOffset = IntSize(); |
1306 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->
compositedLayerMapping()->mainGraphicsLayer()) { | 1306 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot->
compositedLayerMapping()->mainGraphicsLayer()) { |
1307 CompositedLayerMappingPtr compositedLayerMapping = searchRoot->composite
dLayerMapping(); | 1307 LayoutRect rect; |
1308 LayoutSize offset = compositedLayerMapping->contentOffsetInCompositingLa
yer(); | 1308 RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), re
ct); |
1309 *layerOffset = IntSize(offset.width(), offset.height()); | 1309 *layerOffset = IntSize(rect.x(), rect.y()); |
1310 return searchRoot; | 1310 return searchRoot; |
1311 } | 1311 } |
1312 | 1312 |
1313 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot
->scrollableArea()->layerForScrolling() : 0; | 1313 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot
->scrollableArea()->layerForScrolling() : 0; |
1314 if (graphicsLayer == layerForScrolling) { | 1314 if (graphicsLayer == layerForScrolling) { |
1315 *layerType = "scrolling"; | 1315 *layerType = "scrolling"; |
1316 return searchRoot; | 1316 return searchRoot; |
1317 } | 1317 } |
1318 | 1318 |
1319 if (searchRoot->compositingState() == PaintsIntoGroupedBacking) { | 1319 if (searchRoot->compositingState() == PaintsIntoGroupedBacking) { |
1320 GraphicsLayer* squashingLayer = searchRoot->groupedMapping()->squashingL
ayer(); | 1320 GraphicsLayer* squashingLayer = searchRoot->groupedMapping()->squashingL
ayer(); |
1321 if (graphicsLayer == squashingLayer) { | 1321 if (graphicsLayer == squashingLayer) { |
1322 *layerType ="squashing"; | 1322 *layerType ="squashing"; |
1323 *layerOffset = -searchRoot->offsetFromSquashingLayerOrigin(); | 1323 LayoutRect rect; |
| 1324 RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer()
, rect); |
| 1325 *layerOffset = IntSize(rect.x(), rect.y()); |
1324 return searchRoot; | 1326 return searchRoot; |
1325 } | 1327 } |
1326 } | 1328 } |
1327 | 1329 |
1328 GraphicsLayer* layerForHorizontalScrollbar = searchRoot->scrollableArea() ?
searchRoot->scrollableArea()->layerForHorizontalScrollbar() : 0; | 1330 GraphicsLayer* layerForHorizontalScrollbar = searchRoot->scrollableArea() ?
searchRoot->scrollableArea()->layerForHorizontalScrollbar() : 0; |
1329 if (graphicsLayer == layerForHorizontalScrollbar) { | 1331 if (graphicsLayer == layerForHorizontalScrollbar) { |
1330 *layerType = "horizontalScrollbar"; | 1332 *layerType = "horizontalScrollbar"; |
1331 return searchRoot; | 1333 return searchRoot; |
1332 } | 1334 } |
1333 | 1335 |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2334 } | 2336 } |
2335 networkStateNotifier().setWebConnectionTypeForTest(webtype); | 2337 networkStateNotifier().setWebConnectionTypeForTest(webtype); |
2336 } | 2338 } |
2337 | 2339 |
2338 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context) | 2340 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context) |
2339 { | 2341 { |
2340 return context->hitRegionsCount(); | 2342 return context->hitRegionsCount(); |
2341 } | 2343 } |
2342 | 2344 |
2343 } // namespace WebCore | 2345 } // namespace WebCore |
OLD | NEW |