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

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

Issue 2371353002: [SPInvalidation ] Fix scroll offset issue of vertical-rl contents (Closed)
Patch Set: - Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5c58aa44a1edfc27408f48239064e38e82799bcc..f47229749dd963288505b7be487af74c1a8f4254 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -438,19 +438,19 @@ void PaintPropertyTreeBuilder::updateSvgLocalToBorderBoxTransform(const LayoutOb
void PaintPropertyTreeBuilder::updateScrollAndScrollTranslation(const LayoutObject& object, PaintPropertyTreeBuilderContext& context)
{
- if (object.isBoxModelObject() && object.hasOverflowClip()) {
- PaintLayer* layer = toLayoutBoxModelObject(object).layer();
- DCHECK(layer);
- DoubleSize scrollOffset = layer->getScrollableArea()->scrollOffset();
- if (!scrollOffset.isZero() || layer->scrollsOverflow()) {
+ if (object.hasOverflowClip()) {
+ const LayoutBox& box = toLayoutBox(object);
+ const PaintLayerScrollableArea* scrollableArea = box.getScrollableArea();
+ DoubleSize scrollOffset = box.scrolledContentOffset();
+ if (!scrollOffset.isZero() || scrollableArea->scrollsOverflow()) {
TransformationMatrix matrix = TransformationMatrix().translate(-scrollOffset.width(), -scrollOffset.height());
context.current.transform = object.getMutableForPainting().ensureObjectPaintProperties().createOrUpdateScrollTranslation(
context.current.transform, matrix, FloatPoint3D(), context.current.shouldFlattenInheritedTransform, context.current.renderingContextID);
- IntSize scrollClip = layer->getScrollableArea()->visibleContentRect().size();
- IntSize scrollBounds = layer->getScrollableArea()->contentsSize();
- bool userScrollableHorizontal = layer->getScrollableArea()->userInputScrollable(HorizontalScrollbar);
- bool userScrollableVertical = layer->getScrollableArea()->userInputScrollable(VerticalScrollbar);
+ IntSize scrollClip = scrollableArea->visibleContentRect().size();
+ IntSize scrollBounds = scrollableArea->contentsSize();
+ bool userScrollableHorizontal = scrollableArea->userInputScrollable(HorizontalScrollbar);
+ bool userScrollableVertical = scrollableArea->userInputScrollable(VerticalScrollbar);
context.current.scroll = object.getMutableForPainting().ensureObjectPaintProperties().createOrUpdateScroll(
context.current.scroll, context.current.transform, scrollClip, scrollBounds, userScrollableHorizontal, userScrollableVertical);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698