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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2651793012: [RootLayerScrolls] Annotate non-fast-scroll regions to correct layer (Closed)
Patch Set: Created 3 years, 11 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
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 168383e4077bc5da12b3a5d8b84841d30bb4efcc..d891178e1a9a6d36b791cd61f37a209754dde810 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -47,6 +47,7 @@
#include "core/CSSPropertyNames.h"
#include "core/HTMLNames.h"
#include "core/css/PseudoStyleRequest.h"
+#include "core/dom/ClientRectList.h"
#include "core/dom/Document.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/frame/FrameView.h"
@@ -3198,6 +3199,18 @@ void PaintLayer::clearNeedsRepaintRecursively() {
m_needsRepaint = false;
}
+ClientRectList* PaintLayer::nonFastScrollableRects() const {
+ // This bypasses the isAllowedToQueryCompositingState() check to enabled the
+ // optimization from https://codereview.chromium.org/1256043007
+ CompositedLayerMapping* clm =
+ m_rareData ? m_rareData->compositedLayerMapping.get() : nullptr;
+ if (!clm || !clm->scrollingContentsLayer())
+ return ClientRectList::create();
+ return ClientRectList::create(clm->scrollingContentsLayer()
+ ->platformLayer()
+ ->nonFastScrollableRegion());
+}
+
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
void PaintLayer::endShouldKeepAliveAllClientsRecursive() {
for (PaintLayer* child = firstChild(); child; child = child->nextSibling())

Powered by Google App Engine
This is Rietveld 408576698