Setting absolute position disables column layout [columns]

RESOLVED FIXED

Status

()

Core
Layout
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: bz, Assigned: roc)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

The basic issue is that ConstructFrameByDisplayType has several branches, for
positioned blocks, for blocks with overflow set, etc.  Not all of these end up
calling into ConstructBlock, which is where columns are handled; in particular
the "positioned blocks" branch does not.
Created attachment 172320 [details] [diff] [review]
fix

This fixes it by making absolute frame construction call ConstructBlock instead
of doing its own thing. A nice improvement.
Attachment #172320 - Flags: superreview?(bzbarsky)
Attachment #172320 - Flags: review?(bzbarsky)
Comment on attachment 172320 [details] [diff] [review]
fix

Nice!  If I'd noticed it was already so much like ConstructBlock, I'd have
attached a patch when I filed... ;)


>Index: layout/base/nsCSSFrameConstructor.cpp
>+    rv = ConstructBlock(aPresShell, aPresContext, aState, aDisplay, aContent, 
>+                        aState.GetGeometricParent(aDisplay, aParentFrame), adjParentFrame,
>+                        aStyleContext, &newFrame, *frameItems, PR_TRUE);

Note that you'll need to merge this to tip.  There's no adjParentFrame and
*frameItems anymore as of today, just aParentFrame and aFrameItems; the
adjusting is now done outside this function.

>-    nsTableFrame* tableFrame = NS_REINTERPRET_CAST(nsTableFrame*, aParentFrame);

I think this line is also gone as of today... ;)

>@@ -12830,17 +12805,17 @@ nsCSSFrameConstructor::ConstructBlock(ns
>+                                      PRBool                   aPositionContainer)

Maybe aAbsPosContainer?

And also rename the arg in nsCSSFrameConstructor.h?

r+sr=bzbarsky with that.
Attachment #172320 - Flags: superreview?(bzbarsky)
Attachment #172320 - Flags: superreview+
Attachment #172320 - Flags: review?(bzbarsky)
Attachment #172320 - Flags: review+
(In reply to comment #3)
> >@@ -12830,17 +12805,17 @@ nsCSSFrameConstructor::ConstructBlock(ns
> >+                                      PRBool                  
aPositionContainer)
> 
> Maybe aAbsPosContainer?

OK

> And also rename the arg in nsCSSFrameConstructor.h?

OK
checked in
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
*** Bug 272009 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.