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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp

Issue 2887053002: Remove scroll_clip_layer dependency from viewport layer tracking (Closed)
Patch Set: Also update Web Created 3 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/page/scrolling/TopDocumentRootScrollerController.h" 5 #include "core/page/scrolling/TopDocumentRootScrollerController.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/PageScaleConstraintsSet.h" 10 #include "core/frame/PageScaleConstraintsSet.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 GraphicsLayer* graphics_layer = area->LayerForScrolling(); 196 GraphicsLayer* graphics_layer = area->LayerForScrolling();
197 197
198 // TODO(bokan): We should assert graphicsLayer here and 198 // TODO(bokan): We should assert graphicsLayer here and
199 // RootScrollerController should do whatever needs to happen to ensure 199 // RootScrollerController should do whatever needs to happen to ensure
200 // the root scroller gets composited. 200 // the root scroller gets composited.
201 201
202 return graphics_layer; 202 return graphics_layer;
203 } 203 }
204 204
205 GraphicsLayer* TopDocumentRootScrollerController::RootContainerLayer() const {
206 ScrollableArea* area =
207 RootScrollerUtil::ScrollableAreaForRootScroller(global_root_scroller_);
208
wkorman 2017/05/17 20:59:39 Can shorten below here to just: return area ? are
pdr. 2017/05/17 21:36:44 Done
209 if (!area)
210 return nullptr;
211
212 GraphicsLayer* graphics_layer = area->LayerForContainer();
213
214 return graphics_layer;
215 }
216
205 PaintLayer* TopDocumentRootScrollerController::RootScrollerPaintLayer() const { 217 PaintLayer* TopDocumentRootScrollerController::RootScrollerPaintLayer() const {
206 return RootScrollerUtil::PaintLayerForRootScroller(global_root_scroller_); 218 return RootScrollerUtil::PaintLayerForRootScroller(global_root_scroller_);
207 } 219 }
208 220
209 Element* TopDocumentRootScrollerController::GlobalRootScroller() const { 221 Element* TopDocumentRootScrollerController::GlobalRootScroller() const {
210 return global_root_scroller_.Get(); 222 return global_root_scroller_.Get();
211 } 223 }
212 224
213 } // namespace blink 225 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698