-
commit-queue@webkit.org authored
blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees https://bugs.webkit.org/show_bug.cgi?id=81102 Patch by Kaustubh Atrawalkar <kaustubh@motorola.com> on 2012-03-22 Reviewed by Hajime Morita. Source/WebCore: This implementation will support blur for a focused element when its shadowHost's blur() is called. To achieve this Element::blur() function is modified to blur the focused node in it's treeScope. Test: fast/dom/shadow/shadow-root-blur.html * dom/Element.cpp: (WebCore::Element::blur): Modified to blur current treeScope's focused node. * dom/ShadowRoot.h: (WebCore::ShadowRoot::activeElement): Rework for code sharing. * dom/TreeScope.cpp: (WebCore::TreeScope::focusedNode): Added new function to share code for getting focused node. * dom/TreeScope.h: (TreeScope): New function declartion. * html/HTMLDocument.cpp: (WebCore::HTMLDocument::activeElement): Rework for code sharing. LayoutTests: * fast/dom/shadow/shadow-root-blur-expected.txt: Added. * fast/dom/shadow/shadow-root-blur.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
63a89dad