summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-04-17 17:31:01 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-17 17:31:01 +0000
commitf4e8585e6059cca4e48859caa2b16f28db874aca (patch)
treea50c42d7fe985077f1fe65ce862c2bb88338d93c
parentcc231f0a26bab354874ab4149d415fce73d99b8e (diff)
parent86b17cfb4a1e92591bcdf87e27cd76276664ae88 (diff)
downloaduxp-f4e8585e6059cca4e48859caa2b16f28db874aca.tar.gz
Merge pull request 'Follow-up: Prevent grid shorthand from resetting gutter properties' (#1871) from FranklinDM/UXP-contrib:work_css-grid-noreset-gutter-followup into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1871
-rw-r--r--layout/style/Declaration.cpp12
-rw-r--r--layout/style/nsCSSParser.cpp7
2 files changed, 0 insertions, 19 deletions
diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp
index 9e7a01aff5..29cae7a3b6 100644
--- a/layout/style/Declaration.cpp
+++ b/layout/style/Declaration.cpp
@@ -1248,18 +1248,6 @@ Declaration::GetPropertyValueInternal(
// #2 <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>?
// #3 [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>
case eCSSProperty_grid: {
- const nsCSSValue& columnGapValue =
- *data->ValueFor(eCSSProperty_column_gap);
- if (columnGapValue.GetUnit() != eCSSUnit_Pixel ||
- columnGapValue.GetFloatValue() != 0.0f) {
- return; // Not serializable, bail.
- }
- const nsCSSValue& rowGapValue =
- *data->ValueFor(eCSSProperty_row_gap);
- if (rowGapValue.GetUnit() != eCSSUnit_Pixel ||
- rowGapValue.GetFloatValue() != 0.0f) {
- return; // Not serializable, bail.
- }
const nsCSSValue& areasValue =
*data->ValueFor(eCSSProperty_grid_template_areas);
const nsCSSValue& columnsValue =
diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
index 720a123d51..2ba1e9b7f3 100644
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -9710,13 +9710,6 @@ CSSParserImpl::ParseGrid()
return true;
}
- // https://drafts.csswg.org/css-grid/#grid-shorthand
- // "Also, the gutter properties are reset by this shorthand,
- // even though they can't be set by it."
- value.SetFloatValue(0.0f, eCSSUnit_Pixel);
- AppendValue(eCSSProperty_row_gap, value);
- AppendValue(eCSSProperty_column_gap, value);
-
// [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>
auto res = ParseGridShorthandAutoProps(NS_STYLE_GRID_AUTO_FLOW_ROW);
if (res == CSSParseResult::Error) {