https://bugs.webkit.org/show_bug.cgi?id=47235
Reviewed by Dan Bernstein.
Make "lr" block-flow fieldsets work.
(1) Patched html.css rules for legends and fieldsets to use logical margins and padding.
(2) Converted just enough of computePreferredLogicalWidths to make basic examples work.
(3) Removed the extra border drawing code from fieldsets so that the "clip out the legend" approach
is now just always used. It's silly to keep the old border drawing code in (which has already gotten out
of sync with the base class) just to avoid a save/restore and some clipping.
(4) Modified the layout/painting routines to place the legend properly and to be able to draw it in
both the top and the left borders.
Added fast/blockflow/fieldsets.html
WebCore:
* css/html.css:
(legend):
(fieldset):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::determineLogicalLeftPositionForChild):
(WebCore::RenderBlock::setLogicalLeftForChild):
(WebCore::RenderBlock::setLogicalTopForChild):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::computePreferredLogicalWidths):
* rendering/RenderBlock.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::layoutLegend):
(WebCore::RenderFieldset::paintBoxDecorations):
(WebCore::RenderFieldset::paintMask):
* rendering/RenderFieldset.h:
LayoutTests:
* fast/blockflow/fieldsets.html: Added.
* platform/mac/fast/blockflow/fieldsets-expected.checksum: Added.
* platform/mac/fast/blockflow/fieldsets-expected.png: Added.
* platform/mac/fast/blockflow/fieldsets-expected.txt: Added.
* platform/mac/fast/forms/fieldset-align-expected.checksum:
* platform/mac/fast/forms/fieldset-align-expected.png:
* platform/mac/fast/forms/fieldset-align-expected.txt:
git-svn-id: svn://svn.chromium.org/blink/trunk@69184 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index 5399c1c..02fa620 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -284,16 +284,19 @@
legend {
display: block;
- padding-left: 2px;
- padding-right: 2px;
+ -webkit-padding-start: 2px;
+ -webkit-padding-end: 2px;
border: none
}
fieldset {
display: block;
- margin-left: 2px;
- margin-right: 2px;
- padding: 0.35em 0.75em 0.625em;
+ -webkit-margin-start: 2px;
+ -webkit-margin-end: 2px;
+ -webkit-padding-before: 0.35em;
+ -webkit-padding-start: 0.75em;
+ -webkit-padding-end: 0.75em;
+ -webkit-padding-after: 0.625em;
border: 2px groove ThreeDFace
}