Closed
Bug 239310
Opened 21 years ago
Closed 1 year ago
better way to find frame's containing block
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: dbaron, Unassigned)
References
(Blocks 1 open bug)
Details
Currently the way we find frames' containing blocks is a mess, and is a bit of
an obstacle to refactoring reflow (since refactoring reflow would require
duplicating it in more places). We find containing blocks using logic in
nsHTMLReflowState and using logic in nsCSSFrameConstructor. The work in bug
135082 improves the former a bit, but both are quite messy and have bugs
floating around (like bug 233094 in the latter).
Perhaps a start for a new system would be a set of bits saying whether a frame
is a certain type of containing block. The types are as follows:
* block (any block, box, table cell)
* float (any block or box whose parent is not a block or box or that has
'overflow: auto')
* absolute (defined by CSS2 10.1)
* fixed (defined by CSS2 10.1)
Unfortunately, floats care about both the block-type and float-type container,
which complicates things a little (and certainly already complicates our
implementation of floats).
I'm really not sure what to do here, but this seems like something we want to do
if we want to avoid refactoring nsHTMLReflowState in order to refactor reflow.
Though maybe it's just better to split part of nsHTMLReflowState into a base
class and just move on.
| Reporter | ||
Comment 1•21 years ago
|
||
s/'overflow: auto'/'overflow' not 'visible'/
Also, the float type currently corresponds to NS_BLOCK_SPACE_MGR, but it would
be more extensible if we used different conditions like the ones I described to
decide when we need to set it.
| Reporter | ||
Comment 2•21 years ago
|
||
Revise that to
* float (any block whose parent is not a block or that has
'overflow' not 'visible', or any box)
Comment 3•21 years ago
|
||
So the idea is to pass an enum value to IsContainingBlock and have the callee
handle it accordingly? In which case nsPositionedInlineFrame (say) could just
check for a particular enum value?
Where's the nsCSSFrameConstructor code that looks for containing blocks? Or do
you just mean the code that pushes floating/absolute/fixed containing blocks
into the state?
| Reporter | ||
Comment 4•21 years ago
|
||
I mean the code that pushes them onto the state.
Comment 5•21 years ago
|
||
Come to think of it, the code that creates IB splits probably does something
like that too....
Comment 6•14 years ago
|
||
With this new implementation: https://hg.mozilla.org/mozilla-central/rev/00f422b2cf36#l11.40, is this still a concern?
Updated•7 years ago
|
Product: Core → Core Graveyard
| Assignee | ||
Updated•7 years ago
|
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
| Reporter | ||
Updated•4 years ago
|
Assignee: dbaron → nobody
Updated•3 years ago
|
Severity: normal → S3
Comment 7•1 year ago
|
||
Per comment 6, I assume this bug is not a concern.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•