Commit Graph

497 Commits

Author SHA1 Message Date
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
Emily McDonough
6daba7a948 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-18 22:59:58 +00:00
Chris Fronk
5f4d7b6abf Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
2020-03-17 12:42:12 +00:00
Mats Palmgren
bfe514570c Bug 1613210 - Delegate intrinsic size calls to the first continuation for nsGridContainerFrames. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D65643
2020-03-17 09:55:39 +00:00
Ting-Yu Lin
807ebe1c6c 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
2020-03-12 21:50:23 +00:00
shindli
acf53819f5 Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE 2020-03-11 14:30:54 +02:00
Chris Fronk
3949093799 Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
2020-03-11 12:18:13 +00:00
Mats Palmgren
65f89a20bf Bug 1618312 - [css-grid] Use the outermost frame to check the computed position value since we don't inherit that to anonymous frames. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D64851
2020-03-02 15:51:24 +00:00
Mats Palmgren
8923e9d49c Bug 1618351 - Floor subgrid auto-fill repeat count at zero to avoid underflow of unsigned integer mRepeatAutoEnd. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D64637
2020-02-27 21:44:04 +00:00
Mats Palmgren
78f929fe17 Bug 1608851 - Only an actual <track-list> guarantees a track (not an ignored 'subgrid' value). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D64452
2020-02-27 05:47:59 +00:00
Martin McNickle
e49e042165 Bug 1615380 - Part 2 - Use the cbindgen output for GridAutoFlow directly in gecko. r=emilio
Depends on D62787

Differential Revision: https://phabricator.services.mozilla.com/D62910
2020-02-14 15:48:10 +00:00
Chris Fronk
ceb96a9f94 Bug 1614432 - Remove redundant nested #IF r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D62529
2020-02-12 02:28:30 +00:00
Emilio Cobos Álvarez
c7c1186c47 Bug 1613349 - Rename nsIFrame::DeleteProperty to RemoveProperty. r=dholbert
As it doesn't necessarily call delete and that may be confusing.

Differential Revision: https://phabricator.services.mozilla.com/D61764
2020-02-06 16:06:49 +00:00
Daniel Holbert
bab3c53bab Bug 1613192: Fix non-unified build bustage in layout/{base,generic} directories. r=TYLin
Summary of the changes/reasons:

- LayoutTelemetryTools.h directly uses several types whose headers it needs to
  include. (These includes were present in its .cpp file; I'm migrating them
  from there to the .h file, and I'm adding a new include for "Saturate.h" to
  provide the SaturateUint8 type.)

- LayoutTelemetryTools.cpp needs an include for MainThreadUtils.h, to provide
  NS_IsMainThread().

- StaticPresData.cpp needs an include for ServoUtils.h, to provide
  AssertIsMainThreadOrServoFontMetricsLocked().

- ZoomConstraintsClient.h needs a forward-decl for mozilla::dom::Document since
  it uses a pointer of that type in a function-decl.

- ScrollSnap.h needs forward-decls of nsPoint/nsRect for some references to
  those types in a method signature.

- nsGridContainerFrame.cpp needs an include for nsBoxLayoutState.h since it
  uses that type (it instantiates a nsBoxLayoutState instance).

- nsPlaceholderFrame.cpp needs a "using" decl for the mozilla::dom namespace in
  order to use the un-namespace-prefixed "Element" type.

Differential Revision: https://phabricator.services.mozilla.com/D61603
2020-02-04 19:34:51 +00:00
Emilio Cobos Álvarez
a0eda86c37 Bug 1611583 - Use cbindgen for css-align types. r=dholbert
This provides stronger typing and removes a bunch of subtle constants matching.

Differential Revision: https://phabricator.services.mozilla.com/D61058
2020-01-31 00:56:49 +00:00
Emily McDonough
1b5f203097 Bug 1611950 - Make constructor of CellMap::Cell constexpr r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D61179
2020-01-29 06:34:48 +00:00
Mats Palmgren
f650b79acb Bug 1606516 - Inhibit subgridding a parent axis that has no tracks. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D60566
2020-01-25 02:45:31 +00:00
Mats Palmgren
0ec1080a33 Bug 1610362 - Floor track sizes to zero after adjusting for subgrid margin+border+padding. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D60565
2020-01-25 02:20:28 +00:00
Emilio Cobos Álvarez
98b23176f7 Bug 1597055 - Don't stretch grid items with non-auto block-size. r=mats
Per the resolution in https://github.com/w3c/csswg-drafts/issues/4525.

Differential Revision: https://phabricator.services.mozilla.com/D60675
2020-01-25 20:14:59 +00:00
Emilio Cobos Álvarez
ceb8348f27 Bug 1609996 - Remove mozilla::Swap in favor of std::swap. r=froydnj
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?

Differential Revision: https://phabricator.services.mozilla.com/D60297
2020-01-20 16:17:06 +00:00
Emily McDonough
835042e907 Bug 1341507 - Refactor auto-fit empty track calculations into a separate method r=mats
Differential Revision: https://phabricator.services.mozilla.com/D58026
2020-01-16 04:27:33 +00:00
Emily McDonough
a6493c309a Bug 1606485 - Check containing parent frames for 'contain:layout/paint' in grid container frames. r=emilio
This prevents grid container frames from being considered subgrid (even when
they have contain:layout/paint) when they are themselves a grid item of a
contain grid.

Differential Revision: https://phabricator.services.mozilla.com/D59790
2020-01-14 01:06:56 +00:00
Emily McDonough
c90475552a Bug 1607952 - Avoid using both std::move and a method on the same variable for getting the number of explicit tracks for ComputedGridTrackInfo r=emilio
The order of argument evaluation is implementation-defined, so we can't trust
whether the .Length() or the std::move() will get executed first. This is OK
right now since the constructor takes the argument by rvalue and so it can't be
emptied out before the .Length() call. However, a change to the types in the
constructor's argument list could make this still compile, but then depend on
compiler-dependent argument evaluation order to get the correct result.

Differential Revision: https://phabricator.services.mozilla.com/D59238
2020-01-09 00:29:08 +00:00
Emily McDonough
79685468e6 Bug 1341507 - Refactor TrackSizingFunctions::mRepeatEndDelta to be a getter function rather than a variable. r=emilio
The information in it is always derivable from the values of mRepeatAutoStart
and mRepeatAutoEnd. Additionally, its value is used in some cases where it has
not yet been set properly (such as CalculateRepeatFillCount).

This works out currently because the default value is zero we only accept
repeat(auto-fill, ...) and repeat(auto-fit, ...) CSS values that have a single
element in the repeat. In that case, zero is the correct value for
RepeatEndDelta.

Differential Revision: https://phabricator.services.mozilla.com/D58871
2020-01-07 00:50:58 +00:00