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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2113483002: Make RootScroller set the outer viewport scroll layer in the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RootScroller changes outer viewport scroll layer Created 4 years, 5 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 #include "core/inspector/InspectorInstrumentation.h" 114 #include "core/inspector/InspectorInstrumentation.h"
115 #include "core/layout/LayoutTextFragment.h" 115 #include "core/layout/LayoutTextFragment.h"
116 #include "core/layout/api/LayoutBoxItem.h" 116 #include "core/layout/api/LayoutBoxItem.h"
117 #include "core/layout/api/LayoutViewItem.h" 117 #include "core/layout/api/LayoutViewItem.h"
118 #include "core/loader/DocumentLoader.h" 118 #include "core/loader/DocumentLoader.h"
119 #include "core/page/ChromeClient.h" 119 #include "core/page/ChromeClient.h"
120 #include "core/page/FocusController.h" 120 #include "core/page/FocusController.h"
121 #include "core/page/Page.h" 121 #include "core/page/Page.h"
122 #include "core/page/PointerLockController.h" 122 #include "core/page/PointerLockController.h"
123 #include "core/page/SpatialNavigation.h" 123 #include "core/page/SpatialNavigation.h"
124 #include "core/page/scrolling/RootScrollerController.h"
124 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" 125 #include "core/page/scrolling/ScrollCustomizationCallbacks.h"
125 #include "core/page/scrolling/ScrollState.h" 126 #include "core/page/scrolling/ScrollState.h"
126 #include "core/page/scrolling/ScrollStateCallback.h" 127 #include "core/page/scrolling/ScrollStateCallback.h"
127 #include "core/paint/PaintLayer.h" 128 #include "core/paint/PaintLayer.h"
128 #include "core/svg/SVGAElement.h" 129 #include "core/svg/SVGAElement.h"
129 #include "core/svg/SVGDocumentExtensions.h" 130 #include "core/svg/SVGDocumentExtensions.h"
130 #include "core/svg/SVGElement.h" 131 #include "core/svg/SVGElement.h"
131 #include "platform/EventDispatchForbiddenScope.h" 132 #include "platform/EventDispatchForbiddenScope.h"
132 #include "platform/RuntimeEnabledFeatures.h" 133 #include "platform/RuntimeEnabledFeatures.h"
133 #include "platform/UserGestureIndicator.h" 134 #include "platform/UserGestureIndicator.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 if (delta.isZero()) 559 if (delta.isZero())
559 return; 560 return;
560 561
561 // TODO(esprehn): This should use updateStyleAndLayoutIgnorePendingStyleshee tsForNode. 562 // TODO(esprehn): This should use updateStyleAndLayoutIgnorePendingStyleshee tsForNode.
562 document().updateStyleAndLayoutIgnorePendingStylesheets(); 563 document().updateStyleAndLayoutIgnorePendingStylesheets();
563 564
564 LayoutBox* boxToScroll = nullptr; 565 LayoutBox* boxToScroll = nullptr;
565 566
566 // We should only ever scroll the effective root scroller this way when the 567 // We should only ever scroll the effective root scroller this way when the
567 // page removes the default applyScroll (ViewportScrollCallback). 568 // page removes the default applyScroll (ViewportScrollCallback).
568 if (document().effectiveRootScroller() == this) 569 if (document().rootScrollerController()->effectiveRootScroller() == this)
569 boxToScroll = document().layoutView(); 570 boxToScroll = document().layoutView();
570 else if (layoutObject()) 571 else if (layoutObject())
571 boxToScroll = toLayoutBox(layoutObject()); 572 boxToScroll = toLayoutBox(layoutObject());
572 573
573 if (!boxToScroll) 574 if (!boxToScroll)
574 return; 575 return;
575 576
576 ScrollResult result = 577 ScrollResult result =
577 LayoutBoxItem(boxToScroll).enclosingBox().scroll( 578 LayoutBoxItem(boxToScroll).enclosingBox().scroll(
578 ScrollGranularity(static_cast<int>(scrollState.deltaGranularity())), 579 ScrollGranularity(static_cast<int>(scrollState.deltaGranularity())),
(...skipping 3151 matching lines...) Expand 10 before | Expand all | Expand 10 after
3730 3731
3731 DEFINE_TRACE_WRAPPERS(Element) 3732 DEFINE_TRACE_WRAPPERS(Element)
3732 { 3733 {
3733 if (hasRareData()) { 3734 if (hasRareData()) {
3734 visitor->traceWrappers(elementRareData()); 3735 visitor->traceWrappers(elementRareData());
3735 } 3736 }
3736 ContainerNode::traceWrappers(visitor); 3737 ContainerNode::traceWrappers(visitor);
3737 } 3738 }
3738 3739
3739 } // namespace blink 3740 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698