Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 23728003: Return Frame&, not Frame* from RenderView::frame() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed PopupMenuTest build Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/FrameView.cpp ('k') | Source/core/platform/Scrollbar.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « Source/core/page/FrameView.cpp ('k') | Source/core/platform/Scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698