• morrita@google.com's avatar
    .: [ShadowContentElement] forwarded node should be able to access its hosting content element. · 3b337f86
    morrita@google.com authored
    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: http://svn.webkit.org/repository/webkit/trunk@90976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    3b337f86
Internals.idl 2.14 KB