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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into scroll-boundary Created 3 years, 9 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/layout/compositing/CompositedLayerMapping.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
index a67d5daa6b6ed92a786f29761a9469fa43a62f88..0267527bf1062e8b0b37eb8074e659c46a13fad4 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -77,6 +77,7 @@
#include "platform/graphics/paint/PaintRecordBuilder.h"
#include "platform/graphics/paint/TransformDisplayItem.h"
#include "public/platform/WebLayerStickyPositionConstraint.h"
+#include "public/platform/WebScrollBoundaryBehavior.h"
#include "wtf/CurrentTime.h"
#include "wtf/text/StringBuilder.h"
@@ -1080,11 +1081,21 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry(
updateShouldFlattenTransform();
updateChildrenTransform();
updateScrollParent(scrollParent());
+ updateScrollBoundaryBehavior();
bokan 2017/03/23 13:18:26 Hmm...I'm not sure CLM::updateGraphicsLayerGeometr
sunyunjia 2017/03/23 20:16:54 I checked the call stack, and found both CLM::upda
registerScrollingLayers();
updateCompositingReasons();
}
+void CompositedLayerMapping::updateScrollBoundaryBehavior() {
+ ScrollBoundaryBehavior behavior =
+ layoutObject().styleRef().getScrollBoundaryBehavior();
+ if (m_scrollingContentsLayer) {
+ m_scrollingContentsLayer->setScrollBoundaryBehavior(
+ static_cast<WebScrollBoundaryBehavior>(behavior));
+ }
+}
+
void CompositedLayerMapping::updateMainGraphicsLayerGeometry(
const IntRect& relativeCompositingBounds,
const IntRect& localCompositingBounds,

Powered by Google App Engine
This is Rietveld 408576698