[Webkit-unassigned] [Bug 81102] blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 16 03:10:11 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=81102


Hajime Morrita <morrita at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #132233|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #9 from Hajime Morrita <morrita at google.com>  2012-03-16 03:10:11 PST ---
(From update of attachment 132233)
View in context: https://bugs.webkit.org/attachment.cgi?id=132233&action=review

The approach seems sane. Could you reorganize code a bit?

> Source/WebCore/dom/Element.cpp:1599
> +    if (hasShadowRoot()) {

It looks TreeScope or ShadowRoot should have focusNode(). 
In general, it is good practice to separate finding something and modifying something.
In this case, the function can be splited into two part:
- Checking if the focus is in the shadow tree or myself, and
- unsetting the current focus.

> LayoutTests/fast/dom/shadow/shadow-root-blur.html:1
> +<!DOCTYPE html>

This test looks great!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list