Calculate the correct baseline sharing group for grid items that are
baseline aligned. The calculation uses the algorithm from the spec here:
https://drafts.csswg.org/css-align-3/#baseline-export
In addition to corrently determining the baseline sharing group, the
baseline calculation can also be simplified.
Once we have the new baseline, we can use it in the alignment function,
which now has to take into account whether the baseline alignment
affected the side on which the item is aligned from.
For the additional test failure, it happens in subgrid and we use to
fail 11 of the 12 tests, now failing all 12, so likely we passed it by
accident.
Differential Revision: https://phabricator.services.mozilla.com/D253202
Calculate the correct baseline sharing group for grid items that are
baseline aligned. The calculation uses the algorithm from the spec here:
https://drafts.csswg.org/css-align-3/#baseline-export
In addition to corrently determining the baseline sharing group, the
baseline calculation can also be simplified.
Once we have the new baseline, we can use it in the alignment function,
which now has to take into account whether the baseline alignment
affected the side on which the item is aligned from.
For the additional test failure, it happens in subgrid and we use to
fail 11 of the 12 tests, now failing all 12, so likely we passed it by
accident.
Differential Revision: https://phabricator.services.mozilla.com/D253202
Also implement the alignment safety behaviour that is described as "in-between"
[1].
This is mutually exclusive to `PLACEHOLDER_STATICPOS_NEEDS_CSSALIGN` related computation,
since it involves requiring CSS alignment to compute the static position when inset
values are auto, for grid & flex boxes.
[1] https://drafts.csswg.org/css-position-3/#abspos-layout
Differential Revision: https://phabricator.services.mozilla.com/D226531
Also implement the alignment safety behaviour that is described as "in-between"
[1].
This is mutually exclusive to `PLACEHOLDER_STATICPOS_NEEDS_CSSALIGN` related computation,
since it involves requiring CSS alignment to compute the static position when inset
values are auto, for grid & flex boxes.
[1] https://drafts.csswg.org/css-position-3/#abspos-layout
Differential Revision: https://phabricator.services.mozilla.com/D226531
LogicalAxis is one of the Logical* enums. Converting it from enum to
enum class increases type safety. To run with the pre-existing code,
type casting was added when needed. Comments have been edited where
needed.
Differential Revision: https://phabricator.services.mozilla.com/D206108
It's straightforward to determine which writing mode is required to pass
to ComputedLogicalMargin() by looking at any subsequent method called on
the margin.
For example, if we see
```
ComputedLogicalMargin().BStartEnd(wm);
```
the writing mode needed to pass to `ComputedLogicalMargin()` is `wm`.
Differential Revision: https://phabricator.services.mozilla.com/D95661
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.
Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:
* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.
Differential Revision: https://phabricator.services.mozilla.com/D56440
Per the discussion in:
https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ
They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.
For the ones that already used `e` or `k` prefixes, I've mostly done:
for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done
For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.
Depends on D28680
Differential Revision: https://phabricator.services.mozilla.com/D28681
Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.
This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.
I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.
Differential Revision: https://phabricator.services.mozilla.com/D17739
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py
For every file that is modified in this patch, the changes are as follows:
(1) The patch changes the file to use the exact C++ mode lines from the
Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line
(2) The patch deletes any blank lines between the mode line & the MPL
boilerplate comment.
(3) If the file previously had the mode lines and MPL boilerplate in a
single contiguous C++ comment, then the patch splits them into
separate C++ comments, to match the boilerplate in the coding style.
MozReview-Commit-ID: EuRsDue63tK