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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 if (m_page->mainFrame()->view()->needsLayout()) | 504 if (m_page->mainFrame()->view()->needsLayout()) |
505 return; | 505 return; |
506 | 506 |
507 TRACE_EVENT0("input", "ScrollingCoordinator::touchEventTargetRectsDidChange"
); | 507 TRACE_EVENT0("input", "ScrollingCoordinator::touchEventTargetRectsDidChange"
); |
508 | 508 |
509 LayerHitTestRects touchEventTargetRects; | 509 LayerHitTestRects touchEventTargetRects; |
510 computeTouchEventTargetRects(touchEventTargetRects); | 510 computeTouchEventTargetRects(touchEventTargetRects); |
511 setTouchEventTargetRects(touchEventTargetRects); | 511 setTouchEventTargetRects(touchEventTargetRects); |
512 } | 512 } |
513 | 513 |
| 514 void ScrollingCoordinator::updateScrollParentForLayer(RenderLayer* child, Render
Layer* parent) |
| 515 { |
| 516 WebLayer* childWebLayer = scrollingWebLayerForGraphicsLayer(child->layerForS
crollChild()); |
| 517 if (!childWebLayer) |
| 518 return; |
| 519 |
| 520 WebLayer* scrollParentWebLayer = 0; |
| 521 if (parent && parent->backing()) |
| 522 scrollParentWebLayer = scrollingWebLayerForGraphicsLayer(parent->backing
()->parentForSublayers()); |
| 523 |
| 524 childWebLayer->setScrollParent(scrollParentWebLayer); |
| 525 } |
| 526 |
| 527 void ScrollingCoordinator::updateClipParentForLayer(RenderLayer* child, RenderLa
yer* parent) |
| 528 { |
| 529 WebLayer* childWebLayer = scrollingWebLayerForGraphicsLayer(child->backing()
->graphicsLayer()); |
| 530 if (!childWebLayer) |
| 531 return; |
| 532 |
| 533 WebLayer* clipParentWebLayer = 0; |
| 534 if (parent && parent->backing()) |
| 535 clipParentWebLayer = scrollingWebLayerForGraphicsLayer(parent->backing()
->parentForSublayers()); |
| 536 |
| 537 childWebLayer->setClipParent(clipParentWebLayer); |
| 538 } |
| 539 |
514 void ScrollingCoordinator::willDestroyRenderLayer(RenderLayer* layer) | 540 void ScrollingCoordinator::willDestroyRenderLayer(RenderLayer* layer) |
515 { | 541 { |
516 m_layersWithTouchRects.remove(layer); | 542 m_layersWithTouchRects.remove(layer); |
517 } | 543 } |
518 | 544 |
519 void ScrollingCoordinator::setWheelEventHandlerCount(unsigned count) | 545 void ScrollingCoordinator::setWheelEventHandlerCount(unsigned count) |
520 { | 546 { |
521 if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainF
rame()->view())) | 547 if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainF
rame()->view())) |
522 scrollLayer->setHaveWheelEventHandlers(count > 0); | 548 scrollLayer->setHaveWheelEventHandlers(count > 0); |
523 } | 549 } |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 stringBuilder.resize(stringBuilder.length() - 2); | 854 stringBuilder.resize(stringBuilder.length() - 2); |
829 return stringBuilder.toString(); | 855 return stringBuilder.toString(); |
830 } | 856 } |
831 | 857 |
832 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const | 858 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const |
833 { | 859 { |
834 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); | 860 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); |
835 } | 861 } |
836 | 862 |
837 } // namespace WebCore | 863 } // namespace WebCore |
OLD | NEW |