HTML5 <details> and <summary>: rendering
authorluiz@webkit.org <luiz@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Mar 2011 17:35:17 +0000 (17:35 +0000)
committerluiz@webkit.org <luiz@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Mar 2011 17:35:17 +0000 (17:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=51071

Reviewed by Dave Hyatt.

Source/WebCore:

Tests: fast/html/details-add-summary-1-and-click.html
       fast/html/details-add-summary-1.html
       fast/html/details-add-summary-10-and-click.html
       fast/html/details-add-summary-10.html
       fast/html/details-add-summary-2-and-click.html
       fast/html/details-add-summary-2.html
       fast/html/details-add-summary-3-and-click.html
       fast/html/details-add-summary-3.html
       fast/html/details-add-summary-4-and-click.html
       fast/html/details-add-summary-4.html
       fast/html/details-add-summary-5-and-click.html
       fast/html/details-add-summary-5.html
       fast/html/details-add-summary-6-and-click.html
       fast/html/details-add-summary-6.html
       fast/html/details-add-summary-7-and-click.html
       fast/html/details-add-summary-7.html
       fast/html/details-add-summary-8-and-click.html
       fast/html/details-add-summary-8.html
       fast/html/details-add-summary-9-and-click.html
       fast/html/details-add-summary-9.html
       fast/html/details-mouse-click.html
       fast/html/details-no-summary1.html
       fast/html/details-no-summary2.html
       fast/html/details-no-summary3.html
       fast/html/details-no-summary4.html
       fast/html/details-open-javascript.html
       fast/html/details-open1.html
       fast/html/details-open2.html
       fast/html/details-open3.html
       fast/html/details-open4.html
       fast/html/details-open5.html
       fast/html/details-open6.html
       fast/html/details-position.html
       fast/html/details-remove-summary-1-and-click.html
       fast/html/details-remove-summary-1.html
       fast/html/details-remove-summary-2-and-click.html
       fast/html/details-remove-summary-2.html
       fast/html/details-remove-summary-3-and-click.html
       fast/html/details-remove-summary-3.html
       fast/html/details-remove-summary-4-and-click.html
       fast/html/details-remove-summary-4.html
       fast/html/details-remove-summary-5-and-click.html
       fast/html/details-remove-summary-5.html
       fast/html/details-remove-summary-6-and-click.html
       fast/html/details-remove-summary-6.html
       fast/html/details-writing-mode.html

http://www.w3.org/TR/html5/interactive-elements.html#the-details-element

The main <summary> element is the first <summary> element of a <details> element.
All other childs of the <details> element are rendered only if the attribute 'open' is set.
Click event toggles the 'open' attribute.

* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::HTMLDetailsElement):
(WebCore::HTMLDetailsElement::findMainSummary):
(WebCore::HTMLDetailsElement::childrenChanged):
(WebCore::HTMLDetailsElement::finishParsingChildren):
(WebCore::HTMLDetailsElement::parseMappedAttribute):
(WebCore::HTMLDetailsElement::childShouldCreateRenderer):
(WebCore::HTMLDetailsElement::defaultEventHandler):
* html/HTMLDetailsElement.h:
(WebCore::HTMLDetailsElement::mainSummary):

Method createRenderer added to class HTMLSummaryElement.

* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createRenderer):
* html/HTMLSummaryElement.h:

The first <summary> element is positioned at the top of its <details> parent.
The area occupied by this main <summary> element is the interactive area of the
<details> element. If the <details> tag has no <summary> child an OwnedSummaryRenderer
is created and added to the corresponding RenderDetails object.

* rendering/RenderDetails.cpp:
(WebCore::RenderDetails::RenderDetails):
(WebCore::RenderDetails::destroy):
(WebCore::RenderDetails::summaryBlock):
(WebCore::RenderDetails::contentBlock):
(WebCore::RenderDetails::addChild):
(WebCore::RenderDetails::removeChild):
(WebCore::RenderDetails::setMarkerStyle):
(WebCore::RenderDetails::styleDidChange):
(WebCore::RenderDetails::getRenderPosition):
(WebCore::RenderDetails::markerDestroyed):
(WebCore::RenderDetails::summaryDestroyed):
(WebCore::RenderDetails::moveSummaryToContents):
(WebCore::RenderDetails::createSummaryStyle):
(WebCore::RenderDetails::replaceMainSummary):
(WebCore::RenderDetails::createDefaultSummary):
(WebCore::RenderDetails::checkMainSummary):
(WebCore::RenderDetails::layout):
(WebCore::RenderDetails::isOpen):
(WebCore::RenderDetails::getParentOfFirstLineBox):
(WebCore::RenderDetails::firstNonMarkerChild):
(WebCore::RenderDetails::updateMarkerLocation):
* rendering/RenderDetails.h:
(WebCore::RenderDetails::interactiveArea):
(WebCore::RenderDetails::removeLeftoverAnonymousBlock):
(WebCore::RenderDetails::createsAnonymousWrapper):
(WebCore::RenderDetails::requiresForcedStyleRecalcPropagation):

A marker is added to the main <summary> element to indicate the current value of the 'open'
attribute of the <details> element.

* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::RenderDetailsMarker):
(WebCore::RenderDetailsMarker::destroy):
(WebCore::RenderDetailsMarker::lineHeight):
(WebCore::RenderDetailsMarker::baselinePosition):
(WebCore::RenderDetailsMarker::computePreferredLogicalWidths):
(WebCore::RenderDetailsMarker::layout):
(WebCore::RenderDetailsMarker::getRelativeMarkerRect):
(WebCore::RenderDetailsMarker::isOpen):
(WebCore::createPath):
(WebCore::createDownArrowPath):
(WebCore::createUpArrowPath):
(WebCore::createLeftArrowPath):
(WebCore::createRightArrowPath):
(WebCore::RenderDetailsMarker::orientation):
(WebCore::RenderDetailsMarker::getCanonicalPath):
(WebCore::RenderDetailsMarker::getPath):
(WebCore::RenderDetailsMarker::paint):
* rendering/RenderDetailsMarker.h:
(WebCore::toRenderDetailsMarker):

* rendering/RenderSummary.cpp:
(WebCore::RenderSummary::RenderSummary):
(WebCore::RenderSummary::destroy):
(WebCore::RenderSummary::parentDetails):
(WebCore::RenderSummary::styleDidChange):
* rendering/RenderSummary.h:

* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):

LayoutTests:

* fast/html/details-add-summary-1-and-click.html: Added.
* fast/html/details-add-summary-1.html: Added.
* fast/html/details-add-summary-10-and-click.html: Added.
* fast/html/details-add-summary-10.html: Added.
* fast/html/details-add-summary-2-and-click.html: Added.
* fast/html/details-add-summary-2.html: Added.
* fast/html/details-add-summary-3-and-click.html: Added.
* fast/html/details-add-summary-3.html: Added.
* fast/html/details-add-summary-4-and-click.html: Added.
* fast/html/details-add-summary-4.html: Added.
* fast/html/details-add-summary-5-and-click.html: Added.
* fast/html/details-add-summary-5.html: Added.
* fast/html/details-add-summary-6-and-click.html: Added.
* fast/html/details-add-summary-6.html: Added.
* fast/html/details-add-summary-7-and-click.html: Added.
* fast/html/details-add-summary-7.html: Added.
* fast/html/details-add-summary-8-and-click.html: Added.
* fast/html/details-add-summary-8.html: Added.
* fast/html/details-add-summary-9-and-click.html: Added.
* fast/html/details-add-summary-9.html: Added.
* fast/html/details-mouse-click-expected.txt: Added.
* fast/html/details-mouse-click.html: Added.
* fast/html/details-no-summary1.html: Added.
* fast/html/details-no-summary2.html: Added.
* fast/html/details-no-summary3.html: Added.
* fast/html/details-no-summary4.html: Added.
* fast/html/details-open-javascript.html: Added.
* fast/html/details-open1.html: Added.
* fast/html/details-open2.html: Added.
* fast/html/details-open3.html: Added.
* fast/html/details-open4.html: Added.
* fast/html/details-open5.html: Added.
* fast/html/details-open6.html: Added.
* fast/html/details-position.html: Added.
* fast/html/details-remove-summary-1-and-click.html: Added.
* fast/html/details-remove-summary-1.html: Added.
* fast/html/details-remove-summary-2-and-click.html: Added.
* fast/html/details-remove-summary-2.html: Added.
* fast/html/details-remove-summary-3-and-click.html: Added.
* fast/html/details-remove-summary-3.html: Added.
* fast/html/details-remove-summary-4-and-click.html: Added.
* fast/html/details-remove-summary-4.html: Added.
* fast/html/details-remove-summary-5-and-click.html: Added.
* fast/html/details-remove-summary-5.html: Added.
* fast/html/details-remove-summary-6-and-click.html: Added.
* fast/html/details-remove-summary-6.html: Added.
* fast/html/details-writing-mode.html: Added.
* platform/qt/fast/html/details-add-summary-1-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-1-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-10-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-10-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-2-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-2-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-3-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-3-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-4-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-4-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-5-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-5-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-6-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-6-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-7-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-7-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-8-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-8-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-9-and-click-expected.txt: Added.
* platform/qt/fast/html/details-add-summary-9-expected.txt: Added.
* platform/qt/fast/html/details-no-summary1-expected.txt: Added.
* platform/qt/fast/html/details-no-summary2-expected.txt: Added.
* platform/qt/fast/html/details-no-summary3-expected.txt: Added.
* platform/qt/fast/html/details-no-summary4-expected.txt: Added.
* platform/qt/fast/html/details-open-javascript-expected.txt: Added.
* platform/qt/fast/html/details-open1-expected.txt: Added.
* platform/qt/fast/html/details-open2-expected.txt: Added.
* platform/qt/fast/html/details-open3-expected.txt: Added.
* platform/qt/fast/html/details-open4-expected.txt: Added.
* platform/qt/fast/html/details-open5-expected.txt: Added.
* platform/qt/fast/html/details-open6-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-1-and-click-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-1-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-2-and-click-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-2-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-3-and-click-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-3-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-4-and-click-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-4-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-5-and-click-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-5-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-6-and-click-expected.txt: Added.
* platform/qt/fast/html/details-remove-summary-6-expected.txt: Added.
* platform/qt/fast/html/details-writing-mode-expected.txt: Added.
* platform/qt/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

107 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/html/details-add-summary-1-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-1.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-10-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-10.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-2-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-2.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-3-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-3.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-4-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-4.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-5-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-5.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-6-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-6.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-7-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-7.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-8-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-8.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-9-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-add-summary-9.html [new file with mode: 0644]
LayoutTests/fast/html/details-element-render-inline-crash-expected.txt
LayoutTests/fast/html/details-mouse-click-expected.txt [new file with mode: 0644]
LayoutTests/fast/html/details-mouse-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-no-summary1.html [new file with mode: 0644]
LayoutTests/fast/html/details-no-summary2.html [new file with mode: 0644]
LayoutTests/fast/html/details-no-summary3.html [new file with mode: 0644]
LayoutTests/fast/html/details-no-summary4.html [new file with mode: 0644]
LayoutTests/fast/html/details-open-javascript.html [new file with mode: 0644]
LayoutTests/fast/html/details-open1.html [new file with mode: 0644]
LayoutTests/fast/html/details-open2.html [new file with mode: 0644]
LayoutTests/fast/html/details-open3.html [new file with mode: 0644]
LayoutTests/fast/html/details-open4.html [new file with mode: 0644]
LayoutTests/fast/html/details-open5.html [new file with mode: 0644]
LayoutTests/fast/html/details-open6.html [new file with mode: 0644]
LayoutTests/fast/html/details-position.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-1-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-1.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-2-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-2.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-3-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-3.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-4-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-4.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-5-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-5.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-6-and-click.html [new file with mode: 0644]
LayoutTests/fast/html/details-remove-summary-6.html [new file with mode: 0644]
LayoutTests/fast/html/details-writing-mode.html [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-1-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-1-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-10-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-10-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-2-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-2-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-3-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-3-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-4-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-4-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-5-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-5-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-6-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-6-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-7-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-7-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-8-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-8-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-9-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-add-summary-9-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-no-summary1-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-no-summary2-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-no-summary3-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-no-summary4-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-open-javascript-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-open1-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-open2-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-open3-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-open4-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-open5-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-open6-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-position-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-1-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-1-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-2-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-2-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-3-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-3-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-4-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-4-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-5-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-5-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-6-and-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-remove-summary-6-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/html/details-writing-mode-expected.txt [new file with mode: 0644]
LayoutTests/platform/qt/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLDetailsElement.cpp
Source/WebCore/html/HTMLDetailsElement.h
Source/WebCore/html/HTMLSummaryElement.cpp
Source/WebCore/html/HTMLSummaryElement.h
Source/WebCore/rendering/RenderDetails.cpp
Source/WebCore/rendering/RenderDetails.h
Source/WebCore/rendering/RenderDetailsMarker.cpp
Source/WebCore/rendering/RenderDetailsMarker.h
Source/WebCore/rendering/RenderSummary.cpp
Source/WebCore/rendering/RenderSummary.h
Source/WebCore/rendering/RenderTreeAsText.cpp

index ccb1936..ac5575f 100644 (file)
@@ -1,3 +1,103 @@
+2011-02-28  Luiz Agostini  <luiz.agostini@openbossa.org>
+
+        Reviewed by Dave Hyatt.
+
+        HTML5 <details> and <summary>: rendering
+        https://bugs.webkit.org/show_bug.cgi?id=51071
+
+        * fast/html/details-add-summary-1-and-click.html: Added.
+        * fast/html/details-add-summary-1.html: Added.
+        * fast/html/details-add-summary-10-and-click.html: Added.
+        * fast/html/details-add-summary-10.html: Added.
+        * fast/html/details-add-summary-2-and-click.html: Added.
+        * fast/html/details-add-summary-2.html: Added.
+        * fast/html/details-add-summary-3-and-click.html: Added.
+        * fast/html/details-add-summary-3.html: Added.
+        * fast/html/details-add-summary-4-and-click.html: Added.
+        * fast/html/details-add-summary-4.html: Added.
+        * fast/html/details-add-summary-5-and-click.html: Added.
+        * fast/html/details-add-summary-5.html: Added.
+        * fast/html/details-add-summary-6-and-click.html: Added.
+        * fast/html/details-add-summary-6.html: Added.
+        * fast/html/details-add-summary-7-and-click.html: Added.
+        * fast/html/details-add-summary-7.html: Added.
+        * fast/html/details-add-summary-8-and-click.html: Added.
+        * fast/html/details-add-summary-8.html: Added.
+        * fast/html/details-add-summary-9-and-click.html: Added.
+        * fast/html/details-add-summary-9.html: Added.
+        * fast/html/details-mouse-click-expected.txt: Added.
+        * fast/html/details-mouse-click.html: Added.
+        * fast/html/details-no-summary1.html: Added.
+        * fast/html/details-no-summary2.html: Added.
+        * fast/html/details-no-summary3.html: Added.
+        * fast/html/details-no-summary4.html: Added.
+        * fast/html/details-open-javascript.html: Added.
+        * fast/html/details-open1.html: Added.
+        * fast/html/details-open2.html: Added.
+        * fast/html/details-open3.html: Added.
+        * fast/html/details-open4.html: Added.
+        * fast/html/details-open5.html: Added.
+        * fast/html/details-open6.html: Added.
+        * fast/html/details-position.html: Added.
+        * fast/html/details-remove-summary-1-and-click.html: Added.
+        * fast/html/details-remove-summary-1.html: Added.
+        * fast/html/details-remove-summary-2-and-click.html: Added.
+        * fast/html/details-remove-summary-2.html: Added.
+        * fast/html/details-remove-summary-3-and-click.html: Added.
+        * fast/html/details-remove-summary-3.html: Added.
+        * fast/html/details-remove-summary-4-and-click.html: Added.
+        * fast/html/details-remove-summary-4.html: Added.
+        * fast/html/details-remove-summary-5-and-click.html: Added.
+        * fast/html/details-remove-summary-5.html: Added.
+        * fast/html/details-remove-summary-6-and-click.html: Added.
+        * fast/html/details-remove-summary-6.html: Added.
+        * fast/html/details-writing-mode.html: Added.
+        * platform/qt/fast/html/details-add-summary-1-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-1-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-10-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-10-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-2-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-2-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-3-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-3-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-4-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-4-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-5-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-5-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-6-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-6-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-7-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-7-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-8-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-8-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-9-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-add-summary-9-expected.txt: Added.
+        * platform/qt/fast/html/details-no-summary1-expected.txt: Added.
+        * platform/qt/fast/html/details-no-summary2-expected.txt: Added.
+        * platform/qt/fast/html/details-no-summary3-expected.txt: Added.
+        * platform/qt/fast/html/details-no-summary4-expected.txt: Added.
+        * platform/qt/fast/html/details-open-javascript-expected.txt: Added.
+        * platform/qt/fast/html/details-open1-expected.txt: Added.
+        * platform/qt/fast/html/details-open2-expected.txt: Added.
+        * platform/qt/fast/html/details-open3-expected.txt: Added.
+        * platform/qt/fast/html/details-open4-expected.txt: Added.
+        * platform/qt/fast/html/details-open5-expected.txt: Added.
+        * platform/qt/fast/html/details-open6-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-1-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-1-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-2-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-2-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-3-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-3-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-4-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-4-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-5-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-5-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-6-and-click-expected.txt: Added.
+        * platform/qt/fast/html/details-remove-summary-6-expected.txt: Added.
+        * platform/qt/fast/html/details-writing-mode-expected.txt: Added.
+        * platform/qt/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt:
+
 2011-03-14  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r81026.
diff --git a/LayoutTests/fast/html/details-add-summary-1-and-click.html b/LayoutTests/fast/html/details-add-summary-1-and-click.html
new file mode 100644 (file)
index 0000000..ee0d506
--- /dev/null
@@ -0,0 +1,24 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details id="dt1"></details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-1.html b/LayoutTests/fast/html/details-add-summary-1.html
new file mode 100644 (file)
index 0000000..b3d8786
--- /dev/null
@@ -0,0 +1,18 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details id="dt1"></details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-10-and-click.html b/LayoutTests/fast/html/details-add-summary-10-and-click.html
new file mode 100644 (file)
index 0000000..ed29e5b
--- /dev/null
@@ -0,0 +1,26 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").insertBefore(createNewElement("summary", "new1", "new 1"), document.getElementById("summary1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-10.html b/LayoutTests/fast/html/details-add-summary-10.html
new file mode 100644 (file)
index 0000000..ace1d76
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").insertBefore(createNewElement("summary", "new1", "new 1"), document.getElementById("summary1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-2-and-click.html b/LayoutTests/fast/html/details-add-summary-2-and-click.html
new file mode 100644 (file)
index 0000000..0be6358
--- /dev/null
@@ -0,0 +1,26 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new2", "new 2"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details id="dt1"></details>
+</body>
+
diff --git a/LayoutTests/fast/html/details-add-summary-2.html b/LayoutTests/fast/html/details-add-summary-2.html
new file mode 100644 (file)
index 0000000..b8ab7da
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new2", "new 2"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details id="dt1"></details>
+</body>
+
diff --git a/LayoutTests/fast/html/details-add-summary-3-and-click.html b/LayoutTests/fast/html/details-add-summary-3-and-click.html
new file mode 100644 (file)
index 0000000..1de8096
--- /dev/null
@@ -0,0 +1,26 @@
+
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+    document.getElementById("dt1").insertBefore(createNewElement("summary", "new2", "new 2"), document.getElementById("new1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details id="dt1"></details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-3.html b/LayoutTests/fast/html/details-add-summary-3.html
new file mode 100644 (file)
index 0000000..b92e294
--- /dev/null
@@ -0,0 +1,20 @@
+
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+    document.getElementById("dt1").insertBefore(createNewElement("summary", "new2", "new 2"), document.getElementById("new1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details id="dt1"></details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-4-and-click.html b/LayoutTests/fast/html/details-add-summary-4-and-click.html
new file mode 100644 (file)
index 0000000..1512688
--- /dev/null
@@ -0,0 +1,26 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-4.html b/LayoutTests/fast/html/details-add-summary-4.html
new file mode 100644 (file)
index 0000000..3a075d9
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-5-and-click.html b/LayoutTests/fast/html/details-add-summary-5-and-click.html
new file mode 100644 (file)
index 0000000..74720a2
--- /dev/null
@@ -0,0 +1,26 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").insertBefore(createNewElement("summary", "new1", "new 1"), document.getElementById("summary1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-5.html b/LayoutTests/fast/html/details-add-summary-5.html
new file mode 100644 (file)
index 0000000..f7f5875
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").insertBefore(createNewElement("summary", "new1", "new 1"), document.getElementById("summary1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-6-and-click.html b/LayoutTests/fast/html/details-add-summary-6-and-click.html
new file mode 100644 (file)
index 0000000..9f1a153
--- /dev/null
@@ -0,0 +1,24 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details open id="dt1"></details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-6.html b/LayoutTests/fast/html/details-add-summary-6.html
new file mode 100644 (file)
index 0000000..a8c95d0
--- /dev/null
@@ -0,0 +1,18 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details open id="dt1"></details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-7-and-click.html b/LayoutTests/fast/html/details-add-summary-7-and-click.html
new file mode 100644 (file)
index 0000000..43f1c23
--- /dev/null
@@ -0,0 +1,26 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new2", "new 2"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details open id="dt1"></details>
+</body>
+
diff --git a/LayoutTests/fast/html/details-add-summary-7.html b/LayoutTests/fast/html/details-add-summary-7.html
new file mode 100644 (file)
index 0000000..d75f378
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new2", "new 2"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details open id="dt1"></details>
+</body>
+
diff --git a/LayoutTests/fast/html/details-add-summary-8-and-click.html b/LayoutTests/fast/html/details-add-summary-8-and-click.html
new file mode 100644 (file)
index 0000000..db633d0
--- /dev/null
@@ -0,0 +1,26 @@
+
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+    document.getElementById("dt1").insertBefore(createNewElement("summary", "new2", "new 2"), document.getElementById("new1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details open id="dt1"></details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-8.html b/LayoutTests/fast/html/details-add-summary-8.html
new file mode 100644 (file)
index 0000000..e7f04ad
--- /dev/null
@@ -0,0 +1,20 @@
+
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+    document.getElementById("dt1").insertBefore(createNewElement("summary", "new2", "new 2"), document.getElementById("new1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details open id="dt1"></details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-9-and-click.html b/LayoutTests/fast/html/details-add-summary-9-and-click.html
new file mode 100644 (file)
index 0000000..6104fe7
--- /dev/null
@@ -0,0 +1,26 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-add-summary-9.html b/LayoutTests/fast/html/details-add-summary-9.html
new file mode 100644 (file)
index 0000000..20b97e2
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var createNewElement = function (tag, id, text) {
+    var result = document.createElement(tag);
+    result.setAttribute('id',id);
+    result.innerHTML = text;
+    return result;
+};
+
+var runTests = function () {
+    document.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-mouse-click-expected.txt b/LayoutTests/fast/html/details-mouse-click-expected.txt
new file mode 100644 (file)
index 0000000..c7cde64
--- /dev/null
@@ -0,0 +1,10 @@
+details0's open attribute is expected to be'true' and is.
+details0's open attribute is expected to be'false' and is.
+details1's open attribute is expected to be'true' and is.
+details1's open attribute is expected to be'false' and is.
+details2's open attribute is expected to be'true' and is.
+details2's open attribute is expected to be'false' and is.
+details3's open attribute is expected to be'true' and is.
+details3's open attribute is expected to be'false' and is.
+PASS
+
diff --git a/LayoutTests/fast/html/details-mouse-click.html b/LayoutTests/fast/html/details-mouse-click.html
new file mode 100644 (file)
index 0000000..1a6d309
--- /dev/null
@@ -0,0 +1,103 @@
+
+<head>
+<style>
+body {
+    margin: 0px;
+}
+div {
+    width:200px;
+    height:80px;
+}
+summary {
+    background-color: red;
+}
+</style>
+
+<script>
+
+var error = false;
+
+var writeLog = function (msg)
+{
+    var results = document.getElementById('results');
+    results.innerHTML += msg + '<br>';
+};
+
+var clickElement = function (element) {
+
+    var detail = document.getElementById("details" + element);
+    var old = detail.open;
+
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+
+    if (old !== detail.open) {
+        writeLog("details" + element + "'s open attribute is expected to be'" + !old + "' and is.");
+    } else {
+        writeLog("details" + element + "'s open attribute is expected to be'" + !old + "' but instead is '" + old + "'.");
+        error = true;
+    }
+};
+
+var testElement = function (element) {
+    switch (element) {
+    case 0:
+        eventSender.mouseMoveTo(2, 2);
+        break;
+    case 1:
+        eventSender.mouseMoveTo(2, 158);
+        break;
+    case 2:
+        eventSender.mouseMoveTo(2, 162);
+        break;
+    case 3:
+        eventSender.mouseMoveTo(198, 242);
+        break;
+    }
+
+    clickElement(element);
+    clickElement(element);
+};
+
+var runTests = function () {
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+
+    layoutTestController.dumpAsText();
+
+    testElement(0);
+    testElement(1);
+    testElement(2);
+    testElement(3);
+
+    writeLog(error ? "FAIL" : "PASS");
+}
+
+</script>
+
+</head>
+
+<body onload="runTests()">
+
+<div style="-webkit-writing-mode:horizontal-tb;">
+    <details id="details0"><input></details>
+</div>
+
+<div style="-webkit-writing-mode:horizontal-bt;">
+    <details id="details1"><input></details>
+</div>
+
+<div style="-webkit-writing-mode:vertical-lr;">
+    <details id="details2"><input></details>
+</div>
+
+<div style="-webkit-writing-mode:vertical-rl;">
+    <details id="details3"><input></details>
+</div>
+
+<div id="results">
+</div>
+
+</body>
+
diff --git a/LayoutTests/fast/html/details-no-summary1.html b/LayoutTests/fast/html/details-no-summary1.html
new file mode 100644 (file)
index 0000000..d0f5808
--- /dev/null
@@ -0,0 +1 @@
+<details>
diff --git a/LayoutTests/fast/html/details-no-summary2.html b/LayoutTests/fast/html/details-no-summary2.html
new file mode 100644 (file)
index 0000000..df48728
--- /dev/null
@@ -0,0 +1 @@
+<details open>
diff --git a/LayoutTests/fast/html/details-no-summary3.html b/LayoutTests/fast/html/details-no-summary3.html
new file mode 100644 (file)
index 0000000..5e007fb
--- /dev/null
@@ -0,0 +1,3 @@
+<details>
+    <input>
+</details>
diff --git a/LayoutTests/fast/html/details-no-summary4.html b/LayoutTests/fast/html/details-no-summary4.html
new file mode 100644 (file)
index 0000000..9b5248e
--- /dev/null
@@ -0,0 +1,3 @@
+<details open>
+    <input>
+</details>
diff --git a/LayoutTests/fast/html/details-open-javascript.html b/LayoutTests/fast/html/details-open-javascript.html
new file mode 100644 (file)
index 0000000..f4efe3f
--- /dev/null
@@ -0,0 +1,14 @@
+<details id="details1">
+    <summary>details1</summary>
+    <input>
+</details>
+
+<details id="details2" open>
+    <summary>details2</summary>
+    <input>
+</details>
+
+<script>
+document.getElementById("details1").open = true;
+document.getElementById("details2").open = false;
+</script>
diff --git a/LayoutTests/fast/html/details-open1.html b/LayoutTests/fast/html/details-open1.html
new file mode 100644 (file)
index 0000000..0082b07
--- /dev/null
@@ -0,0 +1,4 @@
+<details>
+    <input>
+    <summary>summary</summary>
+</details>
diff --git a/LayoutTests/fast/html/details-open2.html b/LayoutTests/fast/html/details-open2.html
new file mode 100644 (file)
index 0000000..6dae498
--- /dev/null
@@ -0,0 +1,4 @@
+<details open>
+    <input>
+    <summary>summary</summary>
+</details>
diff --git a/LayoutTests/fast/html/details-open3.html b/LayoutTests/fast/html/details-open3.html
new file mode 100644 (file)
index 0000000..2021a63
--- /dev/null
@@ -0,0 +1,4 @@
+<details>
+    <summary>summary</summary>
+    <input>
+</details>
diff --git a/LayoutTests/fast/html/details-open4.html b/LayoutTests/fast/html/details-open4.html
new file mode 100644 (file)
index 0000000..79bc72a
--- /dev/null
@@ -0,0 +1,4 @@
+<details open>
+    <summary>summary</summary>
+    <input>
+</details>
diff --git a/LayoutTests/fast/html/details-open5.html b/LayoutTests/fast/html/details-open5.html
new file mode 100644 (file)
index 0000000..7ca74b5
--- /dev/null
@@ -0,0 +1,3 @@
+<details>
+    <summary>summary</summary>
+</details>
diff --git a/LayoutTests/fast/html/details-open6.html b/LayoutTests/fast/html/details-open6.html
new file mode 100644 (file)
index 0000000..e35e75b
--- /dev/null
@@ -0,0 +1,3 @@
+<details open>
+    <summary>summary</summary>
+</details>
diff --git a/LayoutTests/fast/html/details-position.html b/LayoutTests/fast/html/details-position.html
new file mode 100644 (file)
index 0000000..ae2be90
--- /dev/null
@@ -0,0 +1,36 @@
+<style>
+
+summary.fixed {
+    position: fixed;
+    left: 50px;
+    top: 150px;
+}
+
+summary.relative {
+    position: relative;
+    left: 150px;
+    top: 150px;
+}
+
+summary.absolute {
+    position: absolute;
+    left: 250px;
+    top: 150px;
+}
+
+</style>
+
+<body>
+    <details>
+        <summary class="fixed">fixed</summary>
+        <input>
+    </details>
+    <details>
+        <summary class="relative">relative</summary>
+        <input>
+    </details>
+    <details>
+        <summary class="absolute">absolute</summary>
+        <input>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-1-and-click.html b/LayoutTests/fast/html/details-remove-summary-1-and-click.html
new file mode 100644 (file)
index 0000000..03a558a
--- /dev/null
@@ -0,0 +1,19 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-1.html b/LayoutTests/fast/html/details-remove-summary-1.html
new file mode 100644 (file)
index 0000000..df2805b
--- /dev/null
@@ -0,0 +1,13 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-2-and-click.html b/LayoutTests/fast/html/details-remove-summary-2-and-click.html
new file mode 100644 (file)
index 0000000..f5bf997
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary 1</summary>
+        <summary id="summary2">summary 2</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-2.html b/LayoutTests/fast/html/details-remove-summary-2.html
new file mode 100644 (file)
index 0000000..3547891
--- /dev/null
@@ -0,0 +1,14 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary 1</summary>
+        <summary id="summary2">summary 2</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-3-and-click.html b/LayoutTests/fast/html/details-remove-summary-3-and-click.html
new file mode 100644 (file)
index 0000000..59b2131
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary2"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary 1</summary>
+        <summary id="summary2">summary 2</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-3.html b/LayoutTests/fast/html/details-remove-summary-3.html
new file mode 100644 (file)
index 0000000..d3a829b
--- /dev/null
@@ -0,0 +1,14 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary2"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details id="dt1">
+        <summary id="summary1">summary 1</summary>
+        <summary id="summary2">summary 2</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-4-and-click.html b/LayoutTests/fast/html/details-remove-summary-4-and-click.html
new file mode 100644 (file)
index 0000000..f0ed242
--- /dev/null
@@ -0,0 +1,19 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-4.html b/LayoutTests/fast/html/details-remove-summary-4.html
new file mode 100644 (file)
index 0000000..923fd97
--- /dev/null
@@ -0,0 +1,13 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-5-and-click.html b/LayoutTests/fast/html/details-remove-summary-5-and-click.html
new file mode 100644 (file)
index 0000000..a136032
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary1"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary 1</summary>
+        <summary id="summary2">summary 2</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-5.html b/LayoutTests/fast/html/details-remove-summary-5.html
new file mode 100644 (file)
index 0000000..f10e52a
--- /dev/null
@@ -0,0 +1,14 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary1"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary 1</summary>
+        <summary id="summary2">summary 2</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-6-and-click.html b/LayoutTests/fast/html/details-remove-summary-6-and-click.html
new file mode 100644 (file)
index 0000000..a7b2905
--- /dev/null
@@ -0,0 +1,20 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary2"));
+
+    if (!window.layoutTestController || !window.eventSender)
+        return;
+    eventSender.mouseMoveTo(2, 2);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+};
+
+</script>
+
+<body style="margin: 0px" onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary 1</summary>
+        <summary id="summary2">summary 2</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-remove-summary-6.html b/LayoutTests/fast/html/details-remove-summary-6.html
new file mode 100644 (file)
index 0000000..d132d04
--- /dev/null
@@ -0,0 +1,14 @@
+<script>
+
+var runTests = function () {
+    document.getElementById("dt1").removeChild(document.getElementById("summary2"));
+};
+
+</script>
+
+<body onload="runTests()">
+    <details open id="dt1">
+        <summary id="summary1">summary 1</summary>
+        <summary id="summary2">summary 2</summary>
+    </details>
+</body>
diff --git a/LayoutTests/fast/html/details-writing-mode.html b/LayoutTests/fast/html/details-writing-mode.html
new file mode 100644 (file)
index 0000000..e56e2a4
--- /dev/null
@@ -0,0 +1,264 @@
+<style>
+td {
+  border: 1px solid black;
+  width: 120px;
+  height: 120px;
+}
+div {
+    height: 100%;
+    width: 100%;
+}
+th {
+    padding: 5px;
+}
+</style>
+
+
+<table border="1">
+    <tr><th colspan="6">text-align not specified</th></tr>
+    <tr><th colspan="2" rowspan="2">&nbsp;</th><th colspan="4">-webkit-writing-mode</th></tr>
+    <tr><th>horizontal-tb</th><th>horizontal-bt</th><th>vertical-lr</th><th>vertical-rl</th></tr>
+    <tr>
+        <th rowspan="4">direction</th>
+        <th>ltr</th>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-tb; direction:ltr">
+                <details><summary>summary</summary></details>
+                <details open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-bt; direction:ltr">
+                <details><summary>summary</summary></details>
+                <details open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-lr; direction:ltr">
+                <details><summary>summary</summary></details>
+                <details open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-rl; direction:ltr">
+                <details><summary>summary</summary></details>
+                <details open><summary>summary</summary></details>
+            </div>
+        </td>
+    </tr>
+    <tr>
+        <th>rtl</th>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-tb; direction:rtl">
+                <details><summary>summary</summary></details>
+                <details open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-bt; direction:rtl">
+                <details><summary>summary</summary></details>
+                <details open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-lr; direction:rtl">
+                <details><summary>summary</summary></details>
+                <details open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-rl; direction:rtl">
+                <details><summary>summary</summary></details>
+                <details open><summary>summary</summary></details>
+            </div>
+        </td>
+    </tr>
+</table>
+
+<br>
+<table border="1">
+    <tr><th colspan="6">text-align: left</th></tr>
+    <tr><th colspan="2" rowspan="2">&nbsp;</th><th colspan="4">-webkit-writing-mode</th></tr>
+    <tr><th>horizontal-tb</th><th>horizontal-bt</th><th>vertical-lr</th><th>vertical-rl</th></tr>
+    <tr>
+        <th rowspan="4">direction</th>
+        <th>ltr</th>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-tb; direction:ltr">
+                <details style="text-align:left"><summary>summary</summary></details>
+                <details style="text-align:left" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-bt; direction:ltr">
+                <details style="text-align:left"><summary>summary</summary></details>
+                <details style="text-align:left" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-lr; direction:ltr">
+                <details style="text-align:left"><summary>summary</summary></details>
+                <details style="text-align:left" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-rl; direction:ltr">
+                <details style="text-align:left"><summary>summary</summary></details>
+                <details style="text-align:left" open><summary>summary</summary></details>
+            </div>
+        </td>
+    </tr>
+    <tr>
+        <th>rtl</th>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-tb; direction:rtl">
+                <details style="text-align:left"><summary>summary</summary></details>
+                <details style="text-align:left" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-bt; direction:rtl">
+                <details style="text-align:left"><summary>summary</summary></details>
+                <details style="text-align:left" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-lr; direction:rtl">
+                <details style="text-align:left"><summary>summary</summary></details>
+                <details style="text-align:left" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-rl; direction:rtl">
+                <details style="text-align:left"><summary>summary</summary></details>
+                <details style="text-align:left" open><summary>summary</summary></details>
+            </div>
+        </td>
+    </tr>
+</table>
+
+
+<br>
+<table border="1">
+    <tr><th colspan="6">text-align: center</th></tr>
+    <tr><th colspan="2" rowspan="2">&nbsp;</th><th colspan="4">-webkit-writing-mode</th></tr>
+    <tr><th>horizontal-tb</th><th>horizontal-bt</th><th>vertical-lr</th><th>vertical-rl</th></tr>
+    <tr>
+        <th rowspan="4">direction</th>
+        <th>ltr</th>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-tb; direction:ltr">
+                <details style="text-align:center"><summary>summary</summary></details>
+                <details style="text-align:center" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-bt; direction:ltr">
+                <details style="text-align:center"><summary>summary</summary></details>
+                <details style="text-align:center" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-lr; direction:ltr">
+                <details style="text-align:center"><summary>summary</summary></details>
+                <details style="text-align:center" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-rl; direction:ltr">
+                <details style="text-align:center"><summary>summary</summary></details>
+                <details style="text-align:center" open><summary>summary</summary></details>
+            </div>
+        </td>
+    </tr>
+    <tr>
+        <th>rtl</th>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-tb; direction:rtl">
+                <details style="text-align:center"><summary>summary</summary></details>
+                <details style="text-align:center" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-bt; direction:rtl">
+                <details style="text-align:center"><summary>summary</summary></details>
+                <details style="text-align:center" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-lr; direction:rtl">
+                <details style="text-align:center"><summary>summary</summary></details>
+                <details style="text-align:center" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-rl; direction:rtl">
+                <details style="text-align:center"><summary>summary</summary></details>
+                <details style="text-align:center" open><summary>summary</summary></details>
+            </div>
+        </td>
+    </tr>
+</table>
+
+
+<br>
+<table border="1">
+    <tr><th colspan="6">text-align: right</th></tr>
+    <tr><th colspan="2" rowspan="2">&nbsp;</th><th colspan="4">-webkit-writing-mode</th></tr>
+    <tr><th>horizontal-tb</th><th>horizontal-bt</th><th>vertical-lr</th><th>vertical-rl</th></tr>
+    <tr>
+        <th rowspan="4">direction</th>
+        <th>ltr</th>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-tb; direction:ltr">
+                <details style="text-align:right"><summary>summary</summary></details>
+                <details style="text-align:right" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-bt; direction:ltr">
+                <details style="text-align:right"><summary>summary</summary></details>
+                <details style="text-align:right" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-lr; direction:ltr">
+                <details style="text-align:right"><summary>summary</summary></details>
+                <details style="text-align:right" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-rl; direction:ltr">
+                <details style="text-align:right"><summary>summary</summary></details>
+                <details style="text-align:right" open><summary>summary</summary></details>
+            </div>
+        </td>
+    </tr>
+    <tr>
+        <th>rtl</th>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-tb; direction:rtl">
+                <details style="text-align:right"><summary>summary</summary></details>
+                <details style="text-align:right" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:horizontal-bt; direction:rtl">
+                <details style="text-align:right"><summary>summary</summary></details>
+                <details style="text-align:right" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-lr; direction:rtl">
+                <details style="text-align:right"><summary>summary</summary></details>
+                <details style="text-align:right" open><summary>summary</summary></details>
+            </div>
+        </td>
+        <td>
+            <div style="-webkit-writing-mode:vertical-rl; direction:rtl">
+                <details style="text-align:right"><summary>summary</summary></details>
+                <details style="text-align:right" open><summary>summary</summary></details>
+            </div>
+        </td>
+    </tr>
+</table>
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-1-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-1-and-click-expected.txt
new file mode 100644 (file)
index 0000000..dd0c803
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 0 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-1-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-1-expected.txt
new file mode 100644 (file)
index 0000000..2b28c7d
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-10-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-10-and-click-expected.txt
new file mode 100644 (file)
index 0000000..960acaf
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 1 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-10-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-10-expected.txt
new file mode 100644 (file)
index 0000000..6d82bb8
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x42
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderText {#text} at (0,0) size 64x21
+              text run at (0,0) width 64: "summary"
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-2-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-2-and-click-expected.txt
new file mode 100644 (file)
index 0000000..1267b33
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x42
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderText {#text} at (0,0) size 40x21
+              text run at (0,0) width 40: "new 2"
+caret: position 0 of child 0 {#text} of child 0 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-2-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-2-expected.txt
new file mode 100644 (file)
index 0000000..2b28c7d
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-3-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-3-and-click-expected.txt
new file mode 100644 (file)
index 0000000..7c1bfe7
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x42
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 2"
+        RenderBlock (anonymous) at (0,21) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderText {#text} at (0,0) size 40x21
+              text run at (0,0) width 40: "new 1"
+caret: position 0 of child 0 {#text} of child 0 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-3-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-3-expected.txt
new file mode 100644 (file)
index 0000000..4f60beb
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 2"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-4-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-4-and-click-expected.txt
new file mode 100644 (file)
index 0000000..56d02cc
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x42
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderText {#text} at (0,0) size 40x21
+              text run at (0,0) width 40: "new 1"
+caret: position 0 of child 0 {#text} of child 1 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-4-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-4-expected.txt
new file mode 100644 (file)
index 0000000..6d67755
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-5-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-5-and-click-expected.txt
new file mode 100644 (file)
index 0000000..1cdbf95
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x42
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderText {#text} at (0,0) size 64x21
+              text run at (0,0) width 64: "summary"
+caret: position 0 of child 0 {#text} of child 1 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-5-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-5-expected.txt
new file mode 100644 (file)
index 0000000..2b28c7d
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-6-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-6-and-click-expected.txt
new file mode 100644 (file)
index 0000000..ddb9e06
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 0 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-6-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-6-expected.txt
new file mode 100644 (file)
index 0000000..5c1e39b
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-7-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-7-and-click-expected.txt
new file mode 100644 (file)
index 0000000..ddb9e06
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 0 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-7-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-7-expected.txt
new file mode 100644 (file)
index 0000000..a94557b
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x42
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 1"
+        RenderBlock (anonymous) at (0,21) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderText {#text} at (0,0) size 40x21
+              text run at (0,0) width 40: "new 2"
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-8-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-8-and-click-expected.txt
new file mode 100644 (file)
index 0000000..cf5d093
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 2"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 0 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-8-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-8-expected.txt
new file mode 100644 (file)
index 0000000..87fc5f6
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x42
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 40x21
+              text run at (10,0) width 40: "new 2"
+        RenderBlock (anonymous) at (0,21) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderText {#text} at (0,0) size 40x21
+              text run at (0,0) width 40: "new 1"
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-9-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-9-and-click-expected.txt
new file mode 100644 (file)
index 0000000..08ec776
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 1 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-add-summary-9-expected.txt b/LayoutTests/platform/qt/fast/html/details-add-summary-9-expected.txt
new file mode 100644 (file)
index 0000000..b53621a
--- /dev/null
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x42
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderText {#text} at (0,0) size 40x21
+              text run at (0,0) width 40: "new 1"
diff --git a/LayoutTests/platform/qt/fast/html/details-no-summary1-expected.txt b/LayoutTests/platform/qt/fast/html/details-no-summary1-expected.txt
new file mode 100644 (file)
index 0000000..02750a1
--- /dev/null
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderBlock (anonymous) at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
diff --git a/LayoutTests/platform/qt/fast/html/details-no-summary2-expected.txt b/LayoutTests/platform/qt/fast/html/details-no-summary2-expected.txt
new file mode 100644 (file)
index 0000000..4f90bc9
--- /dev/null
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderBlock (anonymous) at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
diff --git a/LayoutTests/platform/qt/fast/html/details-no-summary3-expected.txt b/LayoutTests/platform/qt/fast/html/details-no-summary3-expected.txt
new file mode 100644 (file)
index 0000000..02750a1
--- /dev/null
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderBlock (anonymous) at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
diff --git a/LayoutTests/platform/qt/fast/html/details-no-summary4-expected.txt b/LayoutTests/platform/qt/fast/html/details-no-summary4-expected.txt
new file mode 100644 (file)
index 0000000..85e7e25
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x50
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderBlock (anonymous) at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
+        RenderBlock (anonymous) at (0,21) size 784x29
+          RenderTextControl {INPUT} at (2,2) size 166x25
+          RenderText {#text} at (0,0) size 0x0
+layer at (12,33) size 162x21
+  RenderBlock {DIV} at (2,2) size 162x21
diff --git a/LayoutTests/platform/qt/fast/html/details-open-javascript-expected.txt b/LayoutTests/platform/qt/fast/html/details-open-javascript-expected.txt
new file mode 100644 (file)
index 0000000..54dc4b3
--- /dev/null
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x50
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 51x21
+              text run at (10,0) width 51: "details1"
+        RenderBlock (anonymous) at (0,21) size 784x29
+          RenderTextControl {INPUT} at (2,2) size 166x25
+          RenderText {#text} at (0,0) size 0x0
+      RenderDetails {DETAILS} at (0,50) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 51x21
+              text run at (10,0) width 51: "details2"
+        RenderBlock (anonymous) at (0,21) size 784x0
+layer at (12,33) size 162x21
+  RenderBlock {DIV} at (2,2) size 162x21
diff --git a/LayoutTests/platform/qt/fast/html/details-open1-expected.txt b/LayoutTests/platform/qt/fast/html/details-open1-expected.txt
new file mode 100644 (file)
index 0000000..6d67755
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-open2-expected.txt b/LayoutTests/platform/qt/fast/html/details-open2-expected.txt
new file mode 100644 (file)
index 0000000..989647e
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x50
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 784x29
+          RenderTextControl {INPUT} at (2,2) size 166x25
+          RenderText {#text} at (0,0) size 0x0
+layer at (12,33) size 162x21
+  RenderBlock {DIV} at (2,2) size 162x21
diff --git a/LayoutTests/platform/qt/fast/html/details-open3-expected.txt b/LayoutTests/platform/qt/fast/html/details-open3-expected.txt
new file mode 100644 (file)
index 0000000..6d67755
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-open4-expected.txt b/LayoutTests/platform/qt/fast/html/details-open4-expected.txt
new file mode 100644 (file)
index 0000000..989647e
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x50
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 784x29
+          RenderTextControl {INPUT} at (2,2) size 166x25
+          RenderText {#text} at (0,0) size 0x0
+layer at (12,33) size 162x21
+  RenderBlock {DIV} at (2,2) size 162x21
diff --git a/LayoutTests/platform/qt/fast/html/details-open5-expected.txt b/LayoutTests/platform/qt/fast/html/details-open5-expected.txt
new file mode 100644 (file)
index 0000000..6d67755
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-open6-expected.txt b/LayoutTests/platform/qt/fast/html/details-open6-expected.txt
new file mode 100644 (file)
index 0000000..6ab54c6
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 64x21
+              text run at (10,0) width 64: "summary"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-position-expected.txt b/LayoutTests/platform/qt/fast/html/details-position-expected.txt
new file mode 100644 (file)
index 0000000..0903698
--- /dev/null
@@ -0,0 +1,35 @@
+layer at (0,0) size 942x584
+  RenderView at (0,0) size 800x584
+layer at (0,0) size 800x584
+  RenderBlock {HTML} at (0,0) size 800x584
+    RenderBody {BODY} at (8,8) size 784x568
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderBlock (anonymous) at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
+        RenderBlock (anonymous) at (0,21) size 784x0
+      RenderDetails {DETAILS} at (0,21) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,21) size 784x0
+      RenderDetails {DETAILS} at (0,42) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderBlock (anonymous) at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
+        RenderBlock (anonymous) at (0,21) size 784x0
+layer at (50,150) size 33x21
+  RenderSummary {SUMMARY} at (50,150) size 33x21
+    RenderText {#text} at (0,0) size 33x21
+      text run at (0,0) width 33: "fixed"
+layer at (158,179) size 784x21
+  RenderSummary {SUMMARY} at (0,0) size 784x21
+    RenderDetailsMarker at (0,0) size 10x21: right
+    RenderText {#text} at (10,0) size 50x21
+      text run at (10,0) width 50: "relative"
+layer at (250,150) size 56x21
+  RenderSummary {SUMMARY} at (250,150) size 56x21
+    RenderText {#text} at (0,0) size 56x21
+      text run at (0,0) width 56: "absolute"
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-1-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-1-and-click-expected.txt
new file mode 100644 (file)
index 0000000..00c976a
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderBlock (anonymous) at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
+caret: position 0 of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-1-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-1-expected.txt
new file mode 100644 (file)
index 0000000..2210606
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderBlock (anonymous) at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-2-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-2-and-click-expected.txt
new file mode 100644 (file)
index 0000000..7f0c767
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 76x21
+              text run at (10,0) width 76: "summary 2"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 2 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-2-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-2-expected.txt
new file mode 100644 (file)
index 0000000..42c8c52
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 76x21
+              text run at (10,0) width 76: "summary 2"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-3-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-3-and-click-expected.txt
new file mode 100644 (file)
index 0000000..702ab85
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 76x21
+              text run at (10,0) width 76: "summary 1"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 1 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-3-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-3-expected.txt
new file mode 100644 (file)
index 0000000..dfb6890
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 76x21
+              text run at (10,0) width 76: "summary 1"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-4-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-4-and-click-expected.txt
new file mode 100644 (file)
index 0000000..f5e3e4b
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderBlock (anonymous) at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
+caret: position 0 of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-4-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-4-expected.txt
new file mode 100644 (file)
index 0000000..480a6a6
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderBlock (anonymous) at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText at (10,0) size 46x21
+              text run at (10,0) width 46: "Details"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-5-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-5-and-click-expected.txt
new file mode 100644 (file)
index 0000000..16845be
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 76x21
+              text run at (10,0) width 76: "summary 2"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 2 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-5-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-5-expected.txt
new file mode 100644 (file)
index 0000000..c814838
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 76x21
+              text run at (10,0) width 76: "summary 2"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-6-and-click-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-6-and-click-expected.txt
new file mode 100644 (file)
index 0000000..7db5785
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderDetails {DETAILS} at (0,0) size 800x21
+        RenderBlock (anonymous) at (0,0) size 800x21
+          RenderSummary {SUMMARY} at (0,0) size 800x21
+            RenderDetailsMarker at (0,0) size 10x21: right
+            RenderText {#text} at (10,0) size 76x21
+              text run at (10,0) width 76: "summary 1"
+        RenderBlock (anonymous) at (0,21) size 800x0
+caret: position 0 of child 0 {#text} of child 1 {SUMMARY} of child 1 {DETAILS} of body
diff --git a/LayoutTests/platform/qt/fast/html/details-remove-summary-6-expected.txt b/LayoutTests/platform/qt/fast/html/details-remove-summary-6-expected.txt
new file mode 100644 (file)
index 0000000..4d21256
--- /dev/null
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderDetails {DETAILS} at (0,0) size 784x21
+        RenderBlock (anonymous) at (0,0) size 784x21
+          RenderSummary {SUMMARY} at (0,0) size 784x21
+            RenderDetailsMarker at (0,0) size 10x21: down
+            RenderText {#text} at (10,0) size 76x21
+              text run at (10,0) width 76: "summary 1"
+        RenderBlock (anonymous) at (0,21) size 784x0
diff --git a/LayoutTests/platform/qt/fast/html/details-writing-mode-expected.txt b/LayoutTests/platform/qt/fast/html/details-writing-mode-expected.txt
new file mode 100644 (file)
index 0000000..15db7cc
--- /dev/null
@@ -0,0 +1,671 @@
+layer at (0,0) size 784x1523
+  RenderView at (0,0) size 784x600
+layer at (0,0) size 784x1523
+  RenderBlock {HTML} at (0,0) size 784x1523
+    RenderBody {BODY} at (8,8) size 768x1507
+      RenderTable {TABLE} at (0,0) size 612x361 [border: (1px outset #808080)]
+        RenderTableSection {TBODY} at (1,1) size 610x359
+          RenderTableRow {TR} at (0,2) size 610x33
+            RenderTableCell {TH} at (2,2) size 606x33 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=6]
+              RenderText {#text} at (227,6) size 152x21
+                text run at (227,6) width 152: "text-align not specified"
+          RenderTableRow {TR} at (0,37) size 610x33
+            RenderTableCell {TH} at (2,54) size 102x33 [border: (1px inset #808080)] [r=1 c=0 rs=2 cs=2]
+              RenderText {#text} at (49,6) size 4x21
+                text run at (49,6) width 4: " "
+            RenderTableCell {TH} at (106,37) size 502x33 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=4]
+              RenderText {#text} at (177,6) size 148x21
+                text run at (177,6) width 148: "-webkit-writing-mode"
+          RenderTableRow {TR} at (0,72) size 610x33
+            RenderTableCell {TH} at (106,72) size 124x33 [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
+              RenderText {#text} at (18,6) size 88x21
+                text run at (18,6) width 88: "horizontal-tb"
+            RenderTableCell {TH} at (232,72) size 124x33 [border: (1px inset #808080)] [r=2 c=3 rs=1 cs=1]
+              RenderText {#text} at (18,6) size 88x21
+                text run at (18,6) width 88: "horizontal-bt"
+            RenderTableCell {TH} at (358,72) size 124x33 [border: (1px inset #808080)] [r=2 c=4 rs=1 cs=1]
+              RenderText {#text} at (29,6) size 66x21
+                text run at (29,6) width 66: "vertical-lr"
+            RenderTableCell {TH} at (484,72) size 124x33 [border: (1px inset #808080)] [r=2 c=5 rs=1 cs=1]
+              RenderText {#text} at (29,6) size 66x21
+                text run at (29,6) width 66: "vertical-rl"
+          RenderTableRow {TR} at (0,107) size 610x124
+            RenderTableCell {TH} at (2,215) size 72x33 [border: (1px inset #808080)] [r=3 c=0 rs=4 cs=1]
+              RenderText {#text} at (6,6) size 60x21
+                text run at (6,6) width 60: "direction"
+            RenderTableCell {TH} at (76,152) size 28x33 [border: (1px inset #808080)] [r=3 c=1 rs=1 cs=1]
+              RenderText {#text} at (6,6) size 16x21
+                text run at (6,6) width 16: "ltr"
+            RenderTableCell {TD} at (106,107) size 124x124 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (0,0) size 10x21: right
+                      RenderText {#text} at (10,0) size 64x21
+                        text run at (10,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (0,0) size 10x21: down
+                      RenderText {#text} at (10,0) size 64x21
+                        text run at (10,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (232,107) size 124x124 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (0,0) size 10x21: right
+                      RenderText {#text} at (10,0) size 64x21
+                        text run at (10,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (0,0) size 10x21: up
+                      RenderText {#text} at (10,0) size 64x21
+                        text run at (10,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (358,107) size 124x124 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,0) size 21x10: down
+                      RenderText {#text} at (0,10) size 21x64
+                        text run at (0,10) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,0) size 21x10: right
+                      RenderText {#text} at (0,10) size 21x64
+                        text run at (0,10) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+            RenderTableCell {TD} at (484,107) size 124x124 [border: (1px solid #000000)] [r=3 c=5 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,0) size 21x10: down
+                      RenderText {#text} at (0,10) size 21x64
+                        text run at (0,10) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,0) size 21x10: left
+                      RenderText {#text} at (0,10) size 21x64
+                        text run at (0,10) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+          RenderTableRow {TR} at (0,233) size 610x124
+            RenderTableCell {TH} at (76,278) size 28x33 [border: (1px inset #808080)] [r=4 c=1 rs=1 cs=1]
+              RenderText {#text} at (6,6) size 16x21
+                text run at (6,6) width 16: "rtl"
+            RenderTableCell {TD} at (106,233) size 124x124 [border: (1px solid #000000)] [r=4 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (110,0) size 10x21: left
+                      RenderText {#text} at (46,0) size 64x21
+                        text run at (46,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (110,0) size 10x21: down
+                      RenderText {#text} at (46,0) size 64x21
+                        text run at (46,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (232,233) size 124x124 [border: (1px solid #000000)] [r=4 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (110,0) size 10x21: left
+                      RenderText {#text} at (46,0) size 64x21
+                        text run at (46,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (110,0) size 10x21: up
+                      RenderText {#text} at (46,0) size 64x21
+                        text run at (46,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (358,233) size 124x124 [border: (1px solid #000000)] [r=4 c=4 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,110) size 21x10: up
+                      RenderText {#text} at (0,46) size 21x64
+                        text run at (0,46) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,110) size 21x10: right
+                      RenderText {#text} at (0,46) size 21x64
+                        text run at (0,46) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+            RenderTableCell {TD} at (484,233) size 124x124 [border: (1px solid #000000)] [r=4 c=5 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,110) size 21x10: up
+                      RenderText {#text} at (0,46) size 21x64
+                        text run at (0,46) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,110) size 21x10: left
+                      RenderText {#text} at (0,46) size 21x64
+                        text run at (0,46) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+      RenderBlock (anonymous) at (0,361) size 768x21
+        RenderBR {BR} at (0,0) size 0x21
+      RenderTable {TABLE} at (0,382) size 612x361 [border: (1px outset #808080)]
+        RenderTableSection {TBODY} at (1,1) size 610x359
+          RenderTableRow {TR} at (0,2) size 610x33
+            RenderTableCell {TH} at (2,2) size 606x33 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=6]
+              RenderText {#text} at (256,6) size 94x21
+                text run at (256,6) width 94: "text-align: left"
+          RenderTableRow {TR} at (0,37) size 610x33
+            RenderTableCell {TH} at (2,54) size 102x33 [border: (1px inset #808080)] [r=1 c=0 rs=2 cs=2]
+              RenderText {#text} at (49,6) size 4x21
+                text run at (49,6) width 4: " "
+            RenderTableCell {TH} at (106,37) size 502x33 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=4]
+              RenderText {#text} at (177,6) size 148x21
+                text run at (177,6) width 148: "-webkit-writing-mode"
+          RenderTableRow {TR} at (0,72) size 610x33
+            RenderTableCell {TH} at (106,72) size 124x33 [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
+              RenderText {#text} at (18,6) size 88x21
+                text run at (18,6) width 88: "horizontal-tb"
+            RenderTableCell {TH} at (232,72) size 124x33 [border: (1px inset #808080)] [r=2 c=3 rs=1 cs=1]
+              RenderText {#text} at (18,6) size 88x21
+                text run at (18,6) width 88: "horizontal-bt"
+            RenderTableCell {TH} at (358,72) size 124x33 [border: (1px inset #808080)] [r=2 c=4 rs=1 cs=1]
+              RenderText {#text} at (29,6) size 66x21
+                text run at (29,6) width 66: "vertical-lr"
+            RenderTableCell {TH} at (484,72) size 124x33 [border: (1px inset #808080)] [r=2 c=5 rs=1 cs=1]
+              RenderText {#text} at (29,6) size 66x21
+                text run at (29,6) width 66: "vertical-rl"
+          RenderTableRow {TR} at (0,107) size 610x124
+            RenderTableCell {TH} at (2,215) size 72x33 [border: (1px inset #808080)] [r=3 c=0 rs=4 cs=1]
+              RenderText {#text} at (6,6) size 60x21
+                text run at (6,6) width 60: "direction"
+            RenderTableCell {TH} at (76,152) size 28x33 [border: (1px inset #808080)] [r=3 c=1 rs=1 cs=1]
+              RenderText {#text} at (6,6) size 16x21
+                text run at (6,6) width 16: "ltr"
+            RenderTableCell {TD} at (106,107) size 124x124 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (0,0) size 10x21: right
+                      RenderText {#text} at (10,0) size 64x21
+                        text run at (10,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (0,0) size 10x21: down
+                      RenderText {#text} at (10,0) size 64x21
+                        text run at (10,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (232,107) size 124x124 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (0,0) size 10x21: right
+                      RenderText {#text} at (10,0) size 64x21
+                        text run at (10,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (0,0) size 10x21: up
+                      RenderText {#text} at (10,0) size 64x21
+                        text run at (10,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (358,107) size 124x124 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,0) size 21x10: down
+                      RenderText {#text} at (0,10) size 21x64
+                        text run at (0,10) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,0) size 21x10: right
+                      RenderText {#text} at (0,10) size 21x64
+                        text run at (0,10) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+            RenderTableCell {TD} at (484,107) size 124x124 [border: (1px solid #000000)] [r=3 c=5 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,0) size 21x10: down
+                      RenderText {#text} at (0,10) size 21x64
+                        text run at (0,10) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,0) size 21x10: left
+                      RenderText {#text} at (0,10) size 21x64
+                        text run at (0,10) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+          RenderTableRow {TR} at (0,233) size 610x124
+            RenderTableCell {TH} at (76,278) size 28x33 [border: (1px inset #808080)] [r=4 c=1 rs=1 cs=1]
+              RenderText {#text} at (6,6) size 16x21
+                text run at (6,6) width 16: "rtl"
+            RenderTableCell {TD} at (106,233) size 124x124 [border: (1px solid #000000)] [r=4 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (64,0) size 10x21: left
+                      RenderText {#text} at (0,0) size 64x21
+                        text run at (0,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (64,0) size 10x21: down
+                      RenderText {#text} at (0,0) size 64x21
+                        text run at (0,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (232,233) size 124x124 [border: (1px solid #000000)] [r=4 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (64,0) size 10x21: left
+                      RenderText {#text} at (0,0) size 64x21
+                        text run at (0,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (64,0) size 10x21: up
+                      RenderText {#text} at (0,0) size 64x21
+                        text run at (0,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (358,233) size 124x124 [border: (1px solid #000000)] [r=4 c=4 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,64) size 21x10: up
+                      RenderText {#text} at (0,0) size 21x64
+                        text run at (0,0) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,64) size 21x10: right
+                      RenderText {#text} at (0,0) size 21x64
+                        text run at (0,0) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+            RenderTableCell {TD} at (484,233) size 124x124 [border: (1px solid #000000)] [r=4 c=5 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,64) size 21x10: up
+                      RenderText {#text} at (0,0) size 21x64
+                        text run at (0,0) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,64) size 21x10: left
+                      RenderText {#text} at (0,0) size 21x64
+                        text run at (0,0) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+      RenderBlock (anonymous) at (0,743) size 768x21
+        RenderBR {BR} at (0,0) size 0x21
+      RenderTable {TABLE} at (0,764) size 612x361 [border: (1px outset #808080)]
+        RenderTableSection {TBODY} at (1,1) size 610x359
+          RenderTableRow {TR} at (0,2) size 610x33
+            RenderTableCell {TH} at (2,2) size 606x33 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=6]
+              RenderText {#text} at (246,6) size 114x21
+                text run at (246,6) width 114: "text-align: center"
+          RenderTableRow {TR} at (0,37) size 610x33
+            RenderTableCell {TH} at (2,54) size 102x33 [border: (1px inset #808080)] [r=1 c=0 rs=2 cs=2]
+              RenderText {#text} at (49,6) size 4x21
+                text run at (49,6) width 4: " "
+            RenderTableCell {TH} at (106,37) size 502x33 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=4]
+              RenderText {#text} at (177,6) size 148x21
+                text run at (177,6) width 148: "-webkit-writing-mode"
+          RenderTableRow {TR} at (0,72) size 610x33
+            RenderTableCell {TH} at (106,72) size 124x33 [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
+              RenderText {#text} at (18,6) size 88x21
+                text run at (18,6) width 88: "horizontal-tb"
+            RenderTableCell {TH} at (232,72) size 124x33 [border: (1px inset #808080)] [r=2 c=3 rs=1 cs=1]
+              RenderText {#text} at (18,6) size 88x21
+                text run at (18,6) width 88: "horizontal-bt"
+            RenderTableCell {TH} at (358,72) size 124x33 [border: (1px inset #808080)] [r=2 c=4 rs=1 cs=1]
+              RenderText {#text} at (29,6) size 66x21
+                text run at (29,6) width 66: "vertical-lr"
+            RenderTableCell {TH} at (484,72) size 124x33 [border: (1px inset #808080)] [r=2 c=5 rs=1 cs=1]
+              RenderText {#text} at (29,6) size 66x21
+                text run at (29,6) width 66: "vertical-rl"
+          RenderTableRow {TR} at (0,107) size 610x124
+            RenderTableCell {TH} at (2,215) size 72x33 [border: (1px inset #808080)] [r=3 c=0 rs=4 cs=1]
+              RenderText {#text} at (6,6) size 60x21
+                text run at (6,6) width 60: "direction"
+            RenderTableCell {TH} at (76,152) size 28x33 [border: (1px inset #808080)] [r=3 c=1 rs=1 cs=1]
+              RenderText {#text} at (6,6) size 16x21
+                text run at (6,6) width 16: "ltr"
+            RenderTableCell {TD} at (106,107) size 124x124 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (23,0) size 10x21: right
+                      RenderText {#text} at (33,0) size 64x21
+                        text run at (33,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (23,0) size 10x21: down
+                      RenderText {#text} at (33,0) size 64x21
+                        text run at (33,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (232,107) size 124x124 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (23,0) size 10x21: right
+                      RenderText {#text} at (33,0) size 64x21
+                        text run at (33,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (23,0) size 10x21: up
+                      RenderText {#text} at (33,0) size 64x21
+                        text run at (33,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (358,107) size 124x124 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,23) size 21x10: down
+                      RenderText {#text} at (0,33) size 21x64
+                        text run at (0,33) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,23) size 21x10: right
+                      RenderText {#text} at (0,33) size 21x64
+                        text run at (0,33) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+            RenderTableCell {TD} at (484,107) size 124x124 [border: (1px solid #000000)] [r=3 c=5 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,23) size 21x10: down
+                      RenderText {#text} at (0,33) size 21x64
+                        text run at (0,33) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,23) size 21x10: left
+                      RenderText {#text} at (0,33) size 21x64
+                        text run at (0,33) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+          RenderTableRow {TR} at (0,233) size 610x124
+            RenderTableCell {TH} at (76,278) size 28x33 [border: (1px inset #808080)] [r=4 c=1 rs=1 cs=1]
+              RenderText {#text} at (6,6) size 16x21
+                text run at (6,6) width 16: "rtl"
+            RenderTableCell {TD} at (106,233) size 124x124 [border: (1px solid #000000)] [r=4 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (87,0) size 10x21: left
+                      RenderText {#text} at (23,0) size 64x21
+                        text run at (23,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (87,0) size 10x21: down
+                      RenderText {#text} at (23,0) size 64x21
+                        text run at (23,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (232,233) size 124x124 [border: (1px solid #000000)] [r=4 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (87,0) size 10x21: left
+                      RenderText {#text} at (23,0) size 64x21
+                        text run at (23,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (87,0) size 10x21: up
+                      RenderText {#text} at (23,0) size 64x21
+                        text run at (23,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (358,233) size 124x124 [border: (1px solid #000000)] [r=4 c=4 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,87) size 21x10: up
+                      RenderText {#text} at (0,23) size 21x64
+                        text run at (0,23) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,87) size 21x10: right
+                      RenderText {#text} at (0,23) size 21x64
+                        text run at (0,23) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+            RenderTableCell {TD} at (484,233) size 124x124 [border: (1px solid #000000)] [r=4 c=5 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,87) size 21x10: up
+                      RenderText {#text} at (0,23) size 21x64
+                        text run at (0,23) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,87) size 21x10: left
+                      RenderText {#text} at (0,23) size 21x64
+                        text run at (0,23) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+      RenderBlock (anonymous) at (0,1125) size 768x21
+        RenderBR {BR} at (0,0) size 0x21
+      RenderTable {TABLE} at (0,1146) size 612x361 [border: (1px outset #808080)]
+        RenderTableSection {TBODY} at (1,1) size 610x359
+          RenderTableRow {TR} at (0,2) size 610x33
+            RenderTableCell {TH} at (2,2) size 606x33 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=6]
+              RenderText {#text} at (250,6) size 106x21
+                text run at (250,6) width 106: "text-align: right"
+          RenderTableRow {TR} at (0,37) size 610x33
+            RenderTableCell {TH} at (2,54) size 102x33 [border: (1px inset #808080)] [r=1 c=0 rs=2 cs=2]
+              RenderText {#text} at (49,6) size 4x21
+                text run at (49,6) width 4: " "
+            RenderTableCell {TH} at (106,37) size 502x33 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=4]
+              RenderText {#text} at (177,6) size 148x21
+                text run at (177,6) width 148: "-webkit-writing-mode"
+          RenderTableRow {TR} at (0,72) size 610x33
+            RenderTableCell {TH} at (106,72) size 124x33 [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
+              RenderText {#text} at (18,6) size 88x21
+                text run at (18,6) width 88: "horizontal-tb"
+            RenderTableCell {TH} at (232,72) size 124x33 [border: (1px inset #808080)] [r=2 c=3 rs=1 cs=1]
+              RenderText {#text} at (18,6) size 88x21
+                text run at (18,6) width 88: "horizontal-bt"
+            RenderTableCell {TH} at (358,72) size 124x33 [border: (1px inset #808080)] [r=2 c=4 rs=1 cs=1]
+              RenderText {#text} at (29,6) size 66x21
+                text run at (29,6) width 66: "vertical-lr"
+            RenderTableCell {TH} at (484,72) size 124x33 [border: (1px inset #808080)] [r=2 c=5 rs=1 cs=1]
+              RenderText {#text} at (29,6) size 66x21
+                text run at (29,6) width 66: "vertical-rl"
+          RenderTableRow {TR} at (0,107) size 610x124
+            RenderTableCell {TH} at (2,215) size 72x33 [border: (1px inset #808080)] [r=3 c=0 rs=4 cs=1]
+              RenderText {#text} at (6,6) size 60x21
+                text run at (6,6) width 60: "direction"
+            RenderTableCell {TH} at (76,152) size 28x33 [border: (1px inset #808080)] [r=3 c=1 rs=1 cs=1]
+              RenderText {#text} at (6,6) size 16x21
+                text run at (6,6) width 16: "ltr"
+            RenderTableCell {TD} at (106,107) size 124x124 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (46,0) size 10x21: right
+                      RenderText {#text} at (56,0) size 64x21
+                        text run at (56,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (46,0) size 10x21: down
+                      RenderText {#text} at (56,0) size 64x21
+                        text run at (56,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (232,107) size 124x124 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (46,0) size 10x21: right
+                      RenderText {#text} at (56,0) size 64x21
+                        text run at (56,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (46,0) size 10x21: up
+                      RenderText {#text} at (56,0) size 64x21
+                        text run at (56,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (358,107) size 124x124 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,46) size 21x10: down
+                      RenderText {#text} at (0,56) size 21x64
+                        text run at (0,56) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,46) size 21x10: right
+                      RenderText {#text} at (0,56) size 21x64
+                        text run at (0,56) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+            RenderTableCell {TD} at (484,107) size 124x124 [border: (1px solid #000000)] [r=3 c=5 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,46) size 21x10: down
+                      RenderText {#text} at (0,56) size 21x64
+                        text run at (0,56) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,46) size 21x10: left
+                      RenderText {#text} at (0,56) size 21x64
+                        text run at (0,56) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+          RenderTableRow {TR} at (0,233) size 610x124
+            RenderTableCell {TH} at (76,278) size 28x33 [border: (1px inset #808080)] [r=4 c=1 rs=1 cs=1]
+              RenderText {#text} at (6,6) size 16x21
+                text run at (6,6) width 16: "rtl"
+            RenderTableCell {TD} at (106,233) size 124x124 [border: (1px solid #000000)] [r=4 c=2 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (110,0) size 10x21: left
+                      RenderText {#text} at (46,0) size 64x21
+                        text run at (46,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (110,0) size 10x21: down
+                      RenderText {#text} at (46,0) size 64x21
+                        text run at (46,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (232,233) size 124x124 [border: (1px solid #000000)] [r=4 c=3 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (110,0) size 10x21: left
+                      RenderText {#text} at (46,0) size 64x21
+                        text run at (46,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+                RenderDetails {DETAILS} at (0,21) size 120x21
+                  RenderBlock (anonymous) at (0,0) size 120x21
+                    RenderSummary {SUMMARY} at (0,0) size 120x21
+                      RenderDetailsMarker at (110,0) size 10x21: up
+                      RenderText {#text} at (46,0) size 64x21
+                        text run at (46,0) width 64: "summary"
+                  RenderBlock (anonymous) at (0,21) size 120x0
+            RenderTableCell {TD} at (358,233) size 124x124 [border: (1px solid #000000)] [r=4 c=4 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,110) size 21x10: up
+                      RenderText {#text} at (0,46) size 21x64
+                        text run at (0,46) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,110) size 21x10: right
+                      RenderText {#text} at (0,46) size 21x64
+                        text run at (0,46) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+            RenderTableCell {TD} at (484,233) size 124x124 [border: (1px solid #000000)] [r=4 c=5 rs=1 cs=1]
+              RenderBlock {DIV} at (2,2) size 120x120
+                RenderDetails {DETAILS} at (0,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,110) size 21x10: up
+                      RenderText {#text} at (0,46) size 21x64
+                        text run at (0,46) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
+                RenderDetails {DETAILS} at (21,0) size 21x120
+                  RenderBlock (anonymous) at (0,0) size 21x120
+                    RenderSummary {SUMMARY} at (0,0) size 21x120
+                      RenderDetailsMarker at (0,110) size 21x10: left
+                      RenderText {#text} at (0,46) size 21x64
+                        text run at (0,46) width 64: "summary"
+                  RenderBlock (anonymous) at (21,0) size 0x120
index 5656b9d..ae7e263 100644 (file)
@@ -16,7 +16,7 @@ layer at (13,21) size 774x21
         RenderText {#text} at (0,0) size 107x21
           text run at (0,0) width 107: "Some inline text"
     RenderBlock (anonymous) at (0,21) size 379x21
-      RenderBlock {SUMMARY} at (0,0) size 379x21
+      RenderSummary {SUMMARY} at (0,0) size 379x21
         RenderText {#text} at (0,0) size 107x21
           text run at (0,0) width 107: "Some block text"
 layer at (13,111) size 774x126
index 7465c4f..ddf9274 100644 (file)
@@ -1,3 +1,147 @@
+2011-02-28  Luiz Agostini  <luiz.agostini@openbossa.org>
+
+        Reviewed by Dave Hyatt.
+
+        HTML5 <details> and <summary>: rendering
+        https://bugs.webkit.org/show_bug.cgi?id=51071
+
+        Tests: fast/html/details-add-summary-1-and-click.html
+               fast/html/details-add-summary-1.html
+               fast/html/details-add-summary-10-and-click.html
+               fast/html/details-add-summary-10.html
+               fast/html/details-add-summary-2-and-click.html
+               fast/html/details-add-summary-2.html
+               fast/html/details-add-summary-3-and-click.html
+               fast/html/details-add-summary-3.html
+               fast/html/details-add-summary-4-and-click.html
+               fast/html/details-add-summary-4.html
+               fast/html/details-add-summary-5-and-click.html
+               fast/html/details-add-summary-5.html
+               fast/html/details-add-summary-6-and-click.html
+               fast/html/details-add-summary-6.html
+               fast/html/details-add-summary-7-and-click.html
+               fast/html/details-add-summary-7.html
+               fast/html/details-add-summary-8-and-click.html
+               fast/html/details-add-summary-8.html
+               fast/html/details-add-summary-9-and-click.html
+               fast/html/details-add-summary-9.html
+               fast/html/details-mouse-click.html
+               fast/html/details-no-summary1.html
+               fast/html/details-no-summary2.html
+               fast/html/details-no-summary3.html
+               fast/html/details-no-summary4.html
+               fast/html/details-open-javascript.html
+               fast/html/details-open1.html
+               fast/html/details-open2.html
+               fast/html/details-open3.html
+               fast/html/details-open4.html
+               fast/html/details-open5.html
+               fast/html/details-open6.html
+               fast/html/details-position.html
+               fast/html/details-remove-summary-1-and-click.html
+               fast/html/details-remove-summary-1.html
+               fast/html/details-remove-summary-2-and-click.html
+               fast/html/details-remove-summary-2.html
+               fast/html/details-remove-summary-3-and-click.html
+               fast/html/details-remove-summary-3.html
+               fast/html/details-remove-summary-4-and-click.html
+               fast/html/details-remove-summary-4.html
+               fast/html/details-remove-summary-5-and-click.html
+               fast/html/details-remove-summary-5.html
+               fast/html/details-remove-summary-6-and-click.html
+               fast/html/details-remove-summary-6.html
+               fast/html/details-writing-mode.html
+
+        http://www.w3.org/TR/html5/interactive-elements.html#the-details-element
+
+        The main <summary> element is the first <summary> element of a <details> element.
+        All other childs of the <details> element are rendered only if the attribute 'open' is set.
+        Click event toggles the 'open' attribute.
+
+        * html/HTMLDetailsElement.cpp:
+        (WebCore::HTMLDetailsElement::HTMLDetailsElement):
+        (WebCore::HTMLDetailsElement::findMainSummary):
+        (WebCore::HTMLDetailsElement::childrenChanged):
+        (WebCore::HTMLDetailsElement::finishParsingChildren):
+        (WebCore::HTMLDetailsElement::parseMappedAttribute):
+        (WebCore::HTMLDetailsElement::childShouldCreateRenderer):
+        (WebCore::HTMLDetailsElement::defaultEventHandler):
+        * html/HTMLDetailsElement.h:
+        (WebCore::HTMLDetailsElement::mainSummary):
+
+        Method createRenderer added to class HTMLSummaryElement.
+
+        * html/HTMLSummaryElement.cpp:
+        (WebCore::HTMLSummaryElement::createRenderer):
+        * html/HTMLSummaryElement.h:
+
+        The first <summary> element is positioned at the top of its <details> parent.
+        The area occupied by this main <summary> element is the interactive area of the
+        <details> element. If the <details> tag has no <summary> child an OwnedSummaryRenderer
+        is created and added to the corresponding RenderDetails object.
+
+        * rendering/RenderDetails.cpp:
+        (WebCore::RenderDetails::RenderDetails):
+        (WebCore::RenderDetails::destroy):
+        (WebCore::RenderDetails::summaryBlock):
+        (WebCore::RenderDetails::contentBlock):
+        (WebCore::RenderDetails::addChild):
+        (WebCore::RenderDetails::removeChild):
+        (WebCore::RenderDetails::setMarkerStyle):
+        (WebCore::RenderDetails::styleDidChange):
+        (WebCore::RenderDetails::getRenderPosition):
+        (WebCore::RenderDetails::markerDestroyed):
+        (WebCore::RenderDetails::summaryDestroyed):
+        (WebCore::RenderDetails::moveSummaryToContents):
+        (WebCore::RenderDetails::createSummaryStyle):
+        (WebCore::RenderDetails::replaceMainSummary):
+        (WebCore::RenderDetails::createDefaultSummary):
+        (WebCore::RenderDetails::checkMainSummary):
+        (WebCore::RenderDetails::layout):
+        (WebCore::RenderDetails::isOpen):
+        (WebCore::RenderDetails::getParentOfFirstLineBox):
+        (WebCore::RenderDetails::firstNonMarkerChild):
+        (WebCore::RenderDetails::updateMarkerLocation):
+        * rendering/RenderDetails.h:
+        (WebCore::RenderDetails::interactiveArea):
+        (WebCore::RenderDetails::removeLeftoverAnonymousBlock):
+        (WebCore::RenderDetails::createsAnonymousWrapper):
+        (WebCore::RenderDetails::requiresForcedStyleRecalcPropagation):
+
+        A marker is added to the main <summary> element to indicate the current value of the 'open'
+        attribute of the <details> element.
+
+        * rendering/RenderDetailsMarker.cpp:
+        (WebCore::RenderDetailsMarker::RenderDetailsMarker):
+        (WebCore::RenderDetailsMarker::destroy):
+        (WebCore::RenderDetailsMarker::lineHeight):
+        (WebCore::RenderDetailsMarker::baselinePosition):
+        (WebCore::RenderDetailsMarker::computePreferredLogicalWidths):
+        (WebCore::RenderDetailsMarker::layout):
+        (WebCore::RenderDetailsMarker::getRelativeMarkerRect):
+        (WebCore::RenderDetailsMarker::isOpen):
+        (WebCore::createPath):
+        (WebCore::createDownArrowPath):
+        (WebCore::createUpArrowPath):
+        (WebCore::createLeftArrowPath):
+        (WebCore::createRightArrowPath):
+        (WebCore::RenderDetailsMarker::orientation):
+        (WebCore::RenderDetailsMarker::getCanonicalPath):
+        (WebCore::RenderDetailsMarker::getPath):
+        (WebCore::RenderDetailsMarker::paint):
+        * rendering/RenderDetailsMarker.h:
+        (WebCore::toRenderDetailsMarker):
+
+        * rendering/RenderSummary.cpp:
+        (WebCore::RenderSummary::RenderSummary):
+        (WebCore::RenderSummary::destroy):
+        (WebCore::RenderSummary::parentDetails):
+        (WebCore::RenderSummary::styleDidChange):
+        * rendering/RenderSummary.h:
+
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::RenderTreeAsText::writeRenderObject):
+
 2011-03-14  Brady Eidson  <beidson@apple.com>
 
         Reviewed by Sam Weinig.
index 0bcae0b..c428695 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #include "config.h"
 #include "HTMLDetailsElement.h"
 
+#include "Frame.h"
 #include "HTMLNames.h"
+#include "MouseEvent.h"
+#include "PlatformMouseEvent.h"
 #include "RenderDetails.h"
 
 namespace WebCore {
@@ -35,6 +38,8 @@ PassRefPtr<HTMLDetailsElement> HTMLDetailsElement::create(const QualifiedName& t
 
 HTMLDetailsElement::HTMLDetailsElement(const QualifiedName& tagName, Document* document)
     : HTMLElement(tagName, document)
+    , m_mainSummary(0)
+    , m_isOpen(false)
 {
     ASSERT(hasTagName(detailsTag));
 }
@@ -44,4 +49,88 @@ RenderObject* HTMLDetailsElement::createRenderer(RenderArena* arena, RenderStyle
     return new (arena) RenderDetails(this);
 }
 
+void HTMLDetailsElement::findMainSummary()
+{
+    m_mainSummary = 0;
+
+    for (Node* child = firstChild(); child; child = child->nextSibling()) {
+        if (child->hasTagName(summaryTag)) {
+            m_mainSummary = child;
+            break;
+        }
+    }
+}
+
+void HTMLDetailsElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
+{
+    HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    if (!changedByParser) {
+        Node* oldSummary = m_mainSummary;
+        findMainSummary();
+
+        if (oldSummary != m_mainSummary && !m_isOpen && attached()) {
+            if (oldSummary && oldSummary->attached())
+                oldSummary->detach();
+            if (m_mainSummary && childCountDelta < 0 && !m_mainSummary->renderer()) {
+                // If childCountDelta is less then zero and the main summary has changed it must be because previous main
+                // summary was removed. The new main summary was then inside the unrevealed content and needs to be
+                // reattached to create its renderer. If childCountDelta is not less then zero then a new <summary> element
+                // has been added and it will be attached without our help.
+                m_mainSummary->detach();
+                m_mainSummary->attach();
+            }
+        }
+    }
+}
+
+void HTMLDetailsElement::finishParsingChildren()
+{
+    HTMLElement::finishParsingChildren();
+    findMainSummary();
+    if (attached() && m_mainSummary && !m_mainSummary->renderer()) {
+        m_mainSummary->detach();
+        m_mainSummary->attach();
+    }
+}
+
+void HTMLDetailsElement::parseMappedAttribute(Attribute* attr)
+{
+    if (attr->name() == openAttr) {
+        bool oldValue = m_isOpen;
+        m_isOpen =  !attr->value().isNull();
+        if (attached() && oldValue != m_isOpen) {
+            detach();
+            attach();
+        }
+    } else
+        HTMLElement::parseMappedAttribute(attr);
+}
+
+bool HTMLDetailsElement::childShouldCreateRenderer(Node* child) const
+{
+    return m_isOpen || child == m_mainSummary;
+}
+
+void HTMLDetailsElement::defaultEventHandler(Event* event)
+{
+    HTMLElement::defaultEventHandler(event);
+
+    if (!renderer() || !renderer()->isDetails() || !event->isMouseEvent() || event->type() != eventNames().clickEvent || event->defaultHandled())
+        return;
+
+    MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
+    if (mouseEvent->button() != LeftButton)
+        return;
+
+    RenderDetails* renderDetails = static_cast<RenderDetails*>(renderer());
+
+    float factor = document() && document()->frame() ? document()->frame()->pageZoomFactor() : 1.0;
+    FloatPoint pos = renderDetails->absoluteToLocal(FloatPoint(mouseEvent->pageX() * factor, mouseEvent->pageY() * factor));
+
+    if (renderDetails->interactiveArea().contains(pos.x(), pos.y())) {
+        setAttribute(openAttr, m_isOpen ? String() : String(""));
+        event->setDefaultHandled();
+    }
+}
+
 }
index 16427ef..45a9035 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -28,11 +28,23 @@ namespace WebCore {
 class HTMLDetailsElement : public HTMLElement {
 public:
     static PassRefPtr<HTMLDetailsElement> create(const QualifiedName& tagName, Document* document);
+    Node* mainSummary() const { return m_mainSummary; }
 
 private:
     HTMLDetailsElement(const QualifiedName&, Document*);
 
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+    virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta);
+    virtual void finishParsingChildren();
+
+    void parseMappedAttribute(Attribute*);
+    bool childShouldCreateRenderer(Node*) const;
+    void defaultEventHandler(Event*);
+
+    void findMainSummary();
+
+    Node* m_mainSummary;
+    bool m_isOpen;
 
 };
 
index 96e3d74..9c2222a 100644 (file)
@@ -21,7 +21,9 @@
 #include "config.h"
 #include "HTMLSummaryElement.h"
 
+#include "HTMLDetailsElement.h"
 #include "HTMLNames.h"
+#include "RenderSummary.h"
 
 namespace WebCore {
 
@@ -38,4 +40,9 @@ HTMLSummaryElement::HTMLSummaryElement(const QualifiedName& tagName, Document* d
     ASSERT(hasTagName(summaryTag));
 }
 
+RenderObject* HTMLSummaryElement::createRenderer(RenderArena* arena, RenderStyle*)
+{
+    return new (arena) RenderSummary(this);
+}
+
 }
index 1b24c67..1a93ee9 100644 (file)
@@ -31,6 +31,8 @@ public:
 
 private:
     HTMLSummaryElement(const QualifiedName&, Document*);
+
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 };
 
 }
index a1039f9..8691727 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #include "config.h"
 #include "RenderDetails.h"
 
+#include "CSSStyleSelector.h"
+#include "HTMLDetailsElement.h"
+#include "HTMLNames.h"
+#include "LocalizedStrings.h"
+#include "RenderDetailsMarker.h"
+#include "RenderTextFragment.h"
+#include "RenderView.h"
+
 namespace WebCore {
 
-RenderDetails::RenderDetails(Node* element)
-    : RenderBlock(element)
+using namespace HTMLNames;
+
+RenderDetails::RenderDetails(Node* node)
+    : RenderBlock(node)
+    , m_summaryBlock(0)
+    , m_contentBlock(0)
+    , m_defaultSummaryBlock(0)
+    , m_defaultSummaryText(0)
+    , m_marker(0)
+    , m_mainSummary(0)
+{
+}
+
+void RenderDetails::destroy()
+{
+    if (m_marker)
+        m_marker->destroy();
+
+    RenderBlock::destroy();
+}
+
+RenderBlock* RenderDetails::summaryBlock()
+{
+    if (!m_summaryBlock) {
+        m_summaryBlock = createAnonymousBlock();
+        RenderBlock::addChild(m_summaryBlock, m_contentBlock);
+    }
+    return m_summaryBlock;
+}
+
+RenderBlock* RenderDetails::contentBlock()
+{
+    if (!m_contentBlock) {
+        m_contentBlock = createAnonymousBlock();
+        RenderBlock::addChild(m_contentBlock);
+    }
+    return m_contentBlock;
+}
+
+void RenderDetails::addChild(RenderObject* newChild, RenderObject* beforeChild)
+{
+    if (beforeChild && beforeChild == m_mainSummary)
+        beforeChild = getRenderPosition(m_mainSummary);
+    contentBlock()->addChild(newChild, beforeChild);
+}
+
+void RenderDetails::removeChild(RenderObject* oldChild)
+{
+    if (oldChild == m_summaryBlock || oldChild == m_contentBlock) {
+        RenderBlock::removeChild(oldChild);
+        m_summaryBlock = 0;
+        return;
+    }
+
+    if (oldChild == m_mainSummary) {
+        m_summaryBlock->removeChild(m_mainSummary);
+        return;
+    }
+
+    if (m_contentBlock) {
+        m_contentBlock->removeChild(oldChild);
+        return;
+    }
+
+    ASSERT_NOT_REACHED();
+}
+
+void RenderDetails::setMarkerStyle()
 {
+    if (m_marker) {
+        RefPtr<RenderStyle> markerStyle = RenderStyle::create();
+        markerStyle->inheritFrom(style());
+        m_marker->setStyle(markerStyle.release());
+    }
 }
 
 void RenderDetails::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
 {
     RenderBlock::styleDidChange(diff, oldStyle);
 
+    if (m_defaultSummaryBlock) {
+        m_defaultSummaryBlock->setStyle(createSummaryStyle());
+        m_defaultSummaryText->setStyle(m_defaultSummaryBlock->style());
+    }
+
+    setMarkerStyle();
+
     // Ensure that if we ended up being inline that we set our replaced flag
     // so that we're treated like an inline-block.
     setReplaced(isInline());
 }
 
+RenderObject* RenderDetails::getRenderPosition(RenderObject* object)
+{
+    if (!object || !object->node())
+        return 0;
+
+    Node* element = object->node()->nextSibling();
+
+    while (element && !element->renderer())
+        element = element->nextSibling();
+
+    return element ? element->renderer() : 0;
+}
+
+void RenderDetails::markerDestroyed()
+{
+    m_marker = 0;
+}
+
+void RenderDetails::summaryDestroyed(RenderObject* summary)
+{
+    if (summary == m_mainSummary)
+        m_mainSummary = 0;
 }
+
+void RenderDetails::moveSummaryToContents()
+{
+    if (m_defaultSummaryBlock) {
+        ASSERT(!m_mainSummary);
+        m_defaultSummaryBlock->destroy();
+        m_defaultSummaryBlock = 0;
+        m_defaultSummaryText = 0;
+        return;
+    }
+
+    if (!m_mainSummary)
+        return;
+
+    m_mainSummary->remove();
+    contentBlock()->addChild(m_mainSummary, getRenderPosition(m_mainSummary));
+    m_mainSummary = 0;
+}
+
+PassRefPtr<RenderStyle> RenderDetails::createSummaryStyle()
+{
+    RefPtr<HTMLElement> summary(HTMLElement::create(summaryTag, document()));
+    return document()->styleSelector()->styleForElement(summary.get(), style(), true);
+}
+
+void RenderDetails::replaceMainSummary(RenderObject* newSummary)
+{
+    ASSERT(newSummary);
+    if (m_mainSummary == newSummary)
+        return;
+
+    moveSummaryToContents();
+    newSummary->remove();
+    summaryBlock()->addChild(newSummary);
+    m_mainSummary = newSummary;
+}
+
+void RenderDetails::createDefaultSummary()
+{
+    if (m_defaultSummaryBlock)
+        return;
+
+    moveSummaryToContents();
+
+    m_defaultSummaryBlock = summaryBlock()->createAnonymousBlock();
+    m_defaultSummaryBlock->setStyle(createSummaryStyle());
+
+    m_defaultSummaryText = new (renderArena()) RenderTextFragment(document(), defaultDetailsSummaryText().impl());
+    m_defaultSummaryText->setStyle(m_defaultSummaryBlock->style());
+    m_defaultSummaryBlock->addChild(m_defaultSummaryText);
+
+    summaryBlock()->addChild(m_defaultSummaryBlock);
+}
+
+void RenderDetails::checkMainSummary()
+{
+    if (!node() || !node()->hasTagName(detailsTag))
+        return;
+
+    Node* mainSummaryNode = static_cast<HTMLDetailsElement*>(node())->mainSummary();
+
+    if (!mainSummaryNode || !mainSummaryNode->renderer() || mainSummaryNode->renderer()->isFloatingOrPositioned())
+        createDefaultSummary();
+    else
+        replaceMainSummary(mainSummaryNode->renderer());
+
+}
+
+void RenderDetails::layout()
+{
+    ASSERT(needsLayout());
+
+    checkMainSummary();
+    ASSERT(m_summaryBlock);
+
+    if (!m_marker) {
+        m_marker = new (renderArena()) RenderDetailsMarker(this);
+        setMarkerStyle();
+    }
+    updateMarkerLocation();
+
+    RenderBlock::layout();
+
+    m_interactiveArea = m_summaryBlock->frameRect();
+
+    // FIXME: the following code will not be needed once absoluteToLocal get patched to handle flipped blocks writing modes.
+    switch (style()->writingMode()) {
+    case TopToBottomWritingMode:
+    case LeftToRightWritingMode:
+        break;
+    case RightToLeftWritingMode: {
+        m_interactiveArea.setX(width() - m_interactiveArea.x() - m_interactiveArea.width());
+        break;
+    }
+    case BottomToTopWritingMode: {
+        m_interactiveArea.setY(height() - m_interactiveArea.y() - m_interactiveArea.height());
+        break;
+    }
+    }
+}
+
+bool RenderDetails::isOpen() const
+{
+    return node() && node()->isElementNode() ? !static_cast<Element*>(node())->getAttribute(openAttr).isNull() : false;
+}
+
+RenderObject* RenderDetails::getParentOfFirstLineBox(RenderBlock* curr)
+{
+    RenderObject* firstChild = curr->firstChild();
+    if (!firstChild)
+        return 0;
+
+    for (RenderObject* currChild = firstChild; currChild; currChild = currChild->nextSibling()) {
+        if (currChild == m_marker)
+            continue;
+
+        if (currChild->isInline() && (!currChild->isRenderInline() || curr->generatesLineBoxesForInlineChild(currChild)))
+            return curr;
+
+        if (currChild->isFloating() || currChild->isPositioned())
+            continue;
+
+        if (currChild->isTable() || !currChild->isRenderBlock() || (currChild->isBox() && toRenderBox(currChild)->isWritingModeRoot()))
+            break;
+
+        if (currChild->isDetails())
+            break;
+
+        RenderObject* lineBox = getParentOfFirstLineBox(toRenderBlock(currChild));
+        if (lineBox)
+            return lineBox;
+    }
+
+    return 0;
+}
+
+RenderObject* RenderDetails::firstNonMarkerChild(RenderObject* parent)
+{
+    RenderObject* result = parent->firstChild();
+    while (result && result->isDetailsMarker())
+        result = result->nextSibling();
+    return result;
+}
+
+void RenderDetails::updateMarkerLocation()
+{
+    // Sanity check the location of our marker.
+    if (m_marker) {
+        RenderObject* markerPar = m_marker->parent();
+        RenderObject* lineBoxParent = getParentOfFirstLineBox(m_summaryBlock);
+        if (!lineBoxParent) {
+            // If the marker is currently contained inside an anonymous box,
+            // then we are the only item in that anonymous box (since no line box
+            // parent was found). It's ok to just leave the marker where it is
+            // in this case.
+            if (markerPar && markerPar->isAnonymousBlock())
+                lineBoxParent = markerPar;
+            else
+                lineBoxParent = m_summaryBlock;
+        }
+
+        if (markerPar != lineBoxParent || m_marker->preferredLogicalWidthsDirty()) {
+            // Removing and adding the marker can trigger repainting in
+            // containers other than ourselves, so we need to disable LayoutState.
+            view()->disableLayoutState();
+            m_marker->remove();
+            if (!lineBoxParent)
+                lineBoxParent = m_summaryBlock;
+            lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent));
+
+            if (m_marker->preferredLogicalWidthsDirty())
+                m_marker->computePreferredLogicalWidths();
+
+            view()->enableLayoutState();
+        }
+    }
+}
+
+} // namespace WebCore
+
index b8aebab..0b56c13 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #ifndef RenderDetails_h
 #define RenderDetails_h
 
-#include "RenderBlock.h"
+#include "RenderFlexibleBox.h"
+#include "Timer.h"
+#include <wtf/OwnPtr.h>
 
 namespace WebCore {
 
+class RenderDetailsMarker;
+
 class RenderDetails : public RenderBlock {
 public:
     explicit RenderDetails(Node*);
 
-private:
     virtual const char* renderName() const { return "RenderDetails"; }
     virtual bool isDetails() const { return true; }
+
+    bool isOpen() const;
+    IntRect interactiveArea() const { return m_interactiveArea; }
+    void markerDestroyed();
+    void summaryDestroyed(RenderObject*);
+
+private:
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
+
+    virtual void addChild(RenderObject* newChild, RenderObject *beforeChild = 0);
+    virtual void removeChild(RenderObject*);
+    virtual void removeLeftoverAnonymousBlock(RenderBlock*) { }
+    virtual bool createsAnonymousWrapper() const { return true; }
+
+    virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
+
+    virtual void layout();
+    virtual void destroy();
+
+    void createDefaultSummary();
+    void replaceMainSummary(RenderObject*);
+    void moveSummaryToContents();
+    void checkMainSummary();
+    RenderObject* getRenderPosition(RenderObject*);
+    PassRefPtr<RenderStyle> createSummaryStyle();
+    void setMarkerStyle();
+
+    RenderBlock* summaryBlock();
+    RenderBlock* contentBlock();
+
+    RenderObject* getParentOfFirstLineBox(RenderBlock* curr);
+    RenderObject* firstNonMarkerChild(RenderObject* parent);
+    void updateMarkerLocation();
+
+    RenderBlock* m_summaryBlock;
+    RenderBlock* m_contentBlock;
+
+    RenderObject* m_defaultSummaryBlock;
+    RenderObject* m_defaultSummaryText;
+
+    IntRect m_interactiveArea;
+
+    RenderDetailsMarker* m_marker;
+
+    RenderObject* m_mainSummary;
 };
 
 inline RenderDetails* toRenderDetails(RenderObject* object)
@@ -44,6 +91,6 @@ inline RenderDetails* toRenderDetails(RenderObject* object)
 // This will catch anyone doing an unnecessary cast.
 void toRenderDetails(const RenderDetails*);
 
-}
+} // namespace WebCore
 
 #endif // RenderDetails_h
index 26e49d9..c366a78 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #include "config.h"
 #include "RenderDetailsMarker.h"
 
+#include "GraphicsContext.h"
+#include "HTMLNames.h"
+#include "PaintInfo.h"
+#include "RenderDetails.h"
+#include "RenderSummary.h"
+
 namespace WebCore {
 
-RenderDetailsMarker::RenderDetailsMarker(Node* element)
-    : RenderBlock(element)
+using namespace HTMLNames;
+
+RenderDetailsMarker::RenderDetailsMarker(RenderDetails* item)
+    : RenderBox(item->document())
+    , m_details(item)
+{
+    setInline(true);
+    setReplaced(true);
+}
+
+void RenderDetailsMarker::destroy()
+{
+    if (m_details)
+        m_details->markerDestroyed();
+
+    RenderBox::destroy();
+}
+
+int RenderDetailsMarker::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode) const
+{
+    return m_details->lineHeight(firstLine, direction, PositionOfInteriorLineBoxes);
+}
+
+int RenderDetailsMarker::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode) const
+{
+    return m_details->baselinePosition(baselineType, firstLine, direction, PositionOfInteriorLineBoxes);
+}
+
+void RenderDetailsMarker::computePreferredLogicalWidths()
+{
+    ASSERT(preferredLogicalWidthsDirty());
+
+    m_minPreferredLogicalWidth = 2 * style()->fontMetrics().ascent() / 3;
+    m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth;
+
+    setPreferredLogicalWidthsDirty(false);
+}
+
+void RenderDetailsMarker::layout()
+{
+    ASSERT(needsLayout());
+
+    setLogicalWidth(minPreferredLogicalWidth());
+    setLogicalHeight(style()->fontMetrics().height());
+
+    setMarginStart(0);
+    setMarginEnd(style()->fontMetrics().ascent() - minPreferredLogicalWidth() + 1);
+
+    setNeedsLayout(false);
+}
+
+IntRect RenderDetailsMarker::getRelativeMarkerRect() const
+{
+    IntRect relativeRect;
+
+    int bulletWidth = minPreferredLogicalWidth();
+    relativeRect = IntRect((logicalWidth() - bulletWidth) / 2, (logicalHeight() - bulletWidth) / 2, bulletWidth, bulletWidth);
+
+    if (!style()->isHorizontalWritingMode()) {
+        relativeRect = relativeRect.transposedRect();
+        relativeRect.setX(width() - relativeRect.x() - relativeRect.width());
+    }
+
+    return relativeRect;
+}
+
+bool RenderDetailsMarker::isOpen() const
 {
+    return m_details && m_details->isOpen();
+}
+
+static Path createPath(const FloatPoint* path)
+{
+    Path result;
+    result.moveTo(FloatPoint(path[0].x(), path[0].y()));
+    for (int i = 1; i < 4; ++i)
+        result.addLineTo(FloatPoint(path[i].x(), path[i].y()));
+    return result;
+}
+
+static Path createDownArrowPath()
+{
+    FloatPoint points[4] = { FloatPoint(0.0, 0.07), FloatPoint(0.5, 0.93), FloatPoint(1.0, 0.07), FloatPoint(0.0, 0.07) };
+    return createPath(points);
+}
+
+static Path createUpArrowPath()
+{
+    FloatPoint points[4] = { FloatPoint(0.0, 0.93), FloatPoint(0.5, 0.07), FloatPoint(1.0, 0.93), FloatPoint(0.0, 0.93) };
+    return createPath(points);
+}
+
+static Path createLeftArrowPath()
+{
+    FloatPoint points[4] = { FloatPoint(1.0, 0.0), FloatPoint(0.14, 0.5), FloatPoint(1.0, 1.0), FloatPoint(1.0, 0.0) };
+    return createPath(points);
+}
+
+static Path createRightArrowPath()
+{
+    FloatPoint points[4] = { FloatPoint(0.0, 0.0), FloatPoint(0.86, 0.5), FloatPoint(0.0, 1.0), FloatPoint(0.0, 0.0) };
+    return createPath(points);
+}
+
+RenderDetailsMarker::Orientation RenderDetailsMarker::orientation() const
+{
+    switch (style()->writingMode()) {
+    case TopToBottomWritingMode:
+        if (style()->isLeftToRightDirection())
+            return isOpen() ? Down : Right;
+        return isOpen() ? Down : Left;
+    case RightToLeftWritingMode:
+        if (style()->isLeftToRightDirection())
+            return isOpen() ? Left : Down;
+        return isOpen() ? Left : Up;
+    case LeftToRightWritingMode:
+        if (style()->isLeftToRightDirection())
+            return isOpen() ? Right : Down;
+        return isOpen() ? Right : Up;
+    case BottomToTopWritingMode:
+        if (style()->isLeftToRightDirection())
+            return isOpen() ? Up : Right;
+        return isOpen() ? Up : Left;
+    }
+    return Right;
+}
+
+Path RenderDetailsMarker::getCanonicalPath() const
+{
+    switch (orientation()) {
+    case Left: return createLeftArrowPath();
+    case Right: return createRightArrowPath();
+    case Up: return createUpArrowPath();
+    case Down: return createDownArrowPath();
+    }
+
+    return Path();
+}
+
+Path RenderDetailsMarker::getPath(const IntPoint& origin) const
+{
+    IntRect rect = getRelativeMarkerRect();
+    Path result = getCanonicalPath();
+    result.transform(AffineTransform().scale(rect.width()));
+    result.translate(FloatSize(origin.x() + rect.x(), origin.y() + rect.y()));
+    return result;
+}
+
+void RenderDetailsMarker::paint(PaintInfo& paintInfo, int tx, int ty)
+{
+    if (paintInfo.phase != PaintPhaseForeground || style()->visibility() != VISIBLE)
+        return;
+
+    IntPoint boxOrigin(tx + x(), ty + y());
+    IntRect overflowRect(visualOverflowRect());
+    overflowRect.move(boxOrigin.x(), boxOrigin.y());
+    overflowRect.inflate(maximalOutlineSize(paintInfo.phase));
+
+    if (!paintInfo.rect.intersects(overflowRect))
+        return;
+
+    const Color color(style()->visitedDependentColor(CSSPropertyColor));
+    paintInfo.context->setStrokeColor(color, style()->colorSpace());
+    paintInfo.context->setStrokeStyle(SolidStroke);
+    paintInfo.context->setStrokeThickness(1.0f);
+    paintInfo.context->setFillColor(color, style()->colorSpace());
+
+    paintInfo.context->fillPath(getPath(boxOrigin));
 }
 
 }
index 08bdbd8..de8f60b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #ifndef RenderDetailsMarker_h
 #define RenderDetailsMarker_h
 
-#include "RenderBlock.h"
+#include "RenderBox.h"
 
 namespace WebCore {
 
-class RenderDetailsMarker : public RenderBlock {
+class RenderDetails;
+
+class RenderDetailsMarker : public RenderBox {
 public:
-    explicit RenderDetailsMarker(Node*);
+    RenderDetailsMarker(RenderDetails*);
+
+    enum Orientation { Up, Down, Left, Right };
+
+    Orientation orientation() const;
+
+    virtual void computePreferredLogicalWidths();
+    virtual void destroy();
 
 private:
     virtual const char* renderName() const { return "RenderDetailsMarker"; }
     virtual bool isDetailsMarker() const { return true; }
+    virtual void paint(PaintInfo&, int tx, int ty);
+    virtual void layout();
+    virtual int lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
+    virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
+
+    IntRect getRelativeMarkerRect() const;
+
+    bool isOpen() const;
+    Path getCanonicalPath() const;
+    Path getPath(const IntPoint& origin) const;
+
+    RenderDetails* m_details;
 };
 
 inline RenderDetailsMarker* toRenderDetailsMarker(RenderObject* object)
 {
-    ASSERT(!object || object->isDetails());
+    ASSERT(!object || object->isDetailsMarker());
     return static_cast<RenderDetailsMarker*>(object);
 }
 
+inline const RenderDetailsMarker* toRenderDetailsMarker(const RenderObject* object)
+{
+    ASSERT(!object || object->isDetailsMarker());
+    return static_cast<const RenderDetailsMarker*>(object);
+}
+
 // This will catch anyone doing an unnecessary cast.
 void toRenderDetailsMarker(const RenderDetailsMarker*);
 
index 8fccf66..cfde231 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #include "config.h"
 #include "RenderSummary.h"
 
+#include "RenderDetails.h"
+
 namespace WebCore {
 
-RenderSummary::RenderSummary(Node* element)
-    : RenderBlock(element)
+RenderSummary::RenderSummary(Node* node)
+    : RenderBlock(node)
+{
+}
+
+void RenderSummary::destroy()
+{
+    RenderDetails* details = parentDetails();
+    if (details)
+        details->summaryDestroyed(this);
+
+    RenderBlock::destroy();
+}
+
+RenderDetails* RenderSummary::parentDetails()
 {
+    RenderObject* obj = parent();
+    while (obj && !obj->isDetails())
+        obj = obj->parent();
+
+    return static_cast<RenderDetails*>(obj);
+}
+
+void RenderSummary::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
+{
+    RenderBlock::styleDidChange(diff, oldStyle);
+
+
+    // Ensure that if we ended up being inline that we set our replaced flag
+    // so that we're treated like an inline-block.
+    setReplaced(isInline());
 }
 
 }
index afc18fa..94850df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 
 namespace WebCore {
 
+class RenderDetails;
+
 class RenderSummary : public RenderBlock {
 public:
     explicit RenderSummary(Node*);
 
+    virtual void destroy();
+
 private:
     virtual const char* renderName() const { return "RenderSummary"; }
     virtual bool isSummary() const { return true; }
+    virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
+
+    RenderDetails* parentDetails();
 };
 
 inline RenderSummary* toRenderSummary(RenderObject* object)
index cd92201..734aff8 100644 (file)
@@ -35,6 +35,7 @@
 #include "InlineTextBox.h"
 #include "PrintContext.h"
 #include "RenderBR.h"
+#include "RenderDetailsMarker.h"
 #include "RenderFileUploadControl.h"
 #include "RenderInline.h"
 #include "RenderLayer.h"
@@ -372,6 +373,24 @@ void RenderTreeAsText::writeRenderObject(TextStream& ts, const RenderObject& o,
         ts << " [r=" << c.row() << " c=" << c.col() << " rs=" << c.rowSpan() << " cs=" << c.colSpan() << "]";
     }
 
+    if (o.isDetailsMarker()) {
+        ts << ": ";
+        switch (toRenderDetailsMarker(&o)->orientation()) {
+        case RenderDetailsMarker::Left:
+            ts << "left";
+            break;
+        case RenderDetailsMarker::Right:
+            ts << "right";
+            break;
+        case RenderDetailsMarker::Up:
+            ts << "up";
+            break;
+        case RenderDetailsMarker::Down:
+            ts << "down";
+            break;
+        }
+    }
+
     if (o.isListMarker()) {
         String text = toRenderListMarker(&o)->text();
         if (!text.isEmpty()) {