Closed Bug 91057 Opened 24 years ago Closed 24 years ago

horizontal caption margins also added to right margin

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: fantasai.bugs, Assigned: bernd_mozilla)

Details

Attachments

(3 files)

Overview: Horizontal margins set on the table caption appear twice: once where they're supposed to be, and once again in the right margin. For example, specifying "margin: 50px" will result in a left margin of 50px and a right margin of 150px. Steps to Reproduce: Open up testcase in Mozilla Expected Results: The only margin on the right should be the one specified by CSS. Actual Results: Left and right margin values get added to the right margin. Tested on nightly build id=20707080 on Windows 98
Attached file testcase
Attached patch patchSplinter Review
steeling the bug
Status: NEW → ASSIGNED
mine
Assignee: karnaze → bernd.mielke
Status: ASSIGNED → NEW
Chris you have been right, the solution should go to nsHTMLReflowState.cpp. The problem is not as indicated that we take to margin from both sides, but that we substract the margin twice, so we end up with a to short caption. My first patch was a short circuit that disabled the first substraction, but we need to hold that because GetChildAvailableWidth also takes into account the minimum content width. There is only one testcase that indicates the right solution bug8411.xml, I was 100% sure that this testcase was created by hixie,( only a caption in a paragraph), but that is not the case. The patch passed the regression tests (it changes bug10140 (dbaron caption test) but in an expected way. The new patch gives a better symmetry between inner table and caption frame.
r=karnaze
sr=waterson
patch checked in
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: