[Webkit-unassigned] [Bug 79886] ShadowRoot should have activeElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 2 03:02:18 PST 2012


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





--- Comment #3 from Kaustubh Atrawalkar <kaustubh at motorola.com>  2012-03-02 03:02:18 PST ---
(In reply to comment #2)
> (From update of attachment 129438 [details])
> Thanks for taking this. But it's apparently too naive.
> Please see HTMLDocument::activeElement() and consider sharing the logic.

Hi Morrita, thanks for the review. I was thinking to move this HTMLDocument::activeElement to Document and share it between both HTMLDocument & ShadowRoot. But I saw there is specific fix being done in HTMLDocument::activeElement to make sure that document.activeElement won't be an element in shadow root. So if we want to share the logic, we might need to revert the logic. 
In my patch, I was assuming shadowRoot.activeElement will return active element only from the current shadowDOM tree as specified in the spec. The spec says "To maintain upper-boundary encapsulation, the value of the Document object's focus API property activeElement must be adjusted. To prevent loss of information when adjusting this value, each shadow root must also have an activeElement property to store the value of the focused element in the shadow DOM subtree." 

So the document.activeElement will return shadowHost as expected but shadowRoot.activeElement will return "div1" (where div1 is focused and is child of shadowRoot)

Please correct me if wrong.

-- 
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