Commit Graph

3327 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
fb0ce77605 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

Differential Revision: https://phabricator.services.mozilla.com/D28380
2019-04-23 16:43:15 +00:00
Bogdan Tara
76d9bb886c Backed out changeset e85cb54e5944 (bug 1546046) complementary backout after 1470880 was backed out CLOSED TREE 2019-04-23 06:55:29 +03:00
Emilio Cobos Álvarez
e74cdacc5c Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

Differential Revision: https://phabricator.services.mozilla.com/D28380
2019-04-22 21:57:22 +00:00
Masayuki Nakano
394fc8aa9f Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
This patch changes remaining things under `layout/`.  However, there are some
places which still need to use `nsIPresShell`.  That will be fixed in a
follow up bug.

Differential Revision: https://phabricator.services.mozilla.com/D27477
2019-04-16 07:25:10 +00:00
Masayuki Nakano
ad09cbb08f Bug 1544343 - part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead.  So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).

Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.

Differential Revision: https://phabricator.services.mozilla.com/D27476
2019-04-16 07:24:49 +00:00
Masayuki Nakano
07eac02be2 Bug 1544343 - part 1: Make nsFrameManager, nsCSSFrameConstructor and nsFrameConstructorState use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D27475
2019-04-16 07:24:29 +00:00
Ting-Yu Lin
0aba7bc866 Bug 1541679 - Skip pseudo frames when finding multicol containing block for reframing. r=bzbarsky
This patch does something similar to GetIBContainingBlockFor() because
pseudo frames are not good reframe target.

Differential Revision: https://phabricator.services.mozilla.com/D26858
2019-04-16 05:35:51 +00:00
Emilio Cobos Álvarez
c045432df4 Bug 1543672 - The counters code should use atoms rather than strings. r=mats,boris
Servo already atomizes the counter names, it makes no sense to copy the string
rather than bumping the refcount.

Differential Revision: https://phabricator.services.mozilla.com/D27061
2019-04-15 20:11:45 +00:00
Masayuki Nakano
5430c16991 Bug 1543013 - part 2: Make accessible use mozilla::PresShell directly rather than via nsIPresShell r=Jamie
This patch makes accessible module use `mozilla::PresShell` directly rather
than via `nsIPresShell`.  Additionally, renames `DocAccessible::PresShell()`
to `DocAccessible::PresShellPtr()` for avoiding conflict with using
`PresShell` in it and its sub classes.

Differential Revision: https://phabricator.services.mozilla.com/D26663
2019-04-13 12:13:15 +00:00
Masayuki Nakano
dbcabe5901 Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

Differential Revision: https://phabricator.services.mozilla.com/D25744
2019-04-04 00:19:48 +00:00
Razvan Maries
5e691f8a46 Backed out changeset 3b94c20ba873 (bug 1540990) for build bustages. CLOSED TREE 2019-04-04 02:44:00 +03:00
Masayuki Nakano
0fd36d1719 Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

Differential Revision: https://phabricator.services.mozilla.com/D25744
2019-04-03 23:29:38 +00:00
Ting-Yu Lin
804d391ad2 Bug 1540337 - Assert blockFrame is valid in the beginning of ConstructBlock(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D25490
2019-03-30 22:06:06 +00:00
Sylvestre Ledru
d42e742a3e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D24168
2019-03-31 15:12:55 +00:00
Narcis Beleuzu
2d89ecb98a Merge autoland to mozilla-central. a=merge 2019-03-30 23:43:56 +02:00
Ting-Yu Lin
38fbc00ef0 Bug 1517080 Part 6 - Remove nsFrameItems alias, and rename variables with suffix "Items" to "List". r=mats
Differential Revision: https://phabricator.services.mozilla.com/D15556
2019-03-30 04:45:47 +00:00
Ting-Yu Lin
19fa1c0774 Bug 1517080 Part 5 - Rename nsAbsoluteItems to mozilla::AbsoluteFrameList. r=mats
Also, rename variables that have suffix "Items" to "List".

Differential Revision: https://phabricator.services.mozilla.com/D15555
2019-03-30 04:45:40 +00:00
Ting-Yu Lin
4dd2e4db43 Bug 1517080 Part 4 - Make nsFrameItems an alias of nFrameList, and remove nsFrameItems. r=mats
nsFrameItems will be removed in Part 6.

Differential Revision: https://phabricator.services.mozilla.com/D15554
2019-03-30 03:25:10 +00:00
Ting-Yu Lin
1b03d67174 Bug 1517080 Part 3 - Replace remaining nsFrameItem::Add() with nsFrameList::AppendFrame(). r=mats
This patch is a mechanical replacement without any reparent, i.e.
passing nullptr as parent into nsFrameList::AppendFrame().

Differential Revision: https://phabricator.services.mozilla.com/D25337
2019-03-30 03:31:21 +00:00
Ting-Yu Lin
46379f1e72 Bug 1517080 Part 2 - Replace nsFrameItems::AddChild() with nsFrameList::AppendFrame() in FinishBuildingScrollFrame(). r=mats
Differential Revision: https://phabricator.services.mozilla.com/D25336
2019-03-30 02:56:27 +00:00
Ting-Yu Lin
6e0e7214db Bug 1517080 Part 1 - Do not adjust table captions' parent when they're created. r=mats
In order to get rid of nsFrameItems::AddChild() and use
nsFrameList::AppendFrame() instead, we need to keep table captions'
parent to be nsTableFrame when they're created (no adjust in
ConstructFramesFromItem) so that their parent remain the same as other
frames in the table when appending into the temporary aFrameItems.

We then adjust captions' parent right before we call
SetInitialChildList()/AppendFrames/InsertFrames().

Also, pass nullptr to AppendFrames() in
nsTableWrapperFrame::AppendFrames() because callers should already set
captions' parent frame properly. No need to reparent them again.

Differential Revision: https://phabricator.services.mozilla.com/D25335
2019-03-30 02:59:25 +00:00
Mats Palmgren
1070de5e90 Bug 1540195 - Call InitAndRestoreFrame to ensure we have the parent setup correctly before calling SetInitialSingleChild. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D25430
2019-03-29 18:23:36 +01:00
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