[Webkit-unassigned] [Bug 135769] Implement snapping behavior for iOS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 15 09:50:09 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=135769





--- Comment #16 from Wenson Hsieh <wenson_hsieh at apple.com>  2014-08-15 09:50:16 PST ---
(From update of attachment 236651)
View in context: https://bugs.webkit.org/attachment.cgi?id=236651&action=review

> Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp:-49
> -                LayoutUnit lastPotentialSnapPositionX = LayoutUnit(position.x()) + valueForLength(coordinate.first, viewWidth);

This should be in a separate patch. It seems localToContainerPoint was giving me strange offsets for child elements, so I resorted to using offset(Top|Left) on the child element instead, with a FIXME indicating that using offset(Left|Top) wouldn't take into account transforms.

> Source/WebCore/page/scrolling/AxisScrollSnapOffsets.h:44
> +// closestSnapOffset is a templated function that takes in a Vector representing snap offsets as LayoutTypes (e.g. LayoutUnit or float) and

These fixes to closestSnapOffset add a template for velocity as well as snapOffset.

> Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:209
> +            scrollView.decelerationRate = horizontalSnapOffsets().size() || verticalSnapOffsets().size() ? UIScrollViewDecelerationRateFast : UIScrollViewDecelerationRateNormal;

(oops, I meant to change size() here to !isEmpty() as well)

> Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:-26
> -#include "config.h"

As Tim mentioned, these should have been using #import all along instead of #include.

> Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:-32
> -#include "LayerRepresentation.h"

(and these too: we should just have a patch that changes these to use #import)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list