Summary: | Focus navigation order in slot fallback contents is wrong | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | elkurin | ||||||
Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, elkurin, kochi, koivisto, rniwa, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Safari 11 | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.11 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 148695 | ||||||||
Attachments: |
|
Description
elkurin
2017-10-06 01:37:03 PDT
Created attachment 347762 [details]
WIP
Created attachment 347765 [details]
Fixes the bug
Comment on attachment 347765 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=347765&action=review > Source/WebCore/page/FocusController.cpp:283 > + auto slot = makeRef(downcast<HTMLSlotElement>(element)); > + return FocusNavigationScope(slot, slot->assignedNodes() ? SlotKind::Assigned : SlotKind::Fallback); makeRef here look unnecessary. FocusNavigationScope doesn't ref the slot so someone better be keeping it alive. (In reply to Antti Koivisto from comment #4) > Comment on attachment 347765 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=347765&action=review > > > Source/WebCore/page/FocusController.cpp:283 > > + auto slot = makeRef(downcast<HTMLSlotElement>(element)); > > + return FocusNavigationScope(slot, slot->assignedNodes() ? SlotKind::Assigned : SlotKind::Fallback); > > makeRef here look unnecessary. FocusNavigationScope doesn't ref the slot so > someone better be keeping it alive. I'll revert this change. I was trying to adopt Ref/RefPtr everywhere but decided to do it in a separate patch. Committed r235191: <https://trac.webkit.org/changeset/235191> |