mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-07-21 03:48:43 +00:00
Issue #1641 - Implement CSS flow-root keyword
This is just a clean port of 1322191 and follow-up 1325970. It really seems to add create a new way to access existing code relating to block formatting and floating elements rather than implementing new functionality, and it is mercifully straightforwards.
This commit is contained in:
@@ -305,7 +305,7 @@ NS_NewBlockFormattingContext(nsIPresShell* aPresShell,
|
||||
nsStyleContext* aStyleContext)
|
||||
{
|
||||
nsBlockFrame* blockFrame = NS_NewBlockFrame(aPresShell, aStyleContext);
|
||||
blockFrame->AddStateBits(NS_BLOCK_FLOAT_MGR | NS_BLOCK_MARGIN_ROOT);
|
||||
blockFrame->AddStateBits(NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS);
|
||||
return blockFrame;
|
||||
}
|
||||
|
||||
@@ -6893,10 +6893,11 @@ nsBlockFrame::Init(nsIContent* aContent,
|
||||
// (http://dev.w3.org/csswg/css-writing-modes/#block-flow)
|
||||
// If the box has contain: paint (or contain: strict), then it should also
|
||||
// establish a formatting context.
|
||||
if ((GetParent() && StyleVisibility()->mWritingMode !=
|
||||
if (StyleDisplay()->mDisplay == mozilla::StyleDisplay::FlowRoot ||
|
||||
(GetParent() && StyleVisibility()->mWritingMode !=
|
||||
GetParent()->StyleVisibility()->mWritingMode) ||
|
||||
StyleDisplay()->IsContainPaint()) {
|
||||
AddStateBits(NS_BLOCK_FLOAT_MGR | NS_BLOCK_MARGIN_ROOT);
|
||||
AddStateBits(NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS);
|
||||
}
|
||||
|
||||
if ((GetStateBits() &
|
||||
|
||||
Reference in New Issue
Block a user