Closed Bug 302959 Opened 19 years ago Closed 19 years ago

If the a element in the legend element got focus, the ancestor table width is broken

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: masayuki, Assigned: masayuki)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 4 obsolete files)

testcase:
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2871&action=view

See testcase, and set focus to anchor element in legend element.
The ancestor table element(or td element) is shrunk to minimum fieldset elements
width.

This is not reproduced on Firefox 1.0.x.
Attached patch Patch rv1.0 (obsolete) — Splinter Review
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attachment #191212 - Flags: superreview?(dbaron)
Attachment #191212 - Flags: review?(dbaron)
Comment on attachment 191212 [details] [diff] [review]
Patch rv1.0

max-element-width is normally less than width (and never greater).  Since
fieldsets can vary in width, this patch is incorrect.
Attachment #191212 - Flags: superreview?(dbaron)
Attachment #191212 - Flags: superreview-
Attachment #191212 - Flags: review?(dbaron)
Attachment #191212 - Flags: review-
Also note that the testcase doesn't even have anything to do with
max-element-width (also known as minimum width).  It's a testcase for intrinsic
width, and the only reason this patch fixes anything is that there's a hack in
the table code to ensure that the intrinsic width is never less than the
max-element-width by increasing the intrinsic width.
Summary: If a element in legend element got focus, the ancestor table width is broken → If an element in legend element got focus, the ancestor table width is broken
Summary: If an element in legend element got focus, the ancestor table width is broken → If the a element in the legend element got focus, the ancestor table width is broken
Attached patch Patch rv2.0 (obsolete) — Splinter Review
Attachment #191212 - Attachment is obsolete: true
Attachment #191219 - Flags: superreview?(dbaron)
Attachment #191219 - Flags: review?(dbaron)
Comment on attachment 191219 [details] [diff] [review]
Patch rv2.0

What says contentRect is right?

I think you need something more like the old code, except that:
 * you need to ensure that you reflow both the legend and the contents when
NS_REFLOW_CALC_MAX_WIDTH is set
 * you need to consider the legend too
Attachment #191219 - Flags: superreview?(dbaron)
Attachment #191219 - Flags: superreview-
Attachment #191219 - Flags: review?(dbaron)
Attachment #191219 - Flags: review-
Attached patch Patch rv3.0 -u8pw (obsolete) — Splinter Review
Attachment #191219 - Attachment is obsolete: true
Attachment #191222 - Flags: superreview?(dbaron)
Attachment #191222 - Flags: review?(dbaron)
Attached patch Patch rv3.0 for check-in (obsolete) — Splinter Review
NS_REFLOW_CALC_MAX_WIDTH could be set with a reason other than incremental, I'd
think.
Attachment #191222 - Flags: superreview?(dbaron)
Attachment #191222 - Flags: superreview-
Attachment #191222 - Flags: review?(dbaron)
Attachment #191222 - Flags: review-
Attached patch Patch rv3.1Splinter Review
Attachment #191222 - Attachment is obsolete: true
Attachment #191223 - Attachment is obsolete: true
Attachment #191227 - Flags: superreview?(dbaron)
Attachment #191227 - Flags: review?(dbaron)
Attachment #191227 - Flags: superreview?(dbaron)
Attachment #191227 - Flags: superreview+
Attachment #191227 - Flags: review?(dbaron)
Attachment #191227 - Flags: review+
Comment on attachment 191227 [details] [diff] [review]
Patch rv3.1

Thank you, David!

The risk is low. This is regression from 1.0.x.
Attachment #191227 - Flags: approval1.8b4?
Target Milestone: --- → mozilla1.8beta4
Flags: blocking1.8b4?
Attachment #191227 - Flags: approval1.8b4? → approval1.8b4+
checked-in. Thank you.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Flags: blocking1.8b4?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: