[webkit-reviews] review granted: [Bug 195696] Web Automation: elements larger than the viewport have incorrect in-view center point : [Attachment 369584] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 10 18:04:03 PDT 2019
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 195696: Web Automation: elements larger than the viewport have incorrect
in-view center point
https://bugs.webkit.org/show_bug.cgi?id=195696
Attachment 369584: Patch
https://bugs.webkit.org/attachment.cgi?id=369584&action=review
--- Comment #12 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 369584
--> https://bugs.webkit.org/attachment.cgi?id=369584
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=369584&action=review
> Source/WebCore/platform/ScrollView.cpp:850
> + return viewToContents(IntPoint(point));
roundedIntPoint
> Source/WebCore/platform/ScrollView.cpp:858
> + return contentsToView(IntPoint(point));
roundedIntPoint
> Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:554
> + auto& frame = frameView->frame();
> + clientRect.scale(frame.pageZoomFactor() * frame.frameScaleFactor());
> + clientRect.moveBy(frameView->contentsScrollPosition());
> + return clientRect;
Maybe add a comment to say why contentsToRootView doesn't work for you in this
case.
> Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:565
> + auto& frame = frameView->frame();
> + clientPoint.scale(frame.pageZoomFactor() * frame.frameScaleFactor());
> + clientPoint.moveBy(frameView->contentsScrollPosition());
> + return clientPoint;
Ditto.
More information about the webkit-reviews
mailing list