Commit f3820f23 authored by darin's avatar darin

LayoutTests:

        Reviewed by Hyatt, tweaked by Mitz.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9122
          REGRESSION: Incorrect vertical position for text fields in a "display: table" block

        * fast/table/text-field-baseline-expected.checksum: Added.
        * fast/table/text-field-baseline-expected.png: Added.
        * fast/table/text-field-baseline-expected.txt: Added.
        * fast/table/text-field-baseline.html: Added.

WebCore:

        Reviewed by Hyatt.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9122
          REGRESSION: Incorrect vertical position for text fields in a "display: table" block

        Test: fast/table/text-field-baseline.html

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::baselinePosition): Do not descend into replaced objects, just
        use their baseline.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 627b1374
2006-06-07 Denis Defreyne <amonre@amonre.org>
Reviewed by Hyatt, tweaked by Mitz.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9122
REGRESSION: Incorrect vertical position for text fields in a "display: table" block
* fast/table/text-field-baseline-expected.checksum: Added.
* fast/table/text-field-baseline-expected.png: Added.
* fast/table/text-field-baseline-expected.txt: Added.
* fast/table/text-field-baseline.html: Added.
2006-06-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
d6bc6c3c22d530a84c2c8cb5c536d674
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x419
RenderBlock {HTML} at (0,0) size 800x419
RenderBody {BODY} at (8,16) size 784x387
RenderBlock {P} at (0,0) size 784x36
RenderText {#text} at (0,0) size 172x18
text run at (0,0) width 172: "This is a regression test for "
RenderInline {I} at (0,0) size 738x36
RenderInline {A} at (0,0) size 348x18 [color=#0000EE]
RenderText {#text} at (172,0) size 348x18
text run at (172,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=9122"
RenderText {#text} at (520,0) size 738x36
text run at (520,0) width 4: " "
text run at (524,0) width 214: "REGRESSION: Incorrect vertical"
text run at (0,18) width 304: "position for text fields in a \"display: table\" block"
RenderText {#text} at (304,18) size 4x18
text run at (304,18) width 4: "."
RenderBlock {P} at (0,52) size 784x36
RenderText {#text} at (0,0) size 745x36
text run at (0,0) width 745: "Type something in the text field. Resize the window. The text field should not jump down. Delete what you typed and"
text run at (0,18) width 320: "resize the window. The text field should not move."
RenderBlock {FORM} at (0,104) size 784x283
RenderTable {DL} at (0,0) size 177x23
RenderTableSection at (0,0) size 177x23
RenderTableRow {DIV} at (0,0) size 177x23
RenderTableCell {DT} at (0,2) size 25x18 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 25x18
text run at (0,0) width 25: "Foo"
RenderTableCell {DD} at (25,0) size 152x23 [r=0 c=1 rs=1 cs=1]
RenderTextField {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderBlock {HR} at (0,39) size 784x2 [border: (1px inset #000000)]
RenderBlock {P} at (0,57) size 784x36
RenderText {#text} at (0,0) size 781x36
text run at (0,0) width 781: "And here's more. There should not be a difference in distance between the labels, nor any difference in distance between the"
text run at (0,18) width 65: "text fields."
RenderTable {DL} at (0,109) size 234x174
RenderTableSection at (0,0) size 234x174
RenderTableRow {DIV} at (0,0) size 234x23
RenderTableCell {DT} at (0,2) size 25x18 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 25x18
text run at (0,0) width 25: "Foo"
RenderTableCell {DD} at (25,0) size 209x23 [r=0 c=1 rs=1 cs=1]
RenderTextField {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderTableRow {DIV} at (0,23) size 234x23
RenderTableCell {DT} at (0,25) size 25x18 [r=1 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 25x18
text run at (0,0) width 25: "Foo"
RenderTableCell {DD} at (25,23) size 209x23 [r=1 c=1 rs=1 cs=1]
RenderTextField {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderTableRow {DIV} at (0,46) size 234x23
RenderTableCell {DT} at (0,48) size 25x18 [r=2 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 25x18
text run at (0,0) width 25: "Foo"
RenderTableCell {DD} at (25,46) size 209x23 [r=2 c=1 rs=1 cs=1]
RenderTextField {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderTableRow {DIV} at (0,69) size 234x23
RenderTableCell {DT} at (0,71) size 25x18 [r=3 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 25x18
text run at (0,0) width 25: "Foo"
RenderTableCell {DD} at (25,69) size 209x23 [r=3 c=1 rs=1 cs=1]
RenderTextField {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderTableRow {DIV} at (0,92) size 234x23
RenderTableCell {DT} at (0,94) size 25x18 [r=4 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 25x18
text run at (0,0) width 25: "Foo"
RenderTableCell {DD} at (25,92) size 209x23 [r=4 c=1 rs=1 cs=1]
RenderTextField {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderTableRow {DIV} at (0,115) size 234x23
RenderTableCell {DT} at (0,117) size 25x18 [r=5 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 25x18
text run at (0,0) width 25: "Foo"
RenderTableCell {DD} at (25,115) size 209x23 [r=5 c=1 rs=1 cs=1]
RenderTextField {INPUT} at (2,2) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderTableRow {DIV} at (0,138) size 234x36
RenderTableCell {DT} at (0,156) size 25x18 [r=6 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 25x18
text run at (0,0) width 25: "Foo"
RenderTableCell {DD} at (25,138) size 209x36 [r=6 c=1 rs=1 cs=1]
RenderBlock {DIV} at (0,0) size 209x36
RenderBR {BR} at (0,0) size 0x18
RenderText {#text} at (0,18) size 209x18
text run at (0,18) width 209: "Bar (should be aligned with Foo)"
layer at (38,125) size 142x13
RenderBlock {DIV} at (3,3) size 142x13
layer at (38,234) size 142x13
RenderBlock {DIV} at (3,3) size 142x13
layer at (38,257) size 142x13
RenderBlock {DIV} at (3,3) size 142x13
layer at (38,280) size 142x13
RenderBlock {DIV} at (3,3) size 142x13
RenderText {#text} at (1,0) size 17x13
text run at (1,0) width 17: "Bar"
layer at (38,303) size 142x13
RenderBlock {DIV} at (3,3) size 142x13
RenderText {#text} at (1,0) size 17x13
text run at (1,0) width 17: "Bar"
layer at (38,326) size 142x13
RenderBlock {DIV} at (3,3) size 142x13
layer at (38,349) size 142x13
RenderBlock {DIV} at (3,3) size 142x13
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<style type="text/css">
dl {
display: table;
}
.dl-section {
display: table-row;
}
dl dt {
display: table-cell;
}
dl dd {
display: table-cell;
}
</style>
</head>
<body>
<p>This is a regression test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=9122">http://bugzilla.opendarwin.org/show_bug.cgi?id=9122</a>
REGRESSION: Incorrect vertical position for text fields in a "display: table" block</i>.
<p>Type something in the text field. Resize the window. The text field should not jump down. Delete what you typed and resize the window. The text field should not move.</p>
<form action="foo" method="get">
<dl>
<div class="dl-section">
<dt>Foo</dt>
<dd><input type="text" /></dd>
</div>
</dl>
<hr />
<p>And here's more. There should not be a difference in distance between the labels, nor any difference in distance between the text fields.</p>
<dl>
<div class="dl-section">
<dt>Foo</dt>
<dd><input type="text" /></dd>
</div>
<div class="dl-section">
<dt>Foo</dt>
<dd><input type="text" /></dd>
</div>
<div class="dl-section">
<dt>Foo</dt>
<dd><input type="text" value="Bar" /></dd>
</div>
<div class="dl-section">
<dt>Foo</dt>
<dd><input type="text" value="Bar" /></dd>
</div>
<div class="dl-section">
<dt>Foo</dt>
<dd><input type="text" /></dd>
</div>
<div class="dl-section">
<dt>Foo</dt>
<dd><input type="text" /></dd>
</div>
<div class="dl-section">
<dt>Foo</dt>
<dd><div style="display: inline-block;"><br>Bar (should be aligned with Foo)</div></dd>
</div>
</dl>
</form>
</body>
</html>
2006-06-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9122
REGRESSION: Incorrect vertical position for text fields in a "display: table" block
Test: fast/table/text-field-baseline.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::baselinePosition): Do not descend into replaced objects, just
use their baseline.
2006-06-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt (concept) and Darin (some coding details).
......
......@@ -149,7 +149,7 @@ short RenderTableCell::baselinePosition(bool) const
if (!o)
return offset + contentHeight();
while (o->firstChild()) {
while (o->firstChild() && !o->isReplaced()) {
if (!o->isInline())
offset += o->paddingTop() + o->borderTop();
o = o->firstChild();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment