Bug 188343 - Make DOMWindow::scrollBy rely on DOMWindow::scrollTo
Summary: Make DOMWindow::scrollBy rely on DOMWindow::scrollTo
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords: InRadar
Depends on: 188300
Blocks: 188043
  Show dependency treegraph
 
Reported: 2018-08-06 02:05 PDT by Frédéric Wang (:fredw)
Modified: 2018-08-07 01:31 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.20 KB, patch)
2018-08-06 02:58 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2018-08-06 02:05:09 PDT
Follow-up of bug 188300.
Comment 1 Frédéric Wang (:fredw) 2018-08-06 02:58:09 PDT
Created attachment 346620 [details]
Patch
Comment 2 Darin Adler 2018-08-06 09:22:32 PDT
Comment on attachment 346620 [details]
Patch

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

> Source/WebCore/page/DOMWindow.cpp:1595
> +    scrollToOptions.left.value() += view->mapFromLayoutToCSSUnits(view->contentsScrollPosition().x());
> +    scrollToOptions.top.value() += view->mapFromLayoutToCSSUnits(view->contentsScrollPosition().y());

I hope there are no rounding differences caused by converting from layout to CSS and back.
Comment 3 Frédéric Wang (:fredw) 2018-08-06 11:02:56 PDT
Comment on attachment 346620 [details]
Patch

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

>> Source/WebCore/page/DOMWindow.cpp:1595
>> +    scrollToOptions.top.value() += view->mapFromLayoutToCSSUnits(view->contentsScrollPosition().y());
> 
> I hope there are no rounding differences caused by converting from layout to CSS and back.

Probably there are, but that does not appear on the current set of tests. Not sure how we can avoid that... What do you suggest?
Comment 4 WebKit Commit Bot 2018-08-07 01:30:46 PDT
Comment on attachment 346620 [details]
Patch

Clearing flags on attachment: 346620

Committed r234642: <https://trac.webkit.org/changeset/234642>
Comment 5 WebKit Commit Bot 2018-08-07 01:30:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-08-07 01:31:25 PDT
<rdar://problem/42998916>