Summary: | Clicking the search icon on ae.com hangs the web content process | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||||||||
Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | bdakin, cdumez, commit-queue, dbates, esprehn+autocc, ews-watchlist, kangil.han, rniwa, thorton, webkit-bug-importer, wenson_hsieh | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Wenson Hsieh
2019-08-19 10:03:14 PDT
Created attachment 376694 [details]
Patch
Created attachment 376695 [details]
WIP patch
Created attachment 376740 [details]
Alternate approach
Comment on attachment 376740 [details] Alternate approach View in context: https://bugs.webkit.org/attachment.cgi?id=376740&action=review > Source/WebCore/dom/Position.cpp:636 > + auto& renderer = *node->renderer(); > + return is<RenderElement>(renderer) && !Position::hasRenderedNonAnonymousDescendantsWithHeight(downcast<RenderElement>(renderer)); This doesn't seem right. It's possible for a text node to appear as direct children of a document node. > LayoutTests/ChangeLog:13 > + * fast/events/focus-anchor-with-tabindex-hang-expected.txt: Added. > + * fast/events/focus-anchor-with-tabindex-hang.html: Added. Please add another test which uses getSelection().modify(~) to reproduce the hang. Comment on attachment 376740 [details] Alternate approach View in context: https://bugs.webkit.org/attachment.cgi?id=376740&action=review >> Source/WebCore/dom/Position.cpp:636 >> + return is<RenderElement>(renderer) && !Position::hasRenderedNonAnonymousDescendantsWithHeight(downcast<RenderElement>(renderer)); > > This doesn't seem right. It's possible for a text node to appear as direct children of a document node. Hm…I’m a bit confused by this comment. This existing early return: if (!node->renderer()->isInline()) return true; …should ensure that we always consider the document element to have visually distinct ends, even in a page like this: <html> <style> html, body { display: inline; } </style> </html> Perhaps I misunderstood something? >> LayoutTests/ChangeLog:13 >> + * fast/events/focus-anchor-with-tabindex-hang.html: Added. > > Please add another test which uses getSelection().modify(~) to reproduce the hang. Good call! Added a new test. Created attachment 376775 [details]
Patch
Created attachment 376776 [details]
Patch
(In reply to Wenson Hsieh from comment #5) > Comment on attachment 376740 [details] > Alternate approach > > View in context: > https://bugs.webkit.org/attachment.cgi?id=376740&action=review > > >> Source/WebCore/dom/Position.cpp:636 > >> + return is<RenderElement>(renderer) && !Position::hasRenderedNonAnonymousDescendantsWithHeight(downcast<RenderElement>(renderer)); > > > > This doesn't seem right. It's possible for a text node to appear as direct children of a document node. > > Hm…I’m a bit confused by this comment. This existing early return: > > if (!node->renderer()->isInline()) > return true; > > …should ensure that we always consider the document element to have visually > distinct ends, even in a page like this: Oh, I missed that. Cool. Comment on attachment 376776 [details] Patch Clearing flags on attachment: 376776 Committed r248909: <https://trac.webkit.org/changeset/248909> All reviewed patches have been landed. Closing bug. |