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

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

Issue 2698473006: Set layer scroll data from PaintArtifactCompositor (Closed)
Patch Set: Created 3 years, 10 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/PaintPropertyTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
index 172d22ae06ce77eada4f4fe52677f2594f78548b..41adbe545646470879210de3a223ac4e22776577 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -88,7 +88,8 @@ static bool updateScrollTranslation(
const IntSize& bounds,
bool userScrollableHorizontal,
bool userScrollableVertical,
- MainThreadScrollingReasons mainThreadScrollingReasons) {
+ MainThreadScrollingReasons mainThreadScrollingReasons,
+ WebLayerScrollClient* scrollClient) {
DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled());
CompositorElementId compositorElementId =
createDomNodeBasedCompositorElementId(*frameView.layoutView());
@@ -99,7 +100,7 @@ static bool updateScrollTranslation(
std::move(parent), matrix, origin, false, 0, CompositingReasonNone,
compositorElementId, std::move(scrollParent), clip, bounds,
userScrollableHorizontal, userScrollableVertical,
- mainThreadScrollingReasons);
+ mainThreadScrollingReasons, scrollClient);
return existingReasons != mainThreadScrollingReasons;
}
frameView.setScrollTranslation(
@@ -107,7 +108,7 @@ static bool updateScrollTranslation(
std::move(parent), matrix, origin, false, 0, CompositingReasonNone,
compositorElementId, std::move(scrollParent), clip, bounds,
userScrollableHorizontal, userScrollableVertical,
- mainThreadScrollingReasons));
+ mainThreadScrollingReasons, scrollClient));
return true;
}
@@ -175,7 +176,8 @@ void PaintPropertyTreeBuilder::updateProperties(
context.forceSubtreeUpdate |= updateScrollTranslation(
frameView, frameView.preTranslation(), frameScroll, FloatPoint3D(),
context.current.scroll, scrollClip, scrollBounds,
- userScrollableHorizontal, userScrollableVertical, reasons);
+ userScrollableHorizontal, userScrollableVertical, reasons,
+ frameView.getScrollableArea());
} else {
if (frameView.scrollTranslation()) {
// Ensure pre-existing properties are cleared if there is no scrolling.
@@ -746,7 +748,7 @@ void PaintPropertyTreeBuilder::updateScrollAndScrollTranslation(
bool scrollNodeNeededForMainThreadReasons = ancestorReasons != reasons;
const LayoutBox& box = toLayoutBox(object);
- const auto* scrollableArea = box.getScrollableArea();
+ auto* scrollableArea = box.getScrollableArea();
IntSize scrollOffset = box.scrolledContentOffset();
if (scrollNodeNeededForMainThreadReasons || !scrollOffset.isZero() ||
scrollableArea->scrollsOverflow()) {
@@ -779,7 +781,7 @@ void PaintPropertyTreeBuilder::updateScrollAndScrollTranslation(
context.current.renderingContextId, CompositingReasonNone,
compositorElementId, context.current.scroll, scrollClip,
scrollBounds, userScrollableHorizontal, userScrollableVertical,
- reasons);
+ reasons, scrollableArea);
}
}

Powered by Google App Engine
This is Rietveld 408576698