Closed
Bug 237159
Opened 20 years ago
Closed 20 years ago
{inc} fieldsets report too large maximumWidth.
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: tomas.creemers, Assigned: bernd_mozilla)
References
()
Details
(Keywords: testcase)
Attachments
(3 files, 1 obsolete file)
565 bytes,
text/html
|
Details | |
418 bytes,
text/html
|
Details | |
6.43 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040311 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040311 On http://lumumba.luc.ac.be/~nocturnal/testfacility/test.html , when pressing the update button, it moves. (no javascript involved) Reproducible: Always Steps to Reproduce: 1. Go to http://lumumba.luc.ac.be/~nocturnal/testfacility/test.html 2. Click the button. 3. Try to catch it. Actual Results: The button moved... Expected Results: Stay, button, STAY! On http://lumumba.luc.ac.be/~nocturnal/testfacility/test.html (which is a stripped down version of http://lumumba.luc.ac.be/~nocturnal/testfacility/gallery/?textmode=1 ) when I click the "update" form submit button, it moves to the left, while it should stay put. The button does get the "pressed in" look. Also, when I click the button and hold, and then move the mouse around, it moves even more (when not at the most left position) (this is more obvious at http://lumumba.luc.ac.be/~nocturnal/testfacility/gallery/?textmode=1 ) I use no javascript, and no CSS either on the testpage...
Assignee: events → nobody
Component: Event Handling → Layout
QA Contact: ian → core.layout
I seen this before in other bugs. I see this on LInux 2004041207
Component: Layout → Layout: Tables
OS: Windows XP → All
Summary: form button (and surrounding) moves when clicked → {inc}form button (and surrounding) moves when clicked
Comment 3•20 years ago
|
||
Another example of this bug: http://www.river-city-housing.org/ The submit button at the top moves when clicked. The page is valid 4.01 transitional. User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040914 Firefox/0.10.1
button 023A6B88 d=804,264 me=804 button 023A6B88 d=804,264 me=804 area 023A68D4 d=804,264 me=804 m=804 FieldSet(fieldset)(0) 023A6880 d=6984,523 me=1092 m=6984 the m value should be the same value as it reported as desired size during the unconstrained initial reflow (1092): button 023A6B88 d=804,264 me=804 area 023A68D4 d=804,264 me=804 FieldSet(fieldset)(0) 023A6880 d=1092,523 me=1092
Status: UNCONFIRMED → NEW
Component: Layout: Tables → Layout: Form Controls
Ever confirmed: true
QA Contact: core.layout.tables → core.layout.form-controls
Summary: {inc}form button (and surrounding) moves when clicked → {inc} fieldsets report too large maximumWidth.
http://lxr.mozilla.org/seamonkey/source/layout/html/forms/src/nsFieldSetFrame.cpp#601 is plain wrong 600 aDesiredSize.descent = 0; 601 aDesiredSize.mMaximumWidth = aDesiredSize.width; 602 if (aDesiredSize.mComputeMEW) { 603
Attachment #161184 -
Flags: superreview?(dbaron)
Attachment #161184 -
Flags: review?(dbaron)
Comment on attachment 161184 [details] [diff] [review] patch I think you should check if (aDesiredSize.mFlags & NS_REFLOW_CALC_MAX_WIDTH) before reading the child's mMaximumWidth, since otherwise you'll be reading uninitialized memory. Also, did you check that the inclusion of the legend is enough -- do you need to worry about any border/padding there?
Attachment #161184 -
Flags: superreview?(dbaron)
Attachment #161184 -
Flags: superreview-
Attachment #161184 -
Flags: review?(dbaron)
Attachment #161184 -
Flags: review-
Assignee | ||
Comment 10•20 years ago
|
||
I also removed that debug stuff, which is now completely handled by the frame reflow log (http://lxr.mozilla.org/seamonkey/source/layout/doc/frame_reflow_debug.html)
Attachment #161184 -
Attachment is obsolete: true
Attachment #161676 -
Flags: superreview?(dbaron)
Attachment #161676 -
Flags: review?(dbaron)
Comment on attachment 161676 [details] [diff] [review] revised patch >+ if (aDesiredSize.mFlags & NS_REFLOW_CALC_MAX_WIDTH) { >+ aDesiredSize.mMaximumWidth = PR_MAX(aDesiredSize.mMaxElementWidth, mLegendRect.width + >+ borderPadding.left + borderPadding.right); >+ } In the previous patch, this was a PR_MAX of aDesiredSize.mMaximumWidth and aDesiredSize.mMaxElementWidth. I think you replaced the wrong half with the legend expression. r+sr=dbaron if what you meant to do here was PR_MAX(aDesiredSize.mMaximumWidth, ...)
Attachment #161676 -
Flags: superreview?(dbaron)
Attachment #161676 -
Flags: superreview+
Attachment #161676 -
Flags: review?(dbaron)
Attachment #161676 -
Flags: review+
Assignee | ||
Comment 12•20 years ago
|
||
fix checked in
You need to log in
before you can comment on or make changes to this bug.
Description
•