Commit Graph

520 Commits

Author SHA1 Message Date
Simon Giesecke
1fbb2b245e Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli
c5adcfe981 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke
9d2e516112 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Brad Werth
904dcb52e9 Bug 1648774 Part 1: Make GetFlexFrameWithComputedInfo work for nsFieldSetFrame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D84626
2020-07-23 19:29:37 +00:00
Simon Giesecke
a69d79b6db Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kagami Sascha Rosylight
a73150a63b Bug 1647525 - Use HasAnyStateBits() in nsGridContainerFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81203
2020-06-27 13:17:04 +00:00
Ting-Yu Lin
b7f4b2d2c3 Bug 1648673 - Remove duplicate CSSOrderAwareFrameIteratorT typedefs in nsGridContainerFrame.h r=dholbert
* It's easier to maintain the type aliases of in one place, i.e.
CSSOrderAwareFrameIterator.h, and the iterator's header itself doesn't
include a lot of headers that add complex dependencies to
nsGridContainerFrame.h.

* Make "jump to definition" functionality in editors work
correctly (rather than just jumping to those declarations.)

Differential Revision: https://phabricator.services.mozilla.com/D81281
2020-06-26 16:51:40 +00:00
Emily McDonough
8ace2e6bfd Bug 1633737 - Fix asserts and array accesses for oversized grid tracks with repeat-auto r=emilio
Handle grid track lists that are too large in CalculateRepeatFillCount. Check
for repeat tracks that begin or end past the maximum track limit in
InitRepeatTracks, and handle the possible size mismatch in nsComputedDOMStyle.

This may result in there being fewer than the maximum number of tracks again
after removing empty tracks in a repeat(auto-fit), but only limiting the track
count after removing empty tracks would leave the number of repeat tracks
unbounded (or require a separate limit on just the repeat track count).

Differential Revision: https://phabricator.services.mozilla.com/D76191
2020-06-24 18:25:08 +00:00
Brindusan Cristian
cde1552292 Backed out changeset a59280f412c0 (bug 1633737) for crashtest assertion failures at nsGridContainerFrame.cpp. CLOSED TREE 2020-06-18 04:16:09 +03:00
Emily McDonough
a6203ecaf9 Bug 1633737 - Fix asserts and array accesses for oversized grid tracks with repeat-auto r=emilio
Handle grid track lists that are too large in CalculateRepeatFillCount. Check
for repeat tracks that begin or end past the maximum track limit in
InitRepeatTracks, and handle the possible size mismatch in nsComputedDOMStyle.

This may result in there being fewer than the maximum number of tracks again
after removing empty tracks in a repeat(auto-fit), but only limiting the track
count after removing empty tracks would leave the number of repeat tracks
unbounded (or require a separate limit on just the repeat track count).

Differential Revision: https://phabricator.services.mozilla.com/D76191
2020-06-17 23:25:14 +00:00
Brad Werth
133ef314b0 Bug 1644498: Transition devtools nsFrameStateBits to nsIFrame.h r=heycam
This patch takes the flags NS_STATE_GRID_GENERATE_COMPUTED_VALUES and
NS_STATE_FLEX_GENERATE_COMPUTED_VALUES and combines them into a single new
flag that is defined in nsIFrame.h, with accessors.

Differential Revision: https://phabricator.services.mozilla.com/D78978
2020-06-10 05:03:35 +00:00
Csoregi Natalia
bc40e8720a Backed out changeset f73a200460d9 (bug 1644498) for crashes on nsGridContainerFrame. CLOSED TREE 2020-06-10 03:54:24 +03:00
Brad Werth
0a39f055ca Bug 1644498: Transition devtools nsFrameStateBits to nsIFrame.h r=heycam
This patch takes the flags NS_STATE_GRID_GENERATE_COMPUTED_VALUES and
NS_STATE_FLEX_GENERATE_COMPUTED_VALUES and combines them into a single new
flag that is defined in nsIFrame.h, with accessors.

Differential Revision: https://phabricator.services.mozilla.com/D78978
2020-06-09 23:01:00 +00:00
Simon Giesecke
dadc67553a Bug 1644403 - Fix inconsistent uses of CopyableAutoTArray and Clone. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78893
2020-06-09 14:27:20 +00:00
Ting-Yu Lin
65ee5608ba Bug 1643173 Part 2 - Unify GetDisplayFlag helpers for flex and grid items. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D78167
2020-06-05 02:52:58 +00:00
Ting-Yu Lin
67b9888968 Bug 1643173 Part 1 - Convert enum nsIFrame::DISPLAY_CHILD_* to enum class. r=dholbert
The modifications are all straightforward conversion except the one in
nsMathMLContainerFrame, where it is simplified by calling the equivalent
BuildDisplayListForInline() helper.

Differential Revision: https://phabricator.services.mozilla.com/D78166
2020-06-05 02:52:05 +00:00
Ting-Yu Lin
8160b0a990 Bug 1641739 - Reduce the support child list types for flex / grid container's frame list manipulation methods. r=mats
These flex / grid's methods are implemented by delegating to
nsContainerFrame's methods. We shouldn't assume they can support more
child list types than the ones supported in nsContainerFrame's methods.

- NoteNewChildren is a helper for flex and grid's AppendFrame and
InsertFrames, and nsContainerFrame::{AppendFrame,InsertFrames} supports
only kPrincipalList and kNoReflowPrincipalList.

- nsContainerFrame::RemoveFrame supports only kPrincipalList and
kNoReflowPrincipalList.

- nsContainerFrame::SetInitialChildList supports only kPrincipalList and
kBackdropList.

Differential Revision: https://phabricator.services.mozilla.com/D77391
2020-06-01 18:22:03 +00:00
Ting-Yu Lin
d3e31f1c11 Bug 1640275 Part 1 - Move some nsGridContainerFrame's helper methods to nsContainerFrame. r=mats
In the next part, I'll extend these helpers, and use them in
nsFlexContainerFrame.

Differential Revision: https://phabricator.services.mozilla.com/D77203
2020-05-28 18:03:11 +00:00
Ting-Yu Lin
a207061a1e Bug 1622935 Part 2 - Move nsGridContainerFrame's NormalizeChildLists() and related helpers to nsContainerFrame. r=mats
Also, add relevant bits to be able to use them in the flex container.

Differential Revision: https://phabricator.services.mozilla.com/D73166
2020-05-01 23:34:22 +00:00
Emily McDonough
41188cc13d Bug 1629575 - [css-grid] Initialize LineNameMap::mTemplateLinesEnd correctly also when a repeat(auto-fill/fit) has more than one track. r=mats
This only occurred when a grid with a repeat with multiple values was used.
Also Add crashtests for this case, and update some comments on LineNameMap's
fields while we are here.

Differential Revision: https://phabricator.services.mozilla.com/D71242
2020-05-07 18:27:30 +00:00
Bogdan Tara
ccd79e6adb Backed out changeset 0c1494c8c04a (bug 1629575) by alaskanemily's request 2020-05-07 03:07:20 +03:00
Emily McDonough
1c9d652eff Bug 1629575 - Fix incorrect grid template size in the line name map r=mats
This only occurred when a grid with a repeat with multiple values was used.

Differential Revision: https://phabricator.services.mozilla.com/D71242
2020-05-06 22:20:09 +00:00
Emily McDonough
77d7fe81d8 Bug 1628041 - Use fill length rather than index to indicate a repeat(auto) in subgrid from Servo r=mats
Differential Revision: https://phabricator.services.mozilla.com/D70066
2020-05-06 19:35:03 +00:00
Simon Giesecke
e589800b47 Bug 1626570 - Improve handling of copying arrays in layout/generic/. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D72353
2020-05-05 10:11:01 +00:00
Mats Palmgren
09d34831d0 Bug 1633720 - [css-grid-2] Adjust the grid area stored in the Subgrid property as well for removed 'auto-fit' tracks in the parent. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D73007
2020-04-30 11:34:20 +00:00
Mats Palmgren
c3c42e3539 Bug 1607954 part 2 - [css-grid][css-align] Implement Masonry layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D67062
2020-04-28 01:18:47 +00:00
Simon Giesecke
b6783ee13c Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D71300
2020-04-24 13:35:27 +00:00
L. David Baron
df7fe43daf Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 23:52:08 +00:00
Stefan Hindli
e00598b7d5 Backed out 3 changesets (bug 1631941) for mass build bustages CLOSED TREE
Backed out changeset 8a7e21f2b5f9 (bug 1631941)
Backed out changeset 6a53d6f1ec95 (bug 1631941)
Backed out changeset 91ac0b7e571b (bug 1631941)
2020-04-23 02:14:30 +03:00
L. David Baron
7571ae9a34 Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 17:54:28 +00:00
Stefan Hindli
5c01988907 Backed out 3 changesets (bug 1631941) for causing valgrind bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/WritingModes CLOSED TREE
Backed out changeset 17391a8c2a05 (bug 1631941)
Backed out changeset b0b425ffb6e9 (bug 1631941)
Backed out changeset f4c1d7dcca50 (bug 1631941)
2020-04-22 20:13:06 +03:00
L. David Baron
92208d6042 Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 15:55:54 +00:00
Ting-Yu Lin
c7ce1d06d2 Bug 1625362 Part 3 - Extract grid container's PushIncompleteChildren logic, and move it to nsContainerFrame. r=mats
I left all the bits that related to grid container, such as setting
aStatus, NS_STATE_GRID_DID_PUSH_ITEMS, and aState.mIter in
nsGridContainerFrame::ReflowRowsInFragmentainer().

Differential Revision: https://phabricator.services.mozilla.com/D68492
2020-04-15 18:31:35 +00:00
Ting-Yu Lin
e40fcdac72 Bug 1625362 Part 2 - Move some helpers manipulating overflow lists from nsGridContainerFrame to nsContainerFrame. r=mats
We can utilize these helpers to implement flex item fragmentation.

Differential Revision: https://phabricator.services.mozilla.com/D68491
2020-04-15 18:31:33 +00:00
Ting-Yu Lin
0b0ceb3609 Bug 1625362 Part 1 - Move ReparentFrame and ReparentFrames into nsContainerFrame. r=mats
We have duplicated ReparentFrame and ReparentFrames define in both
nsBlockFrame and nsGridContainerFrame. We should move them into
nsContainerFrame.

Differential Revision: https://phabricator.services.mozilla.com/D68490
2020-04-15 18:31:25 +00:00
Emily McDonough
e2d18f320c Bug 1628837 - Add subgrid property address to nsGridContainerFrame frame dump output r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70436
2020-04-09 21:25:12 +00:00
Emily McDonough
6410454baf Bug 1624756 - Use EmplaceBack instead of AppendElement(std::make_pair) in TrackSizingFunction::ExpandNonRepeatAutoTracks r=mats
Differential Revision: https://phabricator.services.mozilla.com/D68130
2020-03-31 16:36:26 +00:00
Emily McDonough
8f2dbea970 Bug 1625051 Part 1 - Fix calculation of maximum repeat count for grid repeat(auto) r=mats
Differential Revision: https://phabricator.services.mozilla.com/D68488
2020-03-30 23:46:41 +00:00
André Bargull
8d313f66e1 Bug 1625138 - Part 35: Replace mozilla::TrueType with std::true_type. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68554
2020-03-28 13:57:20 +00:00
Ting-Yu Lin
73280728ea Bug 1624514 Part 2 - Generalize nsIFrame::ContentBSize() to be ContentSize(). r=AlaskanEmily
To get the logical content size of a frame, some callers use
GetContentRectRelativeToSelf().Size() and then convert it to
LogicalRect. We really should generalize ContentBSize(), and provide
ContentSize() for such purpose.

Differential Revision: https://phabricator.services.mozilla.com/D68065
2020-03-25 18:12:25 +00:00
Emily McDonough
737fc77b57 Bug 1341507 part 6 - Enable multiple grid repeat values in Servo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60931
2020-03-19 22:11:48 +00:00
Emily McDonough
6bf8fdc067 Bug 1341507 part 5 - Support multiple tracks in repeat-auto in line name maps r=mats
This includes when using subgrid layout.

Differential Revision: https://phabricator.services.mozilla.com/D60930
2020-03-19 22:11:45 +00:00
Emily McDonough
5699616121 Bug 1341507 part 4 - Add auto-fill length field to line name lists returned from Servo. r=mats,emilio
Rename fill_idx to fill_start, to indicate it is not a single value but a
range. Also change a numeric_limits<>::max() involving the fill_start to use
decltype() to ensure its type matches that of the auto-generated structure's
field, while we're touching that code.

The test to ensure only a single repeat value is allowed will be removed by a
later commit.

Differential Revision: https://phabricator.services.mozilla.com/D60929
2020-03-19 22:11:43 +00:00
Emily McDonough
dbcc8c7643 Bug 1341507 part 3 - Support multiple repeat values when getting the sizing of a track by index. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D60928
2020-03-19 22:11:35 +00:00
Emily McDonough
0091d09cc2 Bug 1341507 part 2 - Take multiple repeat track sizes into account when computing how many repetitions will fit. r=mats
This also means that the result of CalculateRepeatFillCount is specified to be
a number of repetitions of all repeat tracks, not the total number of tracks.

Differential Revision: https://phabricator.services.mozilla.com/D60927
2020-03-19 22:35:48 +00:00
Stefan Hindli
0680c79b3b Backed out 7 changesets (bug 1341507) for mochitest failures in dom/grid/test/chrome/test_grid_repeat_auto_fill.html CLOSED TREE
Backed out changeset e4e968fabe2b (bug 1341507)
Backed out changeset 6cafdef7eb79 (bug 1341507)
Backed out changeset eff4ad47440c (bug 1341507)
Backed out changeset 55432ee0cd4b (bug 1341507)
Backed out changeset e798ebf91eca (bug 1341507)
Backed out changeset 08d38f05b160 (bug 1341507)
Backed out changeset 6b35af9ecb38 (bug 1341507)
2020-03-19 02:49:17 +02:00
Emily McDonough
401f825550 Bug 1341507 part 6 - Enable multiple grid repeat values in Servo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60931
2020-03-18 22:44:41 +00:00
Emily McDonough
6ba29486a6 Bug 1341507 part 5 - Support multiple tracks in repeat-auto in line name maps r=mats
This includes when using subgrid layout.

Differential Revision: https://phabricator.services.mozilla.com/D60930
2020-03-18 23:01:23 +00:00
Emily McDonough
11b56a60e7 Bug 1341507 part 4 - Add auto-fill length field to line name lists returned from Servo. r=mats,emilio
Rename fill_idx to fill_start, to indicate it is not a single value but a
range. Also change a numeric_limits<>::max() involving the fill_start to use
decltype() to ensure its type matches that of the auto-generated structure's
field, while we're touching that code.

The test to ensure only a single repeat value is allowed will be removed by a
later commit.

Differential Revision: https://phabricator.services.mozilla.com/D60929
2020-03-18 22:44:36 +00:00
Emily McDonough
afd7ee88ca Bug 1341507 part 3 - Support multiple repeat values when getting the sizing of a track by index. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D60928
2020-03-18 22:44:34 +00:00