| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 ASSERT(m_page); | 519 ASSERT(m_page); |
| 520 m_page = 0; | 520 m_page = 0; |
| 521 } | 521 } |
| 522 | 522 |
| 523 bool ScrollingCoordinator::coordinatesScrollingForFrameView(FrameView* frameView
) const | 523 bool ScrollingCoordinator::coordinatesScrollingForFrameView(FrameView* frameView
) const |
| 524 { | 524 { |
| 525 ASSERT(isMainThread()); | 525 ASSERT(isMainThread()); |
| 526 ASSERT(m_page); | 526 ASSERT(m_page); |
| 527 | 527 |
| 528 // We currently only handle the main frame. | 528 // We currently only handle the main frame. |
| 529 if (frameView->frame() != m_page->mainFrame()) | 529 if (&frameView->frame() != m_page->mainFrame()) |
| 530 return false; | 530 return false; |
| 531 | 531 |
| 532 // We currently only support composited mode. | 532 // We currently only support composited mode. |
| 533 RenderView* renderView = m_page->mainFrame()->contentRenderer(); | 533 RenderView* renderView = m_page->mainFrame()->contentRenderer(); |
| 534 if (!renderView) | 534 if (!renderView) |
| 535 return false; | 535 return false; |
| 536 return renderView->usesCompositing(); | 536 return renderView->usesCompositing(); |
| 537 } | 537 } |
| 538 | 538 |
| 539 Region ScrollingCoordinator::computeShouldHandleScrollGestureOnMainThreadRegion(
const Frame* frame, const IntPoint& frameLocation) const | 539 Region ScrollingCoordinator::computeShouldHandleScrollGestureOnMainThreadRegion(
const Frame* frame, const IntPoint& frameLocation) const |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 return scrollableArea->layerForVerticalScrollbar(); | 704 return scrollableArea->layerForVerticalScrollbar(); |
| 705 } | 705 } |
| 706 | 706 |
| 707 bool ScrollingCoordinator::isForMainFrame(ScrollableArea* scrollableArea) const | 707 bool ScrollingCoordinator::isForMainFrame(ScrollableArea* scrollableArea) const |
| 708 { | 708 { |
| 709 return scrollableArea == m_page->mainFrame()->view(); | 709 return scrollableArea == m_page->mainFrame()->view(); |
| 710 } | 710 } |
| 711 | 711 |
| 712 GraphicsLayer* ScrollingCoordinator::scrollLayerForFrameView(FrameView* frameVie
w) | 712 GraphicsLayer* ScrollingCoordinator::scrollLayerForFrameView(FrameView* frameVie
w) |
| 713 { | 713 { |
| 714 RenderView* renderView = frameView->frame()->contentRenderer(); | 714 RenderView* renderView = frameView->frame().contentRenderer(); |
| 715 if (!renderView) | 715 if (!renderView) |
| 716 return 0; | 716 return 0; |
| 717 return renderView->compositor()->scrollLayer(); | 717 return renderView->compositor()->scrollLayer(); |
| 718 } | 718 } |
| 719 | 719 |
| 720 GraphicsLayer* ScrollingCoordinator::counterScrollingLayerForFrameView(FrameView
*) | 720 GraphicsLayer* ScrollingCoordinator::counterScrollingLayerForFrameView(FrameView
*) |
| 721 { | 721 { |
| 722 return 0; | 722 return 0; |
| 723 } | 723 } |
| 724 | 724 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 stringBuilder.resize(stringBuilder.length() - 2); | 808 stringBuilder.resize(stringBuilder.length() - 2); |
| 809 return stringBuilder.toString(); | 809 return stringBuilder.toString(); |
| 810 } | 810 } |
| 811 | 811 |
| 812 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const | 812 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const |
| 813 { | 813 { |
| 814 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); | 814 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); |
| 815 } | 815 } |
| 816 | 816 |
| 817 } // namespace WebCore | 817 } // namespace WebCore |
| OLD | NEW |