Bug 17696 - form tag causing misalignment in footer
Summary: form tag causing misalignment in footer
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Robert Blaut
URL: http://www.vente-privee.com
Keywords: HasReduction
: 17784 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-06 11:55 PST by jasneet
Modified: 2008-03-17 14:50 PDT (History)
4 users (show)

See Also:


Attachments
screenshot (126.72 KB, image/jpeg)
2008-03-06 11:56 PST, jasneet
no flags Details
reduction (482 bytes, text/html)
2008-03-06 11:57 PST, jasneet
no flags Details
even reduced test case (133 bytes, text/html)
2008-03-11 16:16 PDT, Robert Blaut
no flags Details
patch for setting margin-bottom in quirk mode only (5.35 KB, patch)
2008-03-12 06:40 PDT, Robert Blaut
darin: review-
Details | Formatted Diff | Diff
my version of the patch (with slightly improved comment) (6.72 KB, patch)
2008-03-16 15:09 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
patch with darin comment and new text layout test results (without pixel and qt platform results) (74.96 KB, patch)
2008-03-17 06:03 PDT, Robert Blaut
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jasneet 2008-03-06 11:55:28 PST
I Steps:
Go to
http://www.vente-privee.com

II Issue:
The footer link is misaligned.

III Conclusion: Removing the form tag resolves the issue.

IV Other browsers:
IE7: ok
FF: ok
Opera: ok

V Nightly tested: 30628
Comment 1 jasneet 2008-03-06 11:56:03 PST
Created attachment 19572 [details]
screenshot
Comment 2 jasneet 2008-03-06 11:57:17 PST
Created attachment 19573 [details]
reduction
Comment 3 Robert Blaut 2008-03-11 16:11:12 PDT
*** Bug 17784 has been marked as a duplicate of this bug. ***
Comment 4 Robert Blaut 2008-03-11 16:16:22 PDT
Created attachment 19682 [details]
even reduced test case

The test case shows problem with default margin-bottom other than 0 for form tag. The same behavior is also visible in Opera 9.5 and Minefield but only if the form is loaded inside an iframe! The issue is not visible in Gecko if the test case is loaded in browser window.

Check this test case in Minefield: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cp%3EThere%20should%20be%20no%20red%20on%20the%20page%3C%2Fp%3E%3Cdiv%20%20style%3D%22background-color%3Ared%3B%20border%3A1px%20solid%22%3E%3Cform%3E%3C%2Fform%3E%3C%2Fdiv%3E%0A%0A

Click rendered view to compare both behaviors.
Comment 5 Robert Blaut 2008-03-11 16:46:23 PDT
html4.css contains such definition:

form {
    display: block;
    margin: 0__qem 0 1em 0
}

margin-bottom is set to 1em.

Is it fixable? If not, the bug should be classified as an evangelism bug. 

Comment 6 Robert Blaut 2008-03-12 00:35:11 PDT
Gecko allows margin-bottom: 1em in quirks mode only: https://bugzilla.mozilla.org/show_bug.cgi?id=41806 

I think we should consider the same behavior for Webkit.

BTW. It sad to say but Live DOM Viewer - the absolutely wonderful tool for debugging html/css code - has a sort of bug that makes Gecko to render the page in iframe on that page in quirks mode instead of standard mode, but it's of cause unrelated to the bug report.
Comment 7 Robert Blaut 2008-03-12 06:40:35 PDT
Created attachment 19697 [details]
patch for setting margin-bottom in quirk mode only

The patch is based on Gecko solution.
Comment 8 Darin Adler 2008-03-15 10:45:21 PDT
Comment on attachment 19697 [details]
patch for setting margin-bottom in quirk mode only

I think it's misleading that the quirks.css claims that the margin-bottom if a fix for bug 17696. The fix is to do the margin only in quirks mode, but the comma doesn't make that clear.

But the fix is otherwise great.

r=me
Comment 9 Robert Blaut 2008-03-15 12:42:41 PDT
(In reply to comment #8)
> (From update of attachment 19697 [details] [edit])
> I think it's misleading that the quirks.css claims that the margin-bottom if a
> fix for bug 17696. The fix is to do the margin only in quirks mode, but the
> comma doesn't make that clear.

Darin, would you be so kind to correct the comment in quirks.css file before landing?
Comment 10 Darin Adler 2008-03-16 15:07:13 PDT
Comment on attachment 19697 [details]
patch for setting margin-bottom in quirk mode only

When I applied this patch and ran regression tests to prepare to check in, 8 regression tests failed:

fast/block/margin-collapse/103.html
fast/frames/viewsource-empty-attribute-value.html
tables/mozilla/bugs/bug44505.html
tables/mozilla/bugs/bug51727.html
tables/mozilla/bugs/bug52505.html
tables/mozilla/bugs/bug52506.html
tables/mozilla_expected_failures/bugs/bug2479-2.html
tables/mozilla_expected_failures/bugs/bug56024.html

We'll need a new version of this patch that includes changes to the expected results for tests that we expect to change. Marking this review- until then.
Comment 11 Darin Adler 2008-03-16 15:09:01 PDT
Created attachment 19810 [details]
my version of the patch (with slightly improved comment)

This patch is not ready to land because of the 8 other regression tests affected by the change.
Comment 12 Robert Blaut 2008-03-16 15:35:15 PDT
(In reply to comment #11)
> Created an attachment (id=19810) [edit]
> my version of the patch (with slightly improved comment)
> 
> This patch is not ready to land because of the 8 other regression tests
> affected by the change.
> 

Text only results are no problem for me I can generated the new ones. But there are some tests with pixel results and also platform depended. So I ask for help for generating the new results for these tests.
Comment 13 Robert Blaut 2008-03-17 06:03:05 PDT
Created attachment 19833 [details]
patch with darin comment and new text layout test results (without pixel and qt platform results)

Darin, this patch contains new text layout results and deletes old pixel and qt results. I tried to regenerate new pixel results bug these tests are highly system settings depended. Almost all existing pixel layout tests fails on my machine. I also changed comment in quirks.css file.
Comment 14 Darin Adler 2008-03-17 11:02:56 PDT
Committed revision 31100.