Граф коммитов

721 Коммитов

Автор SHA1 Сообщение Дата
Daniel Holbert 96d67c6eb3 Bug 1652278 part 2: Flesh out PrintedSheetFrame implementation so that it serves as the container for nsPageFrame. r=TYLin
This patch:
- Creates an anon-box pseudo-style for PrintedSheetFrame, in part so that it
  can co-opt the styles that we formerly gave to page-frames in ua.css, to draw
  the sheet of paper and the shadow in Print Preview.
- Adjusts nsCSSFrameConstructor to create a PrintedSheetFrame as the parent of
  nsPageFrame (inserting between it and its nsPageSequenceFrame container, in
  the frame tree).
- Fleshes out out a simple BuildDisplayList() implementation for
  PrintedSheetFrame (taking the responsibility for "paper"-drawing from
  nsPageFrame).
- Fleshes out a simple Reflow implementation for PrintedSheetFrame, just
  placing the child page (assuming there's only one for now) at the origin.
- Adjusts nsPageFrame and nsPageSequenceFrame to account for the fact that
  there's another layer between them now.

Note that PrintedSheetFrame needs to implement AppendDirectlyOwnedAnonBoxes()
(just as nsSimplePageSequence and nsPageFrame do), since it owns anonymous
nsPageFrame instances. This implementation only needs to append the first
child, as explained in the code-comment and in
https://bugzilla.mozilla.org/show_bug.cgi?id=1374761#c9 (and of course, for
now, PrintedSheetFrame only has one child at a time anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D83457
2020-08-05 03:28:32 +00:00
Tim Nguyen f4e86cd6e4 Bug 558594 - Implement layout for <input type='search'>. r=emilio,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D56302
2020-07-27 12:09:40 +00:00
longsonr 875f5e88ac Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.

Differential Revision: https://phabricator.services.mozilla.com/D83140
2020-07-11 02:20:20 +00:00
Emilio Cobos Álvarez ce1947b502 Bug 1640917 - Remove XBL mentions in layout. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D76846
2020-05-26 16:16:32 +00:00
Emilio Cobos Álvarez 525520f10b Bug 1640601 - Also reframe the closest non-anonymous root when switching anonymous content from display: none to something else. r=mats
We were dealing with it correctly when switching display from e.g. block
to inline, or such. But we were not dealing with it when the node was
undisplayed.

Handle it properly, and free one frame bit while at it. We can't really
do this for ManualNAC (the editor resizers) because they request a
reframe explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D76679
2020-05-25 23:54:10 +00:00
Emilio Cobos Álvarez 0c97a580b8 Bug 1640165 - Address TYLin's and clang-format's comments.
Differential Revision: https://phabricator.services.mozilla.com/D76556
2020-05-22 21:55:10 +00:00
Emilio Cobos Álvarez dbf7a05226 Bug 1640165 - Use EnumSet for frame construction item flags. r=mats
And remove the XBL_BASE flag because it's unused.

Differential Revision: https://phabricator.services.mozilla.com/D76474
2020-05-22 18:07:48 +00:00
Emilio Cobos Álvarez 4f0e152dab Bug 1584935 - Clean up a tiny bit more now that lazyfc is infallible. r=tnikkel
Fairly minor clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D74751
2020-05-13 18:02:53 +00:00
Csoregi Natalia e1467af8c0 Backed out 2 changesets (bug 1584935) for accessibility failures on e.g. accessible/tests/mochitest/tree/test_tabbrowser.xhtml CLOSED TREE
Backed out changeset 91e7137acba3 (bug 1584935)
Backed out changeset 28e2781f3026 (bug 1584935)
2020-05-13 09:41:36 +03:00
Emilio Cobos Álvarez 4c230a0307 Bug 1584935 - Clean up a tiny bit more now that lazyfc is infallible. r=tnikkel
Fairly minor clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D74751
2020-05-12 22:41:55 +00:00
Bogdan Tara 08afb5c829 Backed out 2 changesets (bug 1584935) for many toolkit/content/tests/chrome/test_* failures CLOSED TREE
Backed out changeset e78fc5cb2ed7 (bug 1584935)
Backed out changeset 8d7c5732cda9 (bug 1584935)
2020-05-12 03:03:58 +03:00
Emilio Cobos Álvarez 58aecd7daa Bug 1584935 - Clean up a tiny bit more now that lazyfc is infallible. r=tnikkel
Fairly minor clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D74751
2020-05-11 22:52:16 +00:00
Simon Giesecke 8aa47bcfb7 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D66016

--HG--
extra : moz-landing-system : lando
2020-03-17 09:38:32 +00:00
Ting-Yu Lin afe9123179 Bug 1622008 Part 3 - Remove nsPresContext* and PresShell* from the argument list of some continuing-frame-creation methods. r=dholbert
Both PresShell() and PresContext() are cached in nsIFrame. This
simplifies the setup for the callers to
nsCSSFrameConstructor::CreateContinuingFrame().

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

--HG--
extra : moz-landing-system : lando
2020-03-12 21:50:23 +00:00
Emilio Cobos Álvarez 077183556a Bug 1561900 - Fix scroll state restoration when not coming from the bfcache on the initial frame construction. r=bzbarsky
There is no way this ever properly worked, as we always passed null for
`aFrameState`.

So it'd only work if we reframed the document element or such...  Which is not
amazing.

For simpler test-cases, when we don't construct the scrollframe via
PresShell::Initialize, but via the regular frame constructor updates
(ContentAppended, etc...), those end up working because we go through lazy frame
construction, which ends up in RecreateFramesForContent, which passes
mTempFrameTreeState.

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

--HG--
extra : moz-landing-system : lando
2020-01-15 13:18:52 +00:00
Ting-Yu Lin 3c0eb96e17 Bug 1499281 - Remove column-span pref in nsCSSFrameConstructor. r=dbaron
For BeginBuildingColumns, returning nsBlockFrame, i.e. the original
NS_NewColumnSetWrapperFrame's return type, should be sufficient since no
other caller in frame constructor needs to call ColumnSetWrapper's
methods.

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

--HG--
extra : moz-landing-system : lando
2019-12-31 16:13:41 +00:00
Ting-Yu Lin 2e06a9ea92 Bug 1593752 - When inserting canonical <body> element, reframe root element only if their used WritingModes are different. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D51889

--HG--
extra : moz-landing-system : lando
2019-11-06 05:50:12 +00:00
Emilio Cobos Álvarez 576949a095 Bug 1591297 - Remove XBL binding loading code in the frame constructor. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D50555

--HG--
extra : moz-landing-system : lando
2019-10-25 18:46:59 +00:00
Ting-Yu Lin 914a980331 Bug 1588025 - Change an argument to nsContainerFrame* for ConstructAnonymousContentForCanvas. r=jfkthame
The only caller SetRootElementFrameAndConstructCanvasAnonContent()
already passes nsContainerFrame* to aFrame.

A minor cleanup discovered while working on this bug.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 20:40:30 +00:00
Emilio Cobos Álvarez cb5a3a5401 Bug 1578844 - Fix various issues with display: contents within svg text. r=mats
I'm not happy about all the SVG text / disallow out of flow complexity sprinkled
during frame construction... :(

Maybe we should add some kind of more generic mechanism to disallow some
children for particular kinds of frames, or something.

Co-authored-by: Mats Palmgren <mats@mozilla.com>

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

--HG--
extra : moz-landing-system : lando
2019-10-12 16:28:13 +00:00
Ting-Yu Lin 551716366d Bug 1102175 Part 1 - Propagate used writing-mode from body element to its ancestors. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D45481

--HG--
extra : moz-landing-system : lando
2019-10-10 04:44:44 +00:00
Gurzau Raul 5542cedd05 Backed out 4 changesets (bug 1102175) for Android reftest failures at font-inflation-1a.html
Backed out changeset 33914610f60f (bug 1102175)
Backed out changeset 004a0cb8af9f (bug 1102175)
Backed out changeset 2ac28b335c3c (bug 1102175)
Backed out changeset 50b041e06f23 (bug 1102175)
2019-10-10 07:40:38 +03:00
Ting-Yu Lin 1ce98223f5 Bug 1102175 Part 1 - Propagate used writing-mode from body element to its ancestors. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D45481

--HG--
extra : moz-landing-system : lando
2019-10-09 22:11:02 +00:00
Brendan Dahl c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.

Depends on D45612

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

--HG--
extra : moz-landing-system : lando
2019-10-08 23:52:14 +00:00
Mats Palmgren c784db904f Bug 1557825 part 1 - Implement 'display:block ruby'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D40211

--HG--
extra : moz-landing-system : lando
2019-08-14 14:38:31 +00:00
Mats Palmgren 71957d35f6 Bug 1038294 part 11 - Remove FindXULDisplayData and handle all display types in FindDisplayData instead. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39763

--HG--
extra : moz-landing-system : lando
2019-08-14 14:34:19 +00:00
Mats Palmgren a0e907c286 Bug 1038294 part 2 - Remove FCDATA_FOR_DISPLAY. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39754

--HG--
extra : moz-landing-system : lando
2019-08-14 14:32:36 +00:00
Ting-Yu Lin 298dd3b769 Bug 1565136 - Move some reframing logic out of WipeContainingBlock to make it done earlier. r=dholbert
Also move the duplicate logic for reframing MathML in ContentAppended()
and ContentRangeInserted() into WipeInsertionParent().

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

--HG--
extra : moz-landing-system : lando
2019-07-18 04:55:03 +00:00
Emilio Cobos Álvarez a45852130e Bug 1558352 - Ensure canvas anonymous content is always created before constructing the document element frame's children. r=TYLin
Right now that doesn't happen, so you can run into problems like the one
described in bug 1492582 comment 30 for popups.

This is a bit annoying, but it's more consistent with how regular anonymous
content works already:

  https://searchfox.org/mozilla-central/rev/0da35261b6789eec65476dbdd4913df6e235af6d/layout/base/nsCSSFrameConstructor.cpp#9644

It's still not 100% consistent, since the root element's frame would still end
up first in the frame tree, but I think that's both less important and harder to
change. I've left a comment to that effect in the code.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 10:09:28 +00:00
Jonathan Watt 5cd2b5b11e Bug 1557104. Merge nsIPageSequenceFrame and nsSimplePageSequenceFrame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D33817

--HG--
rename : layout/generic/nsSimplePageSequenceFrame.cpp => layout/generic/nsPageSequenceFrame.cpp
rename : layout/generic/nsSimplePageSequenceFrame.h => layout/generic/nsPageSequenceFrame.h
extra : rebase_source : e75b043af4dbfe4c108f2bfc0e234fd20c5af315
2019-05-22 13:01:33 +01:00
Cameron McCormack e82b3826f9 Bug 1553378 - Devirtualize calls to GetText() / TextLength() when we know we have a Text node. r=smaug,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D32100
2019-05-22 15:18:48 +10:00
Emilio Cobos Álvarez 2917763ba5 Bug 1552719 - Do some cleanup in the counter initializer code. r=mats
I thought I was going to need it but turns out I don't. Still this is worth it I
think.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 17:29:06 +00:00
Emilio Cobos Álvarez 88a1b27597 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

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

--HG--
extra : moz-landing-system : lando
2019-04-23 16:43:15 +00:00
Bogdan Tara ec489aa170 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 daef6a8b67 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

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

--HG--
extra : moz-landing-system : lando
2019-04-22 21:57:22 +00:00
Masayuki Nakano 2f9688c14e 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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:24:49 +00:00
Masayuki Nakano 9c5913211a 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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:24:29 +00:00
Ting-Yu Lin eaae9bd79d 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

--HG--
extra : moz-landing-system : lando
2019-03-30 04:45:47 +00:00
Ting-Yu Lin ce65963e68 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

--HG--
extra : moz-landing-system : lando
2019-03-30 03:25:10 +00:00
Ting-Yu Lin d87f2943bc 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

--HG--
extra : moz-landing-system : lando
2019-03-30 02:59:25 +00:00
Mats Palmgren 53f517142f 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 bff6f8a4d5 Bug 288704 part 3 - Make nsBulletFrame use the built-in 'list-item' CSS counter and remove the old implementation. r=emilio 2019-03-24 23:13:53 +01:00
Ting-Yu Lin 5bef4c66dd 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

--HG--
extra : moz-landing-system : lando
2019-03-22 02:47:32 +00:00
Ting-Yu Lin 5a67c61b32 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
2019-03-22 02:39:16 +00:00
Emilio Cobos Álvarez 87b3e6bbd3 Bug 1450652 - Remove platform support for display="" in XBL bindings. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D12586

--HG--
extra : moz-landing-system : lando
2019-03-06 00:47:13 +00:00
Emilio Cobos Álvarez f1c235dc68 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

--HG--
extra : moz-landing-system : lando
2019-03-04 17:20:29 +00:00
Ting-Yu Lin 93d595b35d 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

--HG--
extra : moz-landing-system : lando
2019-02-19 22:37:24 +00:00
Emilio Cobos Álvarez dad3a20b22 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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00:00
Ting-Yu Lin 5ec0177dc3 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

--HG--
extra : moz-landing-system : lando
2019-01-31 02:22:49 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00