Changeset 225554 in webkit
- Timestamp:
- Dec 5, 2017 3:30:48 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r225546 r225554 1 2017-12-05 Simon Fraser <simon.fraser@apple.com> 2 3 Composited frames incorrectly get requestAnimationFrame throttled 4 https://bugs.webkit.org/show_bug.cgi?id=178396 5 6 Reviewed by Zalan Bujtas. 7 8 * fast/animation/request-animation-frame-throttle-inside-overflow-scroll-expected.txt: Added. 9 * fast/animation/request-animation-frame-throttle-inside-overflow-scroll.html: Added. 10 1 11 2017-12-05 Joseph Pecoraro <pecoraro@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r225552 r225554 1 2017-12-05 Simon Fraser <simon.fraser@apple.com> 2 3 Composited frames incorrectly get requestAnimationFrame throttled 4 https://bugs.webkit.org/show_bug.cgi?id=178396 5 6 Reviewed by Zalan Bujtas. 7 8 If a composited iframe was inside overflow:scroll, and the overflow was scrolled to the left 9 further than the window width, then RenderLayer::childrenClipRect() would return an empty rectangle 10 and we'd incorrectly consider the iframe out of view, and thus throttle its requestAnimationFrame. 11 12 childrenClipRect() was taking unscaledDocumentRect(), applying the clip, and then mapping the result 13 from local to absolute coordinates (which mapped it through the overflow scroll offset). This is incorrect 14 because it considers the unscaledDocumentRect() to be in local coordinates, which it is not. 15 16 Instead, start with the infinite rect, which essentially tells us if we have any clipping, and then 17 intersect that with the document rect at the end. Something similar is done in other places that call. 18 calculateRects(). 19 20 Test: fast/animation/request-animation-frame-throttle-inside-overflow-scroll.html 21 22 * rendering/RenderLayer.cpp: 23 (WebCore::RenderLayer::calculateClipRects const): 24 1 25 2017-12-05 Michael Saboff <msaboff@apple.com> 2 26 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r225117 r225554 5634 5634 ClipRectsContext clipRectsContext(clippingRootLayer, TemporaryClipRects); 5635 5635 // Need to use temporary clip rects, because the value of 'dontClipToOverflow' may be different from the painting path (<rdar://problem/11844909>). 5636 calculateRects(clipRectsContext, renderer().view().unscaledDocumentRect(), layerBounds, backgroundRect, foregroundRect, offsetFromAncestor(clipRectsContext.rootLayer)); 5637 return clippingRootLayer->renderer().localToAbsoluteQuad(FloatQuad(foregroundRect.rect())).enclosingBoundingBox(); 5636 calculateRects(clipRectsContext, LayoutRect::infiniteRect(), layerBounds, backgroundRect, foregroundRect, offsetFromAncestor(clipRectsContext.rootLayer)); 5637 if (foregroundRect.rect().isInfinite()) 5638 return renderer().view().unscaledDocumentRect(); 5639 5640 auto absoluteClippingRect = clippingRootLayer->renderer().localToAbsoluteQuad(FloatQuad(foregroundRect.rect())).enclosingBoundingBox(); 5641 return intersection(absoluteClippingRect, renderer().view().unscaledDocumentRect()); 5638 5642 } 5639 5643
Note: See TracChangeset
for help on using the changeset viewer.