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

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

Issue 23483024: Assume FrameView::m_frame is never NULL (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/plugins/IFrameShimSupport.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 693 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 Frame* frame = frameView->frame(); 714 RenderView* renderView = frameView->frame()->contentRenderer();
715 if (!frame)
716 return 0;
717
718 RenderView* renderView = frame->contentRenderer();
719 if (!renderView) 715 if (!renderView)
720 return 0; 716 return 0;
721 return renderView->compositor()->scrollLayer(); 717 return renderView->compositor()->scrollLayer();
722 } 718 }
723 719
724 GraphicsLayer* ScrollingCoordinator::counterScrollingLayerForFrameView(FrameView *) 720 GraphicsLayer* ScrollingCoordinator::counterScrollingLayerForFrameView(FrameView *)
725 { 721 {
726 return 0; 722 return 0;
727 } 723 }
728 724
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 stringBuilder.resize(stringBuilder.length() - 2); 808 stringBuilder.resize(stringBuilder.length() - 2);
813 return stringBuilder.toString(); 809 return stringBuilder.toString();
814 } 810 }
815 811
816 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const 812 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const
817 { 813 {
818 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); 814 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons());
819 } 815 }
820 816
821 } // namespace WebCore 817 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/FrameView.cpp ('k') | Source/core/plugins/IFrameShimSupport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698