2011-04-21 MORITA Hajime <morrita@google.com>
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2011 16:13:22 +0000 (16:13 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2011 16:13:22 +0000 (16:13 +0000)
commit8a8e247b77cb07cbf6631b51ac0e0845567741b3
tree27825998e3bdd86b9d13e0a5dce8bb5b7bb7feb4
parent2571917f87289be9f9e194fd94981ece88d76302
2011-04-21  MORITA Hajime  <morrita@google.com>

        Reviewed by Dimitri Glazkov.

        Content of <details> should be forwarded through the shadow DOM
        https://bugs.webkit.org/show_bug.cgi?id=59055

        * fast/html/details-add-child-1.html: Added.
        * fast/html/details-add-child-2.html: Added.
        * fast/html/details-remove-child-1.html: Added.
        * fast/html/details-remove-child-2.html: Added.
        * platform/chromium/test_expectations.txt:
        * platform/mac/fast/html/details-add-child-1-expected.checksum: Added.
        * platform/mac/fast/html/details-add-child-1-expected.png: Added.
        * platform/mac/fast/html/details-add-child-1-expected.txt: Added.
        * platform/mac/fast/html/details-add-child-2-expected.checksum: Added.
        * platform/mac/fast/html/details-add-child-2-expected.png: Added.
        * platform/mac/fast/html/details-add-child-2-expected.txt: Added.
        * platform/mac/fast/html/details-add-summary-1-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-1-expected.txt:
        * platform/mac/fast/html/details-add-summary-10-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-10-expected.txt:
        * platform/mac/fast/html/details-add-summary-2-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-2-expected.txt:
        * platform/mac/fast/html/details-add-summary-3-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-3-expected.txt:
        * platform/mac/fast/html/details-add-summary-4-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-4-expected.txt:
        * platform/mac/fast/html/details-add-summary-5-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-5-expected.txt:
        * platform/mac/fast/html/details-add-summary-6-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-6-expected.txt:
        * platform/mac/fast/html/details-add-summary-7-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-7-expected.txt:
        * platform/mac/fast/html/details-add-summary-8-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-8-expected.txt:
        * platform/mac/fast/html/details-add-summary-9-and-click-expected.txt:
        * platform/mac/fast/html/details-add-summary-9-expected.txt:
        * platform/mac/fast/html/details-add-summary-child-1-expected.txt:
        * platform/mac/fast/html/details-add-summary-child-2-expected.txt:
        * platform/mac/fast/html/details-no-summary1-expected.txt:
        * platform/mac/fast/html/details-no-summary2-expected.txt:
        * platform/mac/fast/html/details-no-summary3-expected.txt:
        * platform/mac/fast/html/details-no-summary4-expected.txt:
        * platform/mac/fast/html/details-open-javascript-expected.txt:
        * platform/mac/fast/html/details-open1-expected.txt:
        * platform/mac/fast/html/details-open2-expected.txt:
        * platform/mac/fast/html/details-open3-expected.txt:
        * platform/mac/fast/html/details-open4-expected.txt:
        * platform/mac/fast/html/details-open5-expected.txt:
        * platform/mac/fast/html/details-open6-expected.txt:
        * platform/mac/fast/html/details-position-expected.txt:
        * platform/mac/fast/html/details-remove-child-1-expected.checksum: Added.
        * platform/mac/fast/html/details-remove-child-1-expected.png: Added.
        * platform/mac/fast/html/details-remove-child-1-expected.txt: Added.
        * platform/mac/fast/html/details-remove-child-2-expected.checksum: Added.
        * platform/mac/fast/html/details-remove-child-2-expected.png: Added.
        * platform/mac/fast/html/details-remove-child-2-expected.txt: Added.
        * platform/mac/fast/html/details-remove-summary-1-and-click-expected.txt:
        * platform/mac/fast/html/details-remove-summary-1-expected.txt:
        * platform/mac/fast/html/details-remove-summary-2-and-click-expected.txt:
        * platform/mac/fast/html/details-remove-summary-2-expected.txt:
        * platform/mac/fast/html/details-remove-summary-3-and-click-expected.txt:
        * platform/mac/fast/html/details-remove-summary-3-expected.txt:
        * platform/mac/fast/html/details-remove-summary-4-and-click-expected.txt:
        * platform/mac/fast/html/details-remove-summary-4-expected.txt:
        * platform/mac/fast/html/details-remove-summary-5-and-click-expected.txt:
        * platform/mac/fast/html/details-remove-summary-5-expected.txt:
        * platform/mac/fast/html/details-remove-summary-6-and-click-expected.txt:
        * platform/mac/fast/html/details-remove-summary-6-expected.txt:
        * platform/mac/fast/html/details-remove-summary-child-1-expected.txt:
        * platform/mac/fast/html/details-remove-summary-child-2-expected.txt:
        * platform/mac/fast/html/details-writing-mode-expected.txt:
2011-04-21  MORITA Hajime  <morrita@google.com>

        Reviewed by Dimitri Glazkov.

        Content of <details> should be forwarded through the shadow DOM
        https://bugs.webkit.org/show_bug.cgi?id=59055

        - Made ShadowContentElement abstract and added shouldInclude() pure virtual method.
        - Added SummaryContentElement, DetailsContentElement, DetailsSummaryElement as
          subclasses of ShadowContentElement.
        - Gave two shadow children for HTMLDetailsElement. One is DetailsContentElement, that
          handles non-summary contents of <details>. Another is SummaryContentElement, that
          handles the main summary element.
        - Removed most of RenderDetails custom layout mechanism, which is replaced by
          ShadowContentElement subclasses.

        Tests: fast/html/details-add-child-1.html
               fast/html/details-add-child-2.html
               fast/html/details-remove-child-1.html
               fast/html/details-remove-child-2.html

        * dom/ShadowRoot.cpp:
        (WebCore::ShadowRoot::contentContainerFor):
        (WebCore::ShadowRoot::hostChildrenChanged):
        (WebCore::ShadowRoot::hasContentElement):
        * dom/ShadowRoot.h:
        * html/HTMLDetailsElement.cpp:
        (WebCore::DetailsContentElement::DetailsContentElement):
        (WebCore::DetailsContentElement::create):
        (WebCore::DetailsContentElement::shouldInclude):
        (WebCore::DetailsSummaryElement::DetailsSummaryElement):
        (WebCore::DetailsSummaryElement::create):
        (WebCore::DetailsSummaryElement::shouldInclude):
        (WebCore::HTMLDetailsElement::create):
        (WebCore::HTMLDetailsElement::HTMLDetailsElement):
        (WebCore::HTMLDetailsElement::ensureShadowSubtreeOf):
        (WebCore::findSummaryFor):
        (WebCore::HTMLDetailsElement::ensureMainSummary):
        (WebCore::HTMLDetailsElement::refreshMainSummary):
        (WebCore::HTMLDetailsElement::createShadowSubtree):
        * html/HTMLDetailsElement.h:
        * html/HTMLSummaryElement.cpp:
        (WebCore::SummaryContentElement::SummaryContentElement):
        (WebCore::SummaryContentElement::shouldInclude):
        (WebCore::SummaryContentElement::create):
        (WebCore::HTMLSummaryElement::createShadowSubtree):
        * html/shadow/ShadowContentElement.h:
        * rendering/RenderDetails.cpp:
        (WebCore::RenderDetails::RenderDetails):
        (WebCore::RenderDetails::addChild):
        * rendering/RenderDetails.h:
        * rendering/RenderSummary.cpp:
        * rendering/RenderSummary.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
78 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/html/details-add-child-1.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-child-2.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-child-1.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-child-2.html [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac/fast/html/details-add-child-1-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-add-child-1-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-add-child-1-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-add-child-2-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-add-child-2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-add-child-2-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-add-summary-1-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-1-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-10-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-10-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-2-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-2-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-3-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-3-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-4-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-4-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-5-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-5-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-6-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-6-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-7-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-7-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-8-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-8-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-9-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-9-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-child-1-expected.txt
LayoutTests/platform/mac/fast/html/details-add-summary-child-2-expected.txt
LayoutTests/platform/mac/fast/html/details-no-summary1-expected.txt
LayoutTests/platform/mac/fast/html/details-no-summary2-expected.txt
LayoutTests/platform/mac/fast/html/details-no-summary3-expected.txt
LayoutTests/platform/mac/fast/html/details-no-summary4-expected.txt
LayoutTests/platform/mac/fast/html/details-open-javascript-expected.txt
LayoutTests/platform/mac/fast/html/details-open1-expected.txt
LayoutTests/platform/mac/fast/html/details-open2-expected.txt
LayoutTests/platform/mac/fast/html/details-open3-expected.txt
LayoutTests/platform/mac/fast/html/details-open4-expected.txt
LayoutTests/platform/mac/fast/html/details-open5-expected.txt
LayoutTests/platform/mac/fast/html/details-open6-expected.txt
LayoutTests/platform/mac/fast/html/details-position-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-child-1-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-remove-child-1-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-remove-child-1-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-remove-child-2-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-remove-child-2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-remove-child-2-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/html/details-remove-summary-1-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-1-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-2-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-2-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-3-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-3-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-4-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-4-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-5-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-5-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-6-and-click-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-6-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-child-1-expected.txt
LayoutTests/platform/mac/fast/html/details-remove-summary-child-2-expected.txt
LayoutTests/platform/mac/fast/html/details-writing-mode-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/dom/ShadowRoot.h
Source/WebCore/html/HTMLDetailsElement.cpp
Source/WebCore/html/HTMLDetailsElement.h
Source/WebCore/html/HTMLSummaryElement.cpp
Source/WebCore/html/shadow/ShadowContentElement.h
Source/WebCore/rendering/RenderDetails.cpp
Source/WebCore/rendering/RenderDetails.h
Source/WebCore/rendering/RenderSummary.cpp
Source/WebCore/rendering/RenderSummary.h