| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 layer = parentDocRenderer->enclosingLayer(); | 497 layer = parentDocRenderer->enclosingLayer(); |
| 498 touchHandlerInChildFrame = true; | 498 touchHandlerInChildFrame = true; |
| 499 } | 499 } |
| 500 } while (layer); | 500 } while (layer); |
| 501 } | 501 } |
| 502 | 502 |
| 503 // Now walk the layer projecting rects while maintaining a RenderGeometryMap | 503 // Now walk the layer projecting rects while maintaining a RenderGeometryMap |
| 504 MapCoordinatesFlags flags = UseTransforms; | 504 MapCoordinatesFlags flags = UseTransforms; |
| 505 if (touchHandlerInChildFrame) | 505 if (touchHandlerInChildFrame) |
| 506 flags |= TraverseDocumentBoundaries; | 506 flags |= TraverseDocumentBoundaries; |
| 507 RenderLayer* rootLayer = mainFrame->contentRenderer()->layer(); |
| 507 RenderGeometryMap geometryMap(flags); | 508 RenderGeometryMap geometryMap(flags); |
| 509 geometryMap.pushMappingsToAncestor(rootLayer, 0); |
| 508 LayerFrameMap layerChildFrameMap; | 510 LayerFrameMap layerChildFrameMap; |
| 509 makeLayerChildFrameMap(mainFrame, &layerChildFrameMap); | 511 makeLayerChildFrameMap(mainFrame, &layerChildFrameMap); |
| 510 convertLayerRectsToEnclosingCompositedLayerRecursive(mainFrame->contentRende
rer()->layer(), layerRects, compositorRects, geometryMap, layersWithRects, layer
ChildFrameMap); | 512 convertLayerRectsToEnclosingCompositedLayerRecursive(rootLayer, layerRects,
compositorRects, geometryMap, layersWithRects, layerChildFrameMap); |
| 511 } | 513 } |
| 512 | 514 |
| 513 void ScrollingCoordinator::updateTouchEventTargetRectsIfNeeded() | 515 void ScrollingCoordinator::updateTouchEventTargetRectsIfNeeded() |
| 514 { | 516 { |
| 515 TRACE_EVENT0("input", "ScrollingCoordinator::updateTouchEventTargetRectsIfNe
eded"); | 517 TRACE_EVENT0("input", "ScrollingCoordinator::updateTouchEventTargetRectsIfNe
eded"); |
| 516 | 518 |
| 517 if (!touchHitTestingEnabled()) | 519 if (!touchHitTestingEnabled()) |
| 518 return; | 520 return; |
| 519 | 521 |
| 520 LayerHitTestRects touchEventTargetRects; | 522 LayerHitTestRects touchEventTargetRects; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 bool frameIsScrollable = frameView && frameView->isScrollable(); | 952 bool frameIsScrollable = frameView && frameView->isScrollable(); |
| 951 if (frameIsScrollable != m_wasFrameScrollable) | 953 if (frameIsScrollable != m_wasFrameScrollable) |
| 952 return true; | 954 return true; |
| 953 | 955 |
| 954 if (WebLayer* scrollLayer = frameView ? scrollingWebLayerForScrollableArea(f
rameView) : 0) | 956 if (WebLayer* scrollLayer = frameView ? scrollingWebLayerForScrollableArea(f
rameView) : 0) |
| 955 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); | 957 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); |
| 956 return false; | 958 return false; |
| 957 } | 959 } |
| 958 | 960 |
| 959 } // namespace WebCore | 961 } // namespace WebCore |
| OLD | NEW |