.: [ShadowContentElement] forwarded node should be able to access its hosting content...
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2011 03:39:31 +0000 (03:39 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2011 03:39:31 +0000 (03:39 +0000)
commit7b74fdee4de983c20b64fc94ca2f23cc55c284e3
treecc8fd1e526bc43c1df50337df6d440ef0f94b435
parentbed56bc8dfaeb28d7df1ea815dc7db791b33d91c
.: [ShadowContentElement] forwarded node should be able to access its hosting content element.
https://bugs.webkit.org/show_bug.cgi?id=64251

Reviewed by Dimitri Glazkov.

Added GTK symbols for new window.internals methods.

* Source/autotools/symbols.filter:

Source/WebCore: [ShadowContentElement] forwarded node should be able to access its hosting content element.
https://bugs.webkit.org/show_bug.cgi?id=64251

Reviewed by Dimitri Glazkov.

- Introduced ShadowInclusionSet to manage included nodes to its includer content element.
  ShadowInclusionSet instance is owned by ShadowRoot.
- Updated the set on inclusion list changes.
- Used the set to retrieve the content element of NodeRenderingContext.

There are also related refactoring and cleanup:
- Renamed NodeRenderingContext::m_contentElement to m_includer
- ShadowContentSelector::m_activeElement is no longer used, thus removed.

Test: fast/dom/shadow/content-element-includer.html

* WebCore.exp.in:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRenderingContext::nextRenderer):
(WebCore::NodeRenderingContext::previousRenderer):
* dom/NodeRenderingContext.h:
(WebCore::NodeRenderingContext::includer):
* dom/ShadowContentElement.cpp:
(WebCore::removeFromSet): Added
(WebCore::addToSet): Added
(WebCore::ShadowContentElement::attach):
(WebCore::ShadowContentElement::detach):
* dom/ShadowContentElement.h:
(WebCore::ShadowInclusionSet::add):
(WebCore::ShadowInclusionSet::remove):
(WebCore::ShadowInclusionSet::isEmpty):
(WebCore::ShadowInclusionSet::Translator::hash):
(WebCore::ShadowInclusionSet::Translator::equal):
(WebCore::ShadowInclusionSet::Hash::hash):
(WebCore::ShadowInclusionSet::Hash::equal):
(WebCore::ShadowInclusionSet::find):
* dom/ShadowContentSelector.cpp:
(WebCore::ShadowContentSelector::ShadowContentSelector):
(WebCore::ShadowContentSelector::selectInclusion):
* dom/ShadowContentSelector.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::~ShadowRoot):
(WebCore::ShadowRoot::includerFor): Replaced activeElement()
(WebCore::ShadowRoot::inclusions): Added
(WebCore::ShadowRoot::ensureInclusions): Added
* dom/ShadowRoot.h:
(WebCore::toShadowRoot):
* testing/Internals.cpp:
(WebCore::Internals::includerFor):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2: [ShadowContentElement] forwarded node should be able to access its hosting content element.
https://bugs.webkit.org/show_bug.cgi?id=64251

Reviewed by Dimitri Glazkov.

Exported additional symbols for window.internals object.

* win/WebKit2.def:

LayoutTests: [ShadowContentElement] forwarded node should be able to access its hosting content element.
https://bugs.webkit.org/show_bug.cgi?id=64251

Reviewed by Dimitri Glazkov.

- Added a new test.
- Updated expectations. This change make ShadowContentElement availability on NodeRenderingContext
  more strict. that makes some redundant node disappeared.

* fast/dom/shadow/content-element-includer-expected.txt: Added.
* fast/dom/shadow/content-element-includer.html: Added.
* platform/chromium-win/fast/html/details-nested-2-expected.txt:
* platform/gtk/fast/html/details-nested-2-expected.txt:
* platform/mac/fast/html/details-nested-2-expected.txt:
* platform/qt/fast/html/details-nested-2-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/dom/shadow/content-element-includer-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/shadow/content-element-includer.html [new file with mode: 0644]
LayoutTests/platform/chromium-win/fast/html/details-nested-2-expected.txt
LayoutTests/platform/gtk/fast/html/details-nested-2-expected.txt
LayoutTests/platform/mac/fast/html/details-nested-2-expected.txt
LayoutTests/platform/qt/fast/html/details-nested-2-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/dom/NodeRenderingContext.cpp
Source/WebCore/dom/NodeRenderingContext.h
Source/WebCore/dom/ShadowContentElement.cpp
Source/WebCore/dom/ShadowContentElement.h
Source/WebCore/dom/ShadowContentSelector.cpp
Source/WebCore/dom/ShadowContentSelector.h
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/dom/ShadowRoot.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/autotools/symbols.filter