[webkit-reviews] review denied: [Bug 216248] Elements that become unfocusable do not lose focus : [Attachment 408412] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 10 01:03:36 PDT 2020


Ryosuke Niwa <rniwa at webkit.org> has denied Darin Adler <darin at apple.com>'s
request for review:
Bug 216248: Elements that become unfocusable do not lose focus
https://bugs.webkit.org/show_bug.cgi?id=216248

Attachment 408412: Patch

https://bugs.webkit.org/attachment.cgi?id=408412&action=review




--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 408412
  --> https://bugs.webkit.org/attachment.cgi?id=408412
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=408412&action=review

r- because this previously broke Facebook.

See https://bugs.webkit.org/show_bug.cgi?id=29241#c31

> Source/WebCore/dom/Document.cpp:2056
> +    if (m_focusedElement && !m_focusedElement->isFocusable())
> +	   setFocusedElement(nullptr, FocusDirectionNone,
FocusRemovalEventsMode::DoNotDispatch);

We shouldn't be updating this state during resolveStyle as this would make
style resolution timing visible to scripts.
Namely, document.activeElement discloses when we resolved the style.
See discsuiosn on https://github.com/w3c/uievents/issues/236


More information about the webkit-reviews mailing list