mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Issue #1838 - Part 2: Remove grid- prefix from grid-(column|row)-gap properties
This removes the `grid` prefix from the gap-related properties of grid since they are now part of the box alignment specification. Former grid-gap* properties were aliased to the unprefixed properties to maintain compatibility. The previously multi-column layout only `column-gap` property has been modified to apply to the Grid layout (and Flexbox in a following commit), moving the `mColumnGap` member variable from `nsStyleColumn` to `nsStylePosition`. Notes: * Bug 1398537 - support for percent values in column-gap for multi-column layout landed as part of Issue #1230. However, it was incomplete because it did not update `nsRuleNode` to allow transformation of percentage values for `column-gap`. This was consequently fixed as part of this commit. * Bug 1456166 - this might not apply because we don't have that devtools test in UXP * `nsRuleNode`, `nsCSSParser`, `Declaration`, and other related classes were merged into Stylo. These should be taken into consideration when porting patches from Mozilla. Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1398482
This commit is contained in:
parent
4f059d2c8b
commit
b4f2c83687
13 changed files with 103 additions and 121 deletions
|
|
@ -1249,13 +1249,13 @@ Declaration::GetPropertyValueInternal(
|
|||
// #3 [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>
|
||||
case eCSSProperty_grid: {
|
||||
const nsCSSValue& columnGapValue =
|
||||
*data->ValueFor(eCSSProperty_grid_column_gap);
|
||||
*data->ValueFor(eCSSProperty_column_gap);
|
||||
if (columnGapValue.GetUnit() != eCSSUnit_Pixel ||
|
||||
columnGapValue.GetFloatValue() != 0.0f) {
|
||||
return; // Not serializable, bail.
|
||||
}
|
||||
const nsCSSValue& rowGapValue =
|
||||
*data->ValueFor(eCSSProperty_grid_row_gap);
|
||||
*data->ValueFor(eCSSProperty_row_gap);
|
||||
if (rowGapValue.GetUnit() != eCSSUnit_Pixel ||
|
||||
rowGapValue.GetFloatValue() != 0.0f) {
|
||||
return; // Not serializable, bail.
|
||||
|
|
@ -1475,7 +1475,7 @@ Declaration::GetPropertyValueInternal(
|
|||
}
|
||||
MOZ_FALLTHROUGH;
|
||||
}
|
||||
case eCSSProperty_grid_gap: {
|
||||
case eCSSProperty_gap: {
|
||||
const nsCSSPropertyID* subprops =
|
||||
nsCSSProps::SubpropertyEntryFor(aProperty);
|
||||
MOZ_ASSERT(subprops[2] == eCSSProperty_UNKNOWN,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue