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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 33353003: Have Frame::tree() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/SpatialNavigation.cpp ('k') | Source/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 3363b3012f0faa74af5b8d8f3cd6fd8d5e6319bd..7e5c633cd1d49d41131fd5077e1c2a89f02ef5c5 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -348,8 +348,8 @@ typedef HashMap<const RenderLayer*, Vector<const Frame*> > LayerFrameMap;
static void makeLayerChildFrameMap(const Frame* currentFrame, LayerFrameMap* map)
{
map->clear();
- const FrameTree* tree = currentFrame->tree();
- for (const Frame* child = tree->firstChild(); child; child = child->tree()->nextSibling()) {
+ const FrameTree& tree = currentFrame->tree();
+ for (const Frame* child = tree.firstChild(); child; child = child->tree().nextSibling()) {
const RenderLayer* containingLayer = child->ownerRenderer()->enclosingLayer();
LayerFrameMap::iterator iter = map->find(containingLayer);
if (iter == map->end())
@@ -632,8 +632,8 @@ Region ScrollingCoordinator::computeShouldHandleScrollGestureOnMainThreadRegion(
}
}
- FrameTree* tree = frame->tree();
- for (Frame* subFrame = tree->firstChild(); subFrame; subFrame = subFrame->tree()->nextSibling())
+ const FrameTree& tree = frame->tree();
+ for (Frame* subFrame = tree.firstChild(); subFrame; subFrame = subFrame->tree().nextSibling())
shouldHandleScrollGestureOnMainThreadRegion.unite(computeShouldHandleScrollGestureOnMainThreadRegion(subFrame, offset));
return shouldHandleScrollGestureOnMainThreadRegion;
@@ -700,7 +700,7 @@ unsigned ScrollingCoordinator::computeCurrentWheelEventHandlerCount()
{
unsigned wheelEventHandlerCount = 0;
- for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (frame->document())
wheelEventHandlerCount += WheelController::from(frame->document())->wheelEventHandlerCount();
}
« no previous file with comments | « Source/core/page/SpatialNavigation.cpp ('k') | Source/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698