Skip to content
  • commit-queue@webkit.org's avatar
    Source/WebCore: Reimplement DETAILS and SUMMARY using selector query. · 4a5af418
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=75930
    
    Patch by Shinya Kawanaka <shinyak@google.com> on 2012-02-03
    Reviewed by Hajime Morita.
    
    DETAILS is reimplemented using content element and its fallback feature.
    We don't need to recreate DOM even if SUMMARY is removed from or added into DETAILS.
    
    No new tests, should be covered by existing tests.
    
    * html/HTMLDetailsElement.cpp:
    (WebCore::DetailsSummaryElement::fallbackSummary):
      Takes fallback element of content summary.
    (DetailsSummaryElement):
    (WebCore::DetailsSummaryElement::create):
      Creates a fallback element also.
    (WebCore):
    (WebCore::HTMLDetailsElement::create):
    (WebCore::HTMLDetailsElement::HTMLDetailsElement):
    (WebCore::HTMLDetailsElement::createShadowSubtree):
    (WebCore::HTMLDetailsElement::findMainSummary):
    (WebCore::HTMLDetailsElement::parseMappedAttribute):
    (WebCore::HTMLDetailsElement::childShouldCreateRenderer):
    (WebCore::HTMLDetailsElement::toggleOpen):
    * html/HTMLDetailsElement.h:
    (HTMLDetailsElement):
    * html/HTMLSummaryElement.cpp:
    (WebCore::HTMLSummaryElement::isMainSummary):
    
    LayoutTests: Reimplement DETAILS and SUMMARY using selector query.
    https://bugs.webkit.org/show_bug.cgi?id=75930
    
    Since the implementation of DETAILS shadow tree, the path of caret position is also changed.
    
    Patch by Shinya Kawanaka <shinyak@google.com> on 2012-02-03
    Reviewed by Hajime Morita.
    
    * platform/chromium-win/fast/html/details-remove-summary-1-and-click-expected.txt:
    * platform/chromium-win/fast/html/details-remove-summary-4-and-click-expected.txt:
    * platform/gtk/fast/html/details-remove-summary-1-and-click-expected.txt:
    * platform/gtk/fast/html/details-remove-summary-4-and-click-expected.txt:
    * platform/mac/fast/html/details-remove-summary-1-and-click-expected.txt:
    * platform/mac/fast/html/details-remove-summary-4-and-click-expected.txt:
    * platform/qt/fast/html/details-remove-summary-1-and-click-expected.txt:
    * platform/qt/fast/html/details-remove-summary-4-and-click-expected.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4a5af418