rdar://problem/27375780
<rdar://problem/27383442>
Created attachment 283818 [details] Patch
Comment on attachment 283818 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283818&action=review r=me > Source/WebKit2/WebProcess/Automation/WebAutomationSessionProxy.cpp:503 > rect = coreFrameView->rootViewToContents(rect); I see, so in this case the topContentInset is eventually subtracted here: ScrollPosition ScrollView::documentScrollPositionRelativeToViewOrigin() const { return scrollPosition() - IntSize( shouldPlaceBlockDirectionScrollbarOnLeft() && m_verticalScrollbar ? m_verticalScrollbar->occupiedWidth() : 0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)); } But otherwise we get the clientRect in raw window space, which is why we have to deduct topContentInset in the other case. You may want to add a comment or note in the changelog about this, as I thought it was a bug when reviewing.
Comment on attachment 283818 [details] Patch https://trac.webkit.org/changeset/203316