[Webkit-unassigned] [Bug 139757] Delegates scrolling by wheel event should be work within contents area.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 10 13:53:08 PDT 2015


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

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #252790|review?                     |review-
              Flags|                            |

--- Comment #18 from Darin Adler <darin at apple.com> ---
Comment on attachment 252790
  --> https://bugs.webkit.org/attachment.cgi?id=252790
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=252790&action=review

> Source/WebCore/page/FrameView.cpp:4460
>          IntPoint oldPosition = scrollPosition();
>          IntSize newOffset = IntSize(offset.width() - wheelEvent.deltaX(), offset.height() - wheelEvent.deltaY());
>          if (offset != newOffset) {
> -            ScrollView::scrollTo(newOffset);
> +            setScrollOffset(IntPoint(newOffset));
>              scrollPositionChanged(oldPosition, scrollPosition());
>              didChangeScrollOffset();
>          }

With this patch as posted for review, scrollPositionChanged and didChangeScrollOffset will be called twice. Instead of these 8 lines of code, I suggest this one line of code:

    setScrollOffset(scrollPosition() + IntSize(-wheelEvent.deltaX(), -wheelEvent.deltaY()));

I didn’t look at the failure on Mac; the one to that is running tests in this mode returned a failure.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150510/4028c720/attachment.html>


More information about the webkit-unassigned mailing list