Closed Bug 277421 Opened 20 years ago Closed 20 years ago

Setting absolute position disables column layout [columns]

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: roc)

References

Details

Attachments

(2 files)

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.
Attached file Testcase
Attached patch fixSplinter Review
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
Closed: 20 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.

Attachment

General

Created:
Updated:
Size: