Changeset 168078 in webkit
- Timestamp:
- Apr 30, 2014 7:15:17 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168077 r168078 1 2014-04-30 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Some accerated overflow-scroll doesn't scroll correctly 4 https://bugs.webkit.org/show_bug.cgi?id=132375 5 6 Reviewed by Tim Horton. 7 8 New test that dumps compositing layers on iOS so we can see the sizes of the 9 scroll layers that get created. 10 11 * compositing/overflow/subpixel-overflow-expected.txt: Added. 12 * compositing/overflow/subpixel-overflow.html: Added. 13 * platform/ios-sim/compositing/overflow/subpixel-overflow-expected.txt: Added. 14 * platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: 15 This is a progression; the old code failed to take the scrollbar width into 16 account, and the new code does. 17 18 1 19 2014-04-30 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/LayoutTests/platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt
r146531 r168078 13 13 (GraphicsLayer 14 14 (position 1.00 1.00) 15 (bounds 200.00 200.00)15 (bounds 185.00 185.00) 16 16 (children 1 17 17 (GraphicsLayer -
trunk/Source/WebCore/ChangeLog
r168076 r168078 1 2014-04-30 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Some accerated overflow-scroll doesn't scroll correctly 4 https://bugs.webkit.org/show_bug.cgi?id=132375 5 6 Reviewed by Tim Horton. 7 8 We set the size of the scrolling layer (which becomes the bounds of 9 the UIScrollView) to a non-pixel-snapped padding box size, but the 10 size of the contents layer is an integral-snapped scroll size. 11 This would result in a fractional difference between the two, which 12 makes us thing that the element is scrollable when it really is not. 13 14 Fix by setting the size of the scroll layer to pixel snapped client size, 15 which is what we also use for scrollability computation. 16 17 Added some FIXMEs in code that requires pixel snapping. 18 19 Also use #if PLATFORM(IOS)/#else to bracket some code that never runs on iOS 20 but tries to do something similar to iOS-only code. 21 22 * rendering/RenderLayerBacking.cpp: 23 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 24 1 25 2014-04-30 David Hyatt <hyatt@apple.com> 2 26 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r167970 r168078 744 744 // If the compositing ancestor has a layer to clip children, we parent in that, and therefore 745 745 // position relative to it. 746 // FIXME: need to do some pixel snapping here. 746 747 LayoutRect clippingBox = clipBox(toRenderBox(compAncestor->renderer())); 747 748 graphicsLayerParentLocation = clippingBox.location(); … … 758 759 renderBox->height() - renderBox->borderTop() - renderBox->borderBottom()); 759 760 760 LayoutSize scrollOffset = compAncestor->scrolledContentOffset(); 761 IntSize scrollOffset = compAncestor->scrolledContentOffset(); 762 // FIXME: pixel snap the padding box. 761 763 graphicsLayerParentLocation = paddingBox.location() - scrollOffset; 762 764 } 763 #endif 764 765 #else 765 766 if (compAncestor && compAncestor->needsCompositedScrolling()) { 766 767 RenderBox& renderBox = toRenderBox(compAncestor->renderer()); … … 769 770 graphicsLayerParentLocation = scrollOrigin - scrollOffset; 770 771 } 771 772 #endif 773 772 774 if (compAncestor && m_ancestorClippingLayer) { 773 775 // Call calculateRects to get the backgroundRect which is what is used to clip the contents of this … … 814 816 LayoutRect clippingBox; 815 817 if (GraphicsLayer* clipLayer = clippingLayer()) { 818 // FIXME: need to do some pixel snapping here. 816 819 clippingBox = clipBox(toRenderBox(renderer())); 817 820 clipLayer->setPosition(FloatPoint(clippingBox.location() - localCompositingBounds.location())); … … 910 913 LayoutSize scrollOffset = m_owningLayer.scrollOffset(); 911 914 915 // FIXME: need to do some pixel snapping here. 912 916 m_scrollingLayer->setPosition(FloatPoint(paddingBox.location() - localCompositingBounds.location())); 913 917 914 m_scrollingLayer->setSize(paddingBox.size()); 918 IntSize pixelSnappedClientSize(renderBox.pixelSnappedClientWidth(), renderBox.pixelSnappedClientHeight()); 919 m_scrollingLayer->setSize(pixelSnappedClientSize); 915 920 #if PLATFORM(IOS) 916 921 FloatSize oldScrollingLayerOffset = m_scrollingLayer->offsetFromRenderer();
Note: See TracChangeset
for help on using the changeset viewer.