From 0c37c0db8f3ad975a24717c6b34fdc83db1967ad Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 30 Dec 2022 22:37:02 +0000 Subject: [PATCH] Issue #2075 - Part 1: Rename offset-* logical properties to inset-* This adds aliases behind a pref with the old offset-* names --- layout/style/nsCSSPropAliasList.h | 16 ++++++++++++++++ layout/style/nsCSSPropList.h | 24 ++++++++++++------------ modules/libpref/init/all.js | 4 ++++ 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/layout/style/nsCSSPropAliasList.h b/layout/style/nsCSSPropAliasList.h index 1881c22d9d..2b95974ab7 100644 --- a/layout/style/nsCSSPropAliasList.h +++ b/layout/style/nsCSSPropAliasList.h @@ -50,6 +50,22 @@ CSS_PROP_ALIAS(word-wrap, overflow_wrap, WordWrap, "") +CSS_PROP_ALIAS(offset-block-start, + inset_block_start, + OffsetBlockStart, + "layout.css.offset-logical-properties.enabled") +CSS_PROP_ALIAS(offset-block-end, + inset_block_end, + OffsetBlockEnd, + "layout.css.offset-logical-properties.enabled") +CSS_PROP_ALIAS(offset-inline-start, + inset_inline_start, + OffsetInlineStart, + "layout.css.offset-logical-properties.enabled") +CSS_PROP_ALIAS(offset-inline-end, + inset_inline_end, + OffsetInlineEnd, + "layout.css.offset-logical-properties.enabled") CSS_PROP_ALIAS(-moz-transform-origin, transform_origin, MozTransformOrigin, diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index ae5de51e5a..bd749df5b4 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -2979,9 +2979,9 @@ CSS_PROP_POSITION( offsetof(nsStylePosition, mObjectPosition), eStyleAnimType_Custom) CSS_PROP_LOGICAL( - offset-block-end, - offset_block_end, - OffsetBlockEnd, + inset-block-end, + inset_block_end, + InsetBlockEnd, CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_STORES_CALC | CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | @@ -2996,9 +2996,9 @@ CSS_PROP_LOGICAL( CSS_PROP_NO_OFFSET, eStyleAnimType_None) CSS_PROP_LOGICAL( - offset-block-start, - offset_block_start, - OffsetBlockStart, + inset-block-start, + inset_block_start, + InsetBlockStart, CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_STORES_CALC | CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | @@ -3012,9 +3012,9 @@ CSS_PROP_LOGICAL( CSS_PROP_NO_OFFSET, eStyleAnimType_None) CSS_PROP_LOGICAL( - offset-inline-end, - offset_inline_end, - OffsetInlineEnd, + inset-inline-end, + inset_inline_end, + InsetInlineEnd, CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_STORES_CALC | CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | @@ -3028,9 +3028,9 @@ CSS_PROP_LOGICAL( CSS_PROP_NO_OFFSET, eStyleAnimType_None) CSS_PROP_LOGICAL( - offset-inline-start, - offset_inline_start, - OffsetInlineStart, + inset-inline-start, + inset_inline_start, + InsetInlineStart, CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_STORES_CALC | CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH | diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 8e9a780512..209603f1ef 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2570,6 +2570,10 @@ pref("layout.css.background-blend-mode.enabled", true); // Is support for background-clip:text enabled? pref("layout.css.background-clip-text.enabled", true); +// Is support for the non-standard offset-* logical property aliases enabled? +// These map to their inset-* equivalents. +pref("layout.css.offset-logical-properties.enabled", true); + // Is support for CSS text-combine-upright (tate-chu-yoko) enabled? pref("layout.css.text-combine-upright.enabled", true); // Is support for CSS text-combine-upright: digits 2-4 enabled?