WebKit Bugzilla
Attachment 348361 Details for
Bug 188935
: Check for null renderer in canBeScrolledIntoView
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188935.diff (text/plain), 3.23 KB, created by
Don Olmstead
on 2018-08-28 17:09:42 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Don Olmstead
Created:
2018-08-28 17:09:42 PDT
Size:
3.23 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 797fa4c063b..70f9b3eb7b8 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-08-28 Don Olmstead <don.olmstead@sony.com> >+ >+ Check for null renderer in canBeScrolledIntoView >+ https://bugs.webkit.org/show_bug.cgi?id=188935 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/spatial-navigation/snav-display-contents-crash-expected.txt: Added. >+ * fast/spatial-navigation/snav-display-contents-crash.html: Added. >+ > 2018-08-28 Aditya Keerthi <akeerthi@apple.com> > > [macOS] Color wells should appear rounded and textured >diff --git a/LayoutTests/fast/spatial-navigation/snav-display-contents-crash-expected.txt b/LayoutTests/fast/spatial-navigation/snav-display-contents-crash-expected.txt >new file mode 100644 >index 00000000000..88e533575ed >--- /dev/null >+++ b/LayoutTests/fast/spatial-navigation/snav-display-contents-crash-expected.txt >@@ -0,0 +1 @@ >+Shouldn't crash. >diff --git a/LayoutTests/fast/spatial-navigation/snav-display-contents-crash.html b/LayoutTests/fast/spatial-navigation/snav-display-contents-crash.html >new file mode 100644 >index 00000000000..68757104b7c >--- /dev/null >+++ b/LayoutTests/fast/spatial-navigation/snav-display-contents-crash.html >@@ -0,0 +1,16 @@ >+<div style="display: contents"><a href="#"></a></div> >+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> >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index af21fff3daf..916dd9d6427 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2018-08-28 Don Olmstead <don.olmstead@sony.com> >+ >+ Check for null renderer in canBeScrolledIntoView >+ https://bugs.webkit.org/show_bug.cgi?id=188935 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: fast/spatial-navigation/snav-display-contents-crash.html >+ >+ * page/SpatialNavigation.cpp: >+ (WebCore::canBeScrolledIntoView): >+ > 2018-08-28 Aditya Keerthi <akeerthi@apple.com> > > [macOS] Color wells should appear rounded and textured >diff --git a/Source/WebCore/page/SpatialNavigation.cpp b/Source/WebCore/page/SpatialNavigation.cpp >index 763aea583b0..57b475368e2 100644 >--- a/Source/WebCore/page/SpatialNavigation.cpp >+++ b/Source/WebCore/page/SpatialNavigation.cpp >@@ -705,6 +705,8 @@ bool canBeScrolledIntoView(FocusDirection direction, const FocusCandidate& candi > ASSERT(candidate.visibleNode && candidate.isOffscreen); > LayoutRect candidateRect = candidate.rect; > for (Node* parentNode = candidate.visibleNode->parentNode(); parentNode; parentNode = parentNode->parentNode()) { >+ if (UNLIKELY(!parentNode->renderer())) >+ continue; > LayoutRect parentRect = nodeRectInAbsoluteCoordinates(parentNode); > if (!candidateRect.intersects(parentRect)) { > if (((direction == FocusDirectionLeft || direction == FocusDirectionRight) && parentNode->renderer()->style().overflowX() == Overflow::Hidden)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
simon.fraser
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188935
:
348361
|
348371