Account for margin after when laying out <legend> element
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jun 2012 23:14:38 +0000 (23:14 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jun 2012 23:14:38 +0000 (23:14 +0000)
commitfbc07ea7cdfd018b77f5fe09bdc7ec6cece7098a
tree3aaff6142dde15b7452880d64ca68b6694277ec4
parentab6c67ab4182981582260444ed38c65bedb6f016
Account for margin after when laying out <legend> element
https://bugs.webkit.org/show_bug.cgi?id=35981

Reviewed by Abhishek Arya.

Source/WebCore:

Tests: fast/forms/legend-after-margin-horizontal-writing-mode.html
       fast/forms/legend-after-margin-vertical-writing-mode.html
       fast/forms/legend-after-margin-with-before-border-horizontal-mode.html
       fast/forms/legend-small-after-margin-before-border-horizontal-mode.html

The existing code would ignore margin after when layouting out the <legend>. This
change only adds the code to handle the margin after, the margin before is still
ignored as it's not obvious how it should be working.

* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::layoutSpecialExcludedChild):
Split the code in 2 code paths to reflect how we position and size. Those are covered by the
tests above.

LayoutTests:

* fast/forms/legend-after-margin-horizontal-writing-mode-expected.html: Added.
* fast/forms/legend-after-margin-horizontal-writing-mode.html: Added.
* fast/forms/legend-after-margin-vertical-writing-mode-expected.html: Added.
* fast/forms/legend-after-margin-vertical-writing-mode.html: Added.
* fast/forms/legend-after-margin-with-before-border-horizontal-mode-expected.html: Added.
* fast/forms/legend-after-margin-with-before-border-horizontal-mode.html: Added.
* fast/forms/legend-small-after-margin-before-border-horizontal-mode-expected.html: Added.
* fast/forms/legend-small-after-margin-before-border-horizontal-mode.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/legend-after-margin-horizontal-writing-mode-expected.html [new file with mode: 0644]
LayoutTests/fast/forms/legend-after-margin-horizontal-writing-mode.html [new file with mode: 0644]
LayoutTests/fast/forms/legend-after-margin-vertical-writing-mode-expected.html [new file with mode: 0644]
LayoutTests/fast/forms/legend-after-margin-vertical-writing-mode.html [new file with mode: 0644]
LayoutTests/fast/forms/legend-after-margin-with-before-border-horizontal-mode-expected.html [new file with mode: 0644]
LayoutTests/fast/forms/legend-after-margin-with-before-border-horizontal-mode.html [new file with mode: 0644]
LayoutTests/fast/forms/legend-small-after-margin-before-border-horizontal-mode-expected.html [new file with mode: 0644]
LayoutTests/fast/forms/legend-small-after-margin-before-border-horizontal-mode.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFieldset.cpp