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

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 839103002: Consider transformed container's scroll offset when calculating fixed descendant's offset (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « LayoutTests/fast/repaint/fixed-descendant-of-transformed-scrolled-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 350a96c44547cbcc058aa4e77a3511d97f2b72cb..9851b2938dfee723e9d5f6fc6abafff1e86d962d 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1382,6 +1382,11 @@ static inline const RenderLayer* accumulateOffsetTowardsAncestor(const RenderLay
location += (fixedContainerCoords - ancestorCoords);
} else {
location += layer->location();
+ // The spec (http://dev.w3.org/csswg/css-transforms/#transform-rendering) doesn't say if a
+ // fixed-position element under a scrollable transformed element should scroll. However,
+ // other parts of blink scroll the fixed-position element, and the following keeps the consistency.
+ if (RenderLayerScrollableArea* scrollableArea = ancestorLayer->scrollableArea())
Julien - ping for review 2015/01/09 13:25:02 Won't this add the RenderView's scrollOffset to th
Xianzhu 2015/01/09 17:54:16 The RenderView case has been handled above (line 1
+ location -= LayoutSize(scrollableArea->scrollOffset());
}
return ancestorLayer;
}
« no previous file with comments | « LayoutTests/fast/repaint/fixed-descendant-of-transformed-scrolled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698