Bug 188343

Summary: Make DOMWindow::scrollBy rely on DOMWindow::scrollTo
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: DOMAssignee: Frédéric Wang (:fredw) <fred.wang>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 188300    
Bug Blocks: 188043    
Attachments:
Description Flags
Patch none

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>