Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 229654 - {inc}When a hover has a different bottom-border with, an "auto margin" grows with the hover trigger
: {inc}When a hover has a different bottom-border with, an "auto margin" grows ...
: testcase
Product: Core
Classification: Components
Component: Layout: Floats (show other bugs)
: Trunk
: x86 Linux
: P2 minor (vote)
: mozilla1.7alpha
Assigned To: David Baron :dbaron: ⌚️UTC-7
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
Depends on: 237366
  Show dependency treegraph
Reported: 2003-12-29 09:07 PST by Erich Schubert
Modified: 2004-04-06 09:40 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase (426 bytes, application/xhtml+xml)
2003-12-29 22:36 PST, Anne (:annevk)
no flags Details
possible patch (4.24 KB, patch)
2004-02-07 17:38 PST, David Baron :dbaron: ⌚️UTC-7
bzbarsky: review+
bzbarsky: superreview+
Details | Diff | Splinter Review
variant of simple testcase for what's broken (with display:block on root) (287 bytes, text/xml; charset=UTF-8)
2004-02-08 12:53 PST, David Baron :dbaron: ⌚️UTC-7
no flags Details
simple testcase for what's broken (181 bytes, text/xml; charset=UTF-8)
2004-02-08 12:55 PST, David Baron :dbaron: ⌚️UTC-7
no flags Details

Description Erich Schubert 2003-12-29 09:07:04 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Galeon/1.3.11a (Debian package 1.3.11a-1)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 (Galeon, Firebird both show it)

The page consists of a <div> floated left (so it hasn't a width specified but is
not 100% either). Inside the <div> there is another div with an "auto" margin.
When the mouse triggers the hover effect of a link which only changes the
border-bottom width, the auto margin grows.

Reproducible: Always

Steps to Reproduce:
1. On the page, move the mouse over the link
2. repeat

Actual Results:  
the box grew needless upon displaying the hover effect and doesn't shrink back
afterwards. Repeatedly triggering the hover will make the box grow further.

Expected Results:  
No change in box width.
Comment 1 Anne (:annevk) 2003-12-29 22:36:51 PST
Created attachment 138148 [details]
Comment 2 David Baron :dbaron: ⌚️UTC-7 2004-02-07 17:23:31 PST
The problem has to do with BRS_SHRINKWRAPWIDTH -- we're applying the auto
margin, and then doing a second reflow in nsBlockFrame::ComputeFinalSize using
the kid X-most, which means the kid's width plus half the space available for
Comment 3 David Baron :dbaron: ⌚️UTC-7 2004-02-07 17:38:23 PST
Created attachment 140837 [details] [diff] [review]
possible patch

This fixes the bug.  All but the first bit is cleanup.	I still need to run
regression tests, but it seems right.
Comment 4 David Baron :dbaron: ⌚️UTC-7 2004-02-08 12:43:45 PST
The only thing this seems to break is
Comment 5 David Baron :dbaron: ⌚️UTC-7 2004-02-08 12:45:39 PST
(and a bunch of similar tests)
Comment 6 David Baron :dbaron: ⌚️UTC-7 2004-02-08 12:53:49 PST
Created attachment 140879 [details]
variant of simple testcase for what's broken (with display:block on root)

Adding <?xml-stylesheet href="data:text/css,test { display: block; }"
type="text/css"?> to the beginning of this page fixes the problem.  I'm
inclined to check this in and file a separate bug on the regression, since I'm
sure we have other problems with inline root elements caused by the same
underlying problem.
Comment 7 David Baron :dbaron: ⌚️UTC-7 2004-02-08 12:55:17 PST
Comment on attachment 140879 [details]
variant of simple testcase for what's broken (with display:block on root)

Oops, this was the wrong testcase.  Note also that an intervening
display:inline element doesn't break things since we do block-within-inline
Comment 8 David Baron :dbaron: ⌚️UTC-7 2004-02-08 12:55:44 PST
Created attachment 140880 [details]
simple testcase for what's broken
Comment 9 Boris Zbarsky [:bz] (still a bit busy) 2004-02-08 13:11:49 PST
Comment on attachment 140837 [details] [diff] [review]
possible patch

seems reasonable.  Do file a followup on the ib stuff, though.

Comment 10 David Baron :dbaron: ⌚️UTC-7 2004-02-08 21:27:41 PST
Fix checked in to trunk, 2004-02-08 21:22 -0800.

Filed bug 233480.
Comment 11 David Baron :dbaron: ⌚️UTC-7 2004-02-10 14:00:21 PST
Note to self: my checkin comment for this bug was (I think) wrong when I said
that there's still a bug remaining for max-width computation during constrained
reflow.  nsBlockReflowContext::PlaceBlock already handles that issue.

Note You need to log in before you can comment on or make changes to this bug.