Closed Bug 273193 Opened 20 years ago Closed 20 years ago

float:left is not placed correctly when inside an empty position:relative

Categories

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

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: MatsPalmgren_bugz, Assigned: roc)

References

()

Details

(Keywords: regression, testcase)

Attachments

(3 files)

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.
Attached file Testcase
Attached file Testcase #2
Adding a border, padding or an explicit height to the rel.pos. fixes it...
Flags: blocking1.8a6?
Roc's out and so he probably won't be getting to this in time for the alpha.
Setting a nomination now for beta.
Flags: blocking1.8b?
Flags: blocking1.8a6?
Flags: blocking1.8a6-
Blocks: 278861
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.
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.
Attached patch fixSplinter Review
This patch merges all the code that should be in common for both empty and
non-empty blocks.
Attachment #172315 - Flags: superreview?(bzbarsky)
Attachment #172315 - Flags: review?(bzbarsky)
Comment on attachment 172315 [details] [diff] [review]
fix

r+sr=bzbarsky
Attachment #172315 - Flags: superreview?(bzbarsky)
Attachment #172315 - Flags: superreview+
Attachment #172315 - Flags: review?(bzbarsky)
Attachment #172315 - Flags: review+
checked in
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Flags: blocking1.8b?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: