Title: [252539] trunk/Source/WebKit
- Revision
- 252539
- Author
- carlo...@webkit.org
- Date
- 2019-11-18 00:40:39 -0800 (Mon, 18 Nov 2019)
Log Message
Automation: scrollIntoView should do nothing if element is visible
https://bugs.webkit.org/show_bug.cgi?id=204194
Reviewed by Carlos Alberto Lopez Perez.
"To scroll into view an element perform the following steps only if the element is not already in view"
https://w3c.github.io/webdriver/#dfn-scrolls-into-view
Fixes: imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[9]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[8]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[7]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[6]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[5]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[4]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[3]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[2]
imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[1]
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::computeElementLayout): Use scrollIntoViewIfNotVisible instead of
scrollIntoViewIfNeeded.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (252538 => 252539)
--- trunk/Source/WebKit/ChangeLog 2019-11-18 08:24:03 UTC (rev 252538)
+++ trunk/Source/WebKit/ChangeLog 2019-11-18 08:40:39 UTC (rev 252539)
@@ -1,3 +1,27 @@
+2019-11-18 Carlos Garcia Campos <cgar...@igalia.com>
+
+ Automation: scrollIntoView should do nothing if element is visible
+ https://bugs.webkit.org/show_bug.cgi?id=204194
+
+ Reviewed by Carlos Alberto Lopez Perez.
+
+ "To scroll into view an element perform the following steps only if the element is not already in view"
+ https://w3c.github.io/webdriver/#dfn-scrolls-into-view
+
+ Fixes: imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[9]
+ imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[8]
+ imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[7]
+ imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[6]
+ imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[5]
+ imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[4]
+ imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[3]
+ imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[2]
+ imported/w3c/webdriver/tests/element_click/scroll_into_view.py::test_partially_visible_does_not_scroll[1]
+
+ * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+ (WebKit::WebAutomationSessionProxy::computeElementLayout): Use scrollIntoViewIfNotVisible instead of
+ scrollIntoViewIfNeeded.
+
2019-11-17 Alexey Proskuryakov <a...@apple.com>
Better build fix attempt after r252434.
Modified: trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp (252538 => 252539)
--- trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2019-11-18 08:24:03 UTC (rev 252538)
+++ trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp 2019-11-18 08:40:39 UTC (rev 252539)
@@ -557,7 +557,7 @@
if (scrollIntoViewIfNeeded && containerElement) {
// §14.1 Element Click. Step 4. Scroll into view the element’s container.
// https://w3c.github.io/webdriver/webdriver-spec.html#element-click
- containerElement->scrollIntoViewIfNeeded(false);
+ containerElement->scrollIntoViewIfNotVisible(false);
// FIXME: Wait in an implementation-specific way up to the session implicit wait timeout for the element to become in view.
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes