Title: [236112] releases/WebKitGTK/webkit-2.22
Revision
236112
Author
[email protected]
Date
2018-09-18 02:47:47 -0700 (Tue, 18 Sep 2018)

Log Message

Merge r235457 - Check for null renderer in canBeScrolledIntoView
https://bugs.webkit.org/show_bug.cgi?id=188935

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/spatial-navigation/snav-display-contents-crash.html

* page/SpatialNavigation.cpp:
(WebCore::canBeScrolledIntoView):

LayoutTests:

* fast/spatial-navigation/snav-display-contents-crash-expected.txt: Added.
* fast/spatial-navigation/snav-display-contents-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog (236111 => 236112)


--- releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog	2018-09-18 09:16:44 UTC (rev 236111)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog	2018-09-18 09:47:47 UTC (rev 236112)
@@ -1,3 +1,13 @@
+2018-08-28  Don Olmstead  <[email protected]>
+
+        Check for null renderer in canBeScrolledIntoView
+        https://bugs.webkit.org/show_bug.cgi?id=188935
+
+        Reviewed by Simon Fraser.
+
+        * fast/spatial-navigation/snav-display-contents-crash-expected.txt: Added.
+        * fast/spatial-navigation/snav-display-contents-crash.html: Added.
+
 2018-08-28  Youenn Fablet  <[email protected]>
 
         MediaDevices should be collectable as soon as its document is stopped

Added: releases/WebKitGTK/webkit-2.22/LayoutTests/fast/spatial-navigation/snav-display-contents-crash-expected.txt (0 => 236112)


--- releases/WebKitGTK/webkit-2.22/LayoutTests/fast/spatial-navigation/snav-display-contents-crash-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/fast/spatial-navigation/snav-display-contents-crash-expected.txt	2018-09-18 09:47:47 UTC (rev 236112)
@@ -0,0 +1 @@
+Shouldn't crash.

Added: releases/WebKitGTK/webkit-2.22/LayoutTests/fast/spatial-navigation/snav-display-contents-crash.html (0 => 236112)


--- releases/WebKitGTK/webkit-2.22/LayoutTests/fast/spatial-navigation/snav-display-contents-crash.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/fast/spatial-navigation/snav-display-contents-crash.html	2018-09-18 09:47:47 UTC (rev 236112)
@@ -0,0 +1,16 @@
+<div style="display: contents"><a href=""
+Shouldn't crash.
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
+    testRunner.setSpatialNavigationEnabled(true);
+}
+function runTest() {
+    if (window.eventSender) {
+        eventSender.keyDown("rightArrow");
+    }
+}
+
+window._onload_ = runTest;
+</script>

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (236111 => 236112)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-09-18 09:16:44 UTC (rev 236111)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-09-18 09:47:47 UTC (rev 236112)
@@ -1,3 +1,15 @@
+2018-08-28  Don Olmstead  <[email protected]>
+
+        Check for null renderer in canBeScrolledIntoView
+        https://bugs.webkit.org/show_bug.cgi?id=188935
+
+        Reviewed by Simon Fraser.
+
+        Test: fast/spatial-navigation/snav-display-contents-crash.html
+
+        * page/SpatialNavigation.cpp:
+        (WebCore::canBeScrolledIntoView):
+
 2018-08-28  Youenn Fablet  <[email protected]>
 
         IDBDatabase should not return true to hasPendingActivity after being stopped

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/page/SpatialNavigation.cpp (236111 => 236112)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/page/SpatialNavigation.cpp	2018-09-18 09:16:44 UTC (rev 236111)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/page/SpatialNavigation.cpp	2018-09-18 09:47:47 UTC (rev 236112)
@@ -705,6 +705,8 @@
     ASSERT(candidate.visibleNode && candidate.isOffscreen);
     LayoutRect candidateRect = candidate.rect;
     for (Node* parentNode = candidate.visibleNode->parentNode(); parentNode; parentNode = parentNode->parentNode()) {
+        if (!parentNode->renderer())
+            continue;
         LayoutRect parentRect = nodeRectInAbsoluteCoordinates(parentNode);
         if (!candidateRect.intersects(parentRect)) {
             if (((direction == FocusDirectionLeft || direction == FocusDirectionRight) && parentNode->renderer()->style().overflowX() == Overflow::Hidden)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to