Commit Graph

3105 Commits

Author SHA1 Message Date
Mats Palmgren
28bd6cb7d2 Bug 1539017 - Update the parent for the outside ::marker frame in case we moved it to a ColumnSetWrapperFrame ancestor. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D25313
2019-03-28 23:38:03 +01:00
Mats Palmgren
a78235ff8d Bug 205202 part 4 - [css-lists][css-pseudo] Rename various uses of bullet with marker to avoid any misleading association with nsBulletFrame (idempotent patch). r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren
a31b79f0fd Bug 205202 part 3 - [css-lists][css-pseudo] Add support for the 'content' CSS property on ::marker pseudo elements. r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren
127f3ae120 Bug 205202 part 1 - [css-lists][css-pseudo] Add support for the ::marker pseudo element on list items. Alias :-moz-list-bullet/number to that in the parser. r=emilio 2019-03-24 23:13:53 +01:00
Mats Palmgren
c0488387d7 Bug 288704 part 2 - [css-lists] Implement display:list-item counters using a built-in 'list-item' CSS counter. r=emilio 2019-03-24 23:13:52 +01:00
Mats Palmgren
fe2fb77357 Bug 1518201 - [css-lists] Implement the counter-set property. r=emilio 2019-03-24 23:13:52 +01:00
Ting-Yu Lin
64422673f2 Bug 1489295 Part 4 - Remove InitAndWrapInColumnSetFrameIfNeeded(). r=dbaron
The last consumer of the method is removed in Part 3.

Depends on D24396

Differential Revision: https://phabricator.services.mozilla.com/D24470
2019-03-22 02:47:32 +00:00
Ting-Yu Lin
c121812707 Bug 1489295 Part 3 - Implement column-span:all for <button>. r=dbaron
We need to pull outerFrame one level up to the outer scope because it's
needed when calling FinishBuildingColumns().

The patch is very similar to implementing column-span:all for <fieldset>
in bug 1535200.

Differential Revision: https://phabricator.services.mozilla.com/D24396
2019-03-22 02:50:34 +00:00
Ting-Yu Lin
5ae167c3cb Bug 1489295 Part 2 - Clean up the naming of a 'nsStyleContext' variable in ConstructFrameFromItemInternal(). r=dbaron
Rename outerSC to outerStyle because nsStyleContext was gone.

Depends on D24394

Differential Revision: https://phabricator.services.mozilla.com/D24395
2019-03-21 18:27:39 +00:00
Ting-Yu Lin
a63fa88315 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
2019-03-22 02:39:16 +00:00
Ting-Yu Lin
80628b8cda Bug 1535200 Part 2 - Implement column-span:all for fieldset elements. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D23618
2019-03-21 06:02:02 +00:00
Ting-Yu Lin
0929b2f636 Bug 1535200 Part 1 - In fieldset, make absolute positioned frames relative to multicol container, not the column content frames. r=mats
Per spec, "Note: Column boxes do not become the containing block for
elements with position: fixed or position: absolute. The containing
block is the multicol container, it being the principal box."

https://drafts.csswg.org/css-multicol-1/#the-multi-column-model

contentFrame and contentFrameTop are different only if fieldset has
multicol layout. In that case, contentFrameTop is nsColumnSetFrame (or
ColumnSetWrapperFrame after applying Part 2 with
layout.css.column-span.enabled=true).

Differential Revision: https://phabricator.services.mozilla.com/D23617
2019-03-18 05:47:53 +00:00
Ting-Yu Lin
8c9895f0ca Bug 1533885 - Bail out from MaybeRecreateForColumnSpan if aFrameList is empty. r=dbaron
The test case triggers MOZ_ASSERT(!IsFramePartOfIBSplit(aParentFrame))
in MaybeRecreateForColumnSpan() because WipeContainingBlock() returns
early when the FrameConstructionItemList is empty. Thus, it doesn't wipe
the aParentFrame even if it's part of an IB split.

An empty FrameConstructionItemList constructs no frames. Therefore,
MaybeRecreateForColumnSpan() doesn't need to do anything if aFrameList is empty
since an empty frame list cannot contain any column-span.

Differential Revision: https://phabricator.services.mozilla.com/D23820
2019-03-20 21:17:38 +00:00
Ting-Yu Lin
043dd8d104 Bug 1493317 Part 1 - Fix pending popup group assertion after enabling AccessibleCaret in unittest. r=mats
The assertion can be reproduced locally by running
"./mach test dom/canvas/test/chrome/test_drawWindow_widget_layers.html"
with layout.accessiblecaret.enabled=true.

When AccessibleCaret is enabled, caret elements will be inserted into
nsCanvasFrame::mCustomContentContainer, thus it recursively invokes
ConstructFramesFromItemList() to construct frames for carets before it had a
chance to construct popup group.

I feel it's too strict to assume that ConstructFramesFromItemList() cannot be
invoke recursively whenever there's a popup group item. I move the assertion to
the end of ConstructDocElementFrame() to ensure the popup group is processed by
then.

Differential Revision: https://phabricator.services.mozilla.com/D10298
2019-03-16 07:29:11 +00:00
Emilio Cobos Álvarez
cf0e6ff153 Bug 1533963 - Use a single RestyleHint representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22828
2019-03-14 11:47:50 +00:00
Emilio Cobos Álvarez
eaa0cec034 Bug 1533085 - Fix some usage of display in XBL bindings in thunderbird. r=npotb 2019-03-13 19:00:08 +01:00
Emilio Cobos Álvarez
b6c57c6e0d Bug 1450652 - Remove platform support for display="" in XBL bindings. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D12586
2019-03-06 00:47:13 +00:00
Emilio Cobos Álvarez
0b3a16d0f1 Bug 1512993 - Get rid of XBL display usage for buttons and toolbarbuttons. r=mats
This is the last use of them!

Differential Revision: https://phabricator.services.mozilla.com/D21924
2019-03-04 17:20:29 +00:00
Ehsan Akhgari
6fb090e3c5 Bug 1529619 - Remove a needless null check from nsCSSFrameConstructor::BeginBuildingScrollFrame() which confuses Coverity; r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D20673
2019-02-21 16:47:45 +00:00
Ting-Yu Lin
c0ffdace77 Bug 1524382 - Flush all out-of-flow frames before destroying the frame list when reframing multicol container. r=dbaron
aFrameList can contain placeholder frames. If we decide to nuke
aFrameList, we need to destroy the out-of-flow frames gracefully.

In this case, out-of-flow frames are still in nsFrameConstructorState's
absolute item lists. To rely on nsPlaceholderFrame::DestroyFrom() to
remove its out-of-flow frame properly, we manually flush all the frame
insertions for all the lists in aState before destroying aFrameList.

Differential Revision: https://phabricator.services.mozilla.com/D19460
2019-02-19 22:37:24 +00:00
Emilio Cobos Álvarez
e9ff37af55 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

Differential Revision: https://phabricator.services.mozilla.com/D19002
2019-02-19 13:44:33 +00:00
Csoregi Natalia
4c99b23b6c Merge mozilla-central to mozilla-inbound. CLOSED TREE 2019-02-17 00:14:07 +02:00
Sylvestre Ledru
553ecbeed8 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Summary: # ignore-this-changeset

Reviewers: Ehsan

Reviewed By: Ehsan

Subscribers: emilio, jandem, bbouvier, jya

Bug #: 1519636

Differential Revision: https://phabricator.services.mozilla.com/D20062
2019-02-16 20:20:37 +01:00
Markus Stange
619ba4cb84 Bug 1500692 - Add LAYOUT subcategories. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D11341
2019-02-16 17:38:35 +00:00
Boris Zbarsky
cbbe425e59 Remove no longer relevant comment. No bug. r=emilio
The primary frame hashtable is long gone; we have a pointer on the node now.

Differential Revision: https://phabricator.services.mozilla.com/D19952
2019-02-15 19:01:11 +00:00
Emilio Cobos Álvarez
4f202b9bdf Bug 1528098 - Remove content-select code. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D19869
2019-02-15 01:51:33 +00:00
Ting-Yu Lin
5fc4ae9007 Bug 1527519 Part 3 - Replace remaining nsLayoutUtils::GetAsBlock() with do_QueryFrame(), and delete nsLayoutUtils::GetAsBlock(). r=mats
Depends on D19861

Differential Revision: https://phabricator.services.mozilla.com/D19863
2019-02-15 01:38:05 +00:00
Ting-Yu Lin
e7c211a933 Bug 1527519 Part 2 - Replace some nsLayoutUtils::GetAsBlock() with nsIFrame::IsBlockFrameOrSubclass(). r=mats
Depends on D19860

Differential Revision: https://phabricator.services.mozilla.com/D19861
2019-02-15 01:38:04 +00:00
Emilio Cobos Álvarez
df05b5492b Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Emilio Cobos Álvarez
5ac7dcc7cc Bug 1525134 - Move image loads out of the style struct accessors. r=heycam
After this I can pass the document from the caller to ResolveSameStructsAs, and
get rid of the pres context pointer.

Differential Revision: https://phabricator.services.mozilla.com/D18600
2019-02-05 19:47:29 +00:00
Razvan Maries
bb63ca688a Backed out changeset 919de32d4905 (bug 1525134) for build bustages. CLOSED TREE 2019-02-05 19:36:46 +02:00
Emilio Cobos Álvarez
8bce3786c3 Bug 1525134 - Move image loads out of the style struct accessors. r=heycam
After this I can pass the document from the caller to ResolveSameStructsAs, and
get rid of the pres context pointer.

Differential Revision: https://phabricator.services.mozilla.com/D18600
2019-02-05 18:07:18 +01:00
Razvan Maries
ebcf2ddc23 Backed out changeset 992f27cfecac (bug 1525134) for build bustages. CLOSED TREE 2019-02-05 18:54:14 +02:00
Emilio Cobos Álvarez
4702c4f188 Bug 1525134 - Move image loads out of the style struct accessors. r=heycam
After this I can pass the document from the caller to
ResolveSameStructsAs, and get rid of the pres context pointer.

Differential Revision: https://phabricator.services.mozilla.com/D18600
2019-02-05 13:45:04 +00:00
Ting-Yu Lin
c467f0d314 Bug 1504053 - Reframe multi-column container if inserting a subtree with a column-span child. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D16077
2019-01-31 02:22:49 +00:00
Ting-Yu Lin
91eaccc5e4 Bug 1523061 Part 2 - Remove static ListTag(FILE*, const nsIFrame*). r=dholbert
Many of the modifications are guarded by #ifdefs. I verify them locally
by manually define them in nsBlockDebugFlags.h and nsLinelayout.cpp.

Note that I replace "mFrame" with "frame" in lines guarded by
NOISY_BLOCK_DIR_MARGINS in nsBlockFrame.cpp because they were
incorrectly renamed in Bug 1277129 Part 6a.
https://hg.mozilla.org/mozilla-central/rev/a70b04f074fc

Differential Revision: https://phabricator.services.mozilla.com/D17733
2019-01-29 21:22:14 +00:00
Ting-Yu Lin
f2e774779b Bug 1516739 - Stop reparenting absolute/fixed positioned blocks when constructing multicol container. r=dbaron
The crash happens when we try to reparent the absolute/fixed
positioned children to the non-column-span wrapper's absolute list.

When constructing the multicol container, we want it to be the
absolute/fixed position container, not the moz-column-content anonymous
blocks. Hence the modification in AppendFramesToParent() and
ConstructBlock().

Delete AdjustAbsoluteContainingBlock() because we'd like to reparent
absolute/fixed children to non-first continuation of block descendant of
multicol. And it doesn't crash anymore today.

Differential Revision: https://phabricator.services.mozilla.com/D16728
2019-01-25 07:09:17 +00:00
Wei-Cheng Pan
2105b8b095 Bug 1515822 - Capture frame state in nsCSSFrameConstructor::ContentRemoved. r=emilio,mats
Move CaptureStateForFramesOf into ContentRemoved, so we can traverse frames
which were under display: contents as well.

Differential Revision: https://phabricator.services.mozilla.com/D15319
2019-01-28 11:55:03 +00:00
Cosmin Sabou
57bb107987 Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Greg Tatum
7ced9eb1ec Bug 1520526 - Add categories to all profiler markers; r=mstange
This commit adds categories to all markers. This way the profiler's
marker categories and frame label categories agree. There are a few
duplicate category properties on some of the marker payloads, but
this could be cleaned up in a follow-up if needed.

Differential Revision: https://phabricator.services.mozilla.com/D16864
2019-01-18 15:40:15 +00:00
Victor Porof
6a67b6b345 Bug 1507704 - Migrate the columnpicker binding into a custom element, r=bgrins 2019-01-14 09:38:24 +01:00
Ehsan Akhgari
498e2df734 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset
2019-01-18 10:16:18 +01:00
Emilio Cobos Álvarez
1e93768fd8 Bug 1516410 - Fix some display: contents code in ContentRemoved. r=mats
There's no real behavior change, since:

 * aFlags right now is only used for whitespace suppression optimizations (which
   we don't do when display: contents is involved anyway).

 * The CouldBeDisplayContents() check is only an optimization: we're
   unconditionally recursing into ContentRemoved now, which is not incorrect,
   just inefficient.

I found this while reviewing https://phabricator.services.mozilla.com/D15319
(where this _would_ have an impact on behavior).

Differential Revision: https://phabricator.services.mozilla.com/D15373
2019-01-15 18:19:36 +00:00
Ting-Yu Lin
3daa5d3941 Bug 1503420 Part 2 - Fix appending a subtree with column-span descendants under the ::moz-column-content. r=emilio
The elements under <body> are treat as content append, so their frames
will be construct by nsCSSFrameConstructor::ContentAppended.

This patch fixed only the simple "append" case which is appending to the
last continuation of ::moz-column-content. For other more complex
appending or inserting cases, we might need to reframe (bug 1504053).

Differential Revision: https://phabricator.services.mozilla.com/D16076
2019-01-15 03:48:02 +00:00
Ting-Yu Lin
fc359f1610 Bug 1503420 Part 1 - Adjust some callers of nsIFrame::List() to stop passing 0 as a const char* argument. r=dholbert
To reproduce, execute
"GECKO_FRAMECTOR_DEBUG_FLAGS=really-noisy-content-updates ./mach run".

nsIFrame::List()'s second argument should be a const char*, not an
integer. We can fix the bug by omitting it because the default value of
the argument is an empty string.

Differential Revision: https://phabricator.services.mozilla.com/D16075
2019-01-09 21:02:13 +00:00
Emilio Cobos Álvarez
dc336a73ba Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Ting-Yu Lin
8b7ee2ddb8 Bug 1517069 - Make GetMultiColumnContainingBlockFor() return nsContainerFrame*. r=dholbert
GetParent() already returns nsContainerFrame*, and it's easier to use
with API like FinishBuildingColumns() demanding a nsContainerFrame*.

Differential Revision: https://phabricator.services.mozilla.com/D15549
2019-01-02 22:27:43 +00:00
Ting-Yu Lin
e66046a6e6 Bug 1508762 Part 2 - Fix a restyle bug if there's column-span:all under ib-split setting. r=dholbert
This is to prevent Part 1 from breaking
testing/web-platform/tests/css/css-multicol/multicol-span-all-restyle-002.html

After introducing Part 1, we now use CreateContinuingFrame() to create
non-column-span wrapper frames, which use nsFrame::Init() rather than
InitAndRestoreFrame() to initialize them. Because the bits in
aState.mAdditionalStateBits are added to frames only when
nsCSSFrameConstructor::InitAndRestoreFrame() is called. We need a new
way to add the NS_FRAME_PART_OF_IBSPLIT to non-column-span wrapper
frames.

Note that we used to add NS_FRAME_PART_OF_IBSPLIT to both column-span
wrapper and non-column-span wrapper. After this patch, column-span
wrapper won't have NS_FRAME_PART_OF_IBSPLIT. That's fine because
column-span wrappers are not linked with other frames and they
shouldn't get this bit set.

Depends on D15134

Differential Revision: https://phabricator.services.mozilla.com/D15452
2018-12-28 02:25:40 +00:00
Ting-Yu Lin
4031873c0e Bug 1508762 Part 1 - Support column-span:all for a multi-column <details> element. r=dholbert
In CreateColumnSpanSiblings(), aInitialBlock can be a DetailsFrame.
Therefore, when creating a non-column-span wrapper, we cannot assume
it's always a block frame. We need to use CreateContinuingFrame to
ensure the correct type of continuation is created.

Differential Revision: https://phabricator.services.mozilla.com/D15134
2018-12-28 02:15:58 +00:00
Sylvestre Ledru
8a7f808395 Bug 1515556 comment fix-ups for the tree reformat (layout/) r=Ehsan,heycam
Differential Revision: https://phabricator.services.mozilla.com/D13125
2018-12-21 03:07:05 +00:00