[Shadow DOM] Implement HTMLShadowElement::olderShadowRoot
authorshinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Dec 2012 08:13:09 +0000 (08:13 +0000)
committershinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Dec 2012 08:13:09 +0000 (08:13 +0000)
commit93d97279d0a587b89a734114da99941ba613e977
tree1d0a263d3a64a4473154573abe2f4f5177dc3537
parent4b4e62af75cde99549681f85db7b758dbfd96f2e
[Shadow DOM] Implement HTMLShadowElement::olderShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=104218

Reviewed by Hajime Morita.

Source/WebCore:

Implements HTMLShadowElement::olderShadowRoot, which returns the ShadowRoot the HTMLShadowElement is assigned to.
When such ShadowRoot does not exist, 0 is returned.

Test: fast/dom/shadow/olderShadowRoot-in-shadowelement.html

* dom/ElementShadow.cpp:
(WebCore::ElementShadow::ensureDistributionFromDocument): Ensures distribution of this ElementShadow and
all of the parent TreeScope distribution. This function will be shared for Bug 104345.
(WebCore):
* dom/ElementShadow.h:
(ElementShadow):
* html/shadow/HTMLShadowElement.cpp:
(WebCore::HTMLShadowElement::olderShadowRoot):
(WebCore):
* html/shadow/HTMLShadowElement.h:
* html/shadow/HTMLShadowElement.idl:

LayoutTests:

* fast/dom/shadow/olderShadowRoot-in-shadowelement-expected.txt: Added.
* fast/dom/shadow/olderShadowRoot-in-shadowelement.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/shadow/olderShadowRoot-in-shadowelement-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/shadow/olderShadowRoot-in-shadowelement.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/ElementShadow.cpp
Source/WebCore/dom/ElementShadow.h
Source/WebCore/html/shadow/HTMLShadowElement.cpp
Source/WebCore/html/shadow/HTMLShadowElement.h
Source/WebCore/html/shadow/HTMLShadowElement.idl