| Index: third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| index 832bc6b861d52f932d068ad7e903114145fbe09e..263860a68b8109474306d7a4c0f68a5bf62a964b 100644
|
| --- a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| +++ b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| @@ -136,25 +136,7 @@ bool RootScrollerController::isValidRootScroller(const Element& element) const {
|
| }
|
|
|
| PaintLayer* RootScrollerController::rootScrollerPaintLayer() const {
|
| - if (!m_effectiveRootScroller || !m_effectiveRootScroller->layoutObject() ||
|
| - !m_effectiveRootScroller->layoutObject()->isBox())
|
| - return nullptr;
|
| -
|
| - LayoutBox* box = toLayoutBox(m_effectiveRootScroller->layoutObject());
|
| - PaintLayer* layer = box->layer();
|
| -
|
| - // If the root scroller is the <html> element we do a bit of a fake out
|
| - // because while <html> has a PaintLayer, scrolling for it is handled by the
|
| - // #document's PaintLayer (i.e. the PaintLayerCompositor's root layer). The
|
| - // reason the root scroller is the <html> layer and not #document is because
|
| - // the latter is a Node but not an Element.
|
| - if (m_effectiveRootScroller->isSameNode(m_document->documentElement())) {
|
| - if (!layer || !layer->compositor())
|
| - return nullptr;
|
| - return layer->compositor()->rootLayer();
|
| - }
|
| -
|
| - return layer;
|
| + return RootScrollerUtil::paintLayerFor(m_effectiveRootScroller);
|
| }
|
|
|
| Element* RootScrollerController::defaultEffectiveRootScroller() {
|
|
|