Bug 1489295 Part 1 - Rename frame construction data bit that creates flex/grid/column. r=dbaron

After supporting column-span, the top-level container for multicol
layout is no longer the ColumnSetFrame, so remove the "SET" suffix from
FCDATA_ALLOW_GRID_FLEX_COLUMNSET bit to make it sound more general.

Also, update the document and add an assertion.

Differential Revision: https://phabricator.services.mozilla.com/D24394

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2019-03-22 02:39:16 +00:00
Родитель 59bd2e6ca7
Коммит 5a67c61b32
2 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -3415,7 +3415,7 @@ nsCSSFrameConstructor::FindHTMLData(const Element& aElement,
SIMPLE_TAG_CREATE(iframe, NS_NewSubDocumentFrame),
{nsGkAtoms::button,
FCDATA_WITH_WRAPPING_BLOCK(
FCDATA_ALLOW_BLOCK_STYLES | FCDATA_ALLOW_GRID_FLEX_COLUMNSET,
FCDATA_ALLOW_BLOCK_STYLES | FCDATA_ALLOW_GRID_FLEX_COLUMN,
NS_NewHTMLButtonControlFrame, PseudoStyleType::buttonContent)},
SIMPLE_TAG_CHAIN(canvas, nsCSSFrameConstructor::FindCanvasData),
SIMPLE_TAG_CREATE(video, NS_NewHTMLVideoFrame),
@ -3622,6 +3622,9 @@ void nsCSSFrameConstructor::ConstructFrameFromItemInternal(
MOZ_ASSERT(
!(bits & FCDATA_IS_WRAPPER_ANON_BOX) || (bits & FCDATA_USE_CHILD_ITEMS),
"Wrapper anon boxes should always have FCDATA_USE_CHILD_ITEMS");
MOZ_ASSERT(!(bits & FCDATA_ALLOW_GRID_FLEX_COLUMN) ||
(bits & FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS),
"Need the block wrapper bit to create grid/flex/column.");
// Don't create a subdocument frame for iframes if we're creating extra frames
if (aState.mCreatingExtraFrames &&
@ -3690,7 +3693,7 @@ void nsCSSFrameConstructor::ConstructFrameFromItemInternal(
nsContainerFrame* container = static_cast<nsContainerFrame*>(newFrame);
nsContainerFrame* outerFrame;
nsContainerFrame* innerFrame;
if (bits & FCDATA_ALLOW_GRID_FLEX_COLUMNSET) {
if (bits & FCDATA_ALLOW_GRID_FLEX_COLUMN) {
switch (display->mDisplay) {
case StyleDisplay::Flex:
case StyleDisplay::InlineFlex:

Просмотреть файл

@ -684,11 +684,12 @@ class nsCSSFrameConstructor final : public nsFrameManager {
an SVG text frame. */
#define FCDATA_IS_SVG_TEXT 0x80000
/**
* When FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS is set, this bit says
* if we should create a grid/flex/columnset container instead of
* a block wrapper when the styles says so.
* If FCDATA_ALLOW_GRID_FLEX_COLUMN is set, then we should create a
* grid/flex/column container instead of a block wrapper when the styles says
* so. This bit is meaningful only if FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS
* is also set.
*/
#define FCDATA_ALLOW_GRID_FLEX_COLUMNSET 0x200000
#define FCDATA_ALLOW_GRID_FLEX_COLUMN 0x200000
/**
* Whether the kids of this FrameConstructionData should be flagged as having
* a wrapper anon box parent. This should only be set if