Last Comment Bug 273193 - float:left is not placed correctly when inside an empty position:relative
: float:left is not placed correctly when inside an empty position:relative
Status: RESOLVED FIXED
: regression, testcase
Product: Core
Classification: Components
Component: Layout: Block and Inline (show other bugs)
: Trunk
: All All
: -- minor (vote)
: ---
Assigned To: Robert O'Callahan (:roc) (email my personal email if necessary)
:
Mentors:
http://bobby.watchfire.com/bobby/html...
Depends on:
Blocks: 209694 278861
  Show dependency treegraph
 
Reported: 2004-12-04 16:49 PST by Mats Palmgren (:mats)
Modified: 2005-02-14 11:49 PST (History)
3 users (show)
asa: blocking1.8a6-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase (698 bytes, text/html)
2004-12-04 16:51 PST, Mats Palmgren (:mats)
no flags Details
Testcase #2 (730 bytes, text/html)
2004-12-04 16:54 PST, Mats Palmgren (:mats)
no flags Details
fix (5.27 KB, patch)
2005-01-24 18:56 PST, Robert O'Callahan (:roc) (email my personal email if necessary)
bzbarsky: review+
bzbarsky: superreview+
Details | Diff | Splinter Review

Description Mats Palmgren (:mats) 2004-12-04 16:49:33 PST
float:left is not placed correctly when inside an empty position:relative.

This is a regression from bug 209694.

STEPS TO REPRODUCE:
1. Load testcase

ACTUAL RESULTS:
blue box is placed at the left edge of the viewport.

EXPECTED RESULTS:
blue box indented 1.5em from the left edge of the viewport.
Comment 1 Mats Palmgren (:mats) 2004-12-04 16:51:06 PST
Created attachment 167884 [details]
Testcase
Comment 2 Mats Palmgren (:mats) 2004-12-04 16:54:43 PST
Created attachment 167886 [details]
Testcase #2

Adding a border, padding or an explicit height to the rel.pos. fixes it...
Comment 3 Asa Dotzler [:asa] 2005-01-08 14:37:58 PST
Roc's out and so he probably won't be getting to this in time for the alpha.
Setting a nomination now for beta.
Comment 4 Boris Zbarsky [:bz] (TPAC) 2005-01-23 22:04:55 PST
This was introduced by the change to nsBlockReflowContext::PlaceBlock in bug
209694.  The empty block now goes through a codepath that doesn't do relative
positioning and doesn't do correct horizontal alignment.  That seems pretty
wrong to me....

Robert, if you don't have time to look into this, please let me know and I will.
Comment 5 Robert O'Callahan (:roc) (email my personal email if necessary) 2005-01-24 18:43:01 PST
The only reason this worked before was because the non-empty overflow area
stopped us from treating the block as empty --- which is definitely wrong. We
have to fix up this code so that empty blocks are correctly aligned and
relatively positioned.
Comment 6 Robert O'Callahan (:roc) (email my personal email if necessary) 2005-01-24 18:56:06 PST
Created attachment 172315 [details] [diff] [review]
fix

This patch merges all the code that should be in common for both empty and
non-empty blocks.
Comment 7 Boris Zbarsky [:bz] (TPAC) 2005-01-24 21:41:39 PST
Comment on attachment 172315 [details] [diff] [review]
fix

r+sr=bzbarsky
Comment 8 Robert O'Callahan (:roc) (email my personal email if necessary) 2005-01-25 14:38:11 PST
checked in

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