summaryrefslogtreecommitdiffstats
path: root/layout/style
diff options
context:
space:
mode:
Diffstat (limited to 'layout/style')
-rw-r--r--layout/style/nsCSSParser.cpp16
-rw-r--r--layout/style/nsCSSPropList.h14
-rw-r--r--layout/style/nsCSSProps.cpp2
-rw-r--r--layout/style/nsComputedDOMStyle.cpp16
-rw-r--r--layout/style/nsComputedDOMStyle.h1
-rw-r--r--layout/style/nsComputedDOMStylePropertyList.h1
-rw-r--r--layout/style/nsStyleConsts.h2
-rw-r--r--layout/style/nsTransitionManager.cpp1
-rw-r--r--layout/style/res/forms.css1
-rw-r--r--layout/style/test/property_database.js2
10 files changed, 47 insertions, 9 deletions
diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
index a8309314f..556e35406 100644
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -1056,6 +1056,7 @@ protected:
bool ParseOneFamily(nsAString& aFamily, bool& aOneKeyword, bool& aQuoted);
bool ParseFamily(nsCSSValue& aValue);
bool ParseFontFeatureSettings(nsCSSValue& aValue);
+ bool ParseFontVariationSettings(nsCSSValue& aValue);
bool ParseFontSrc(nsCSSValue& aValue);
bool ParseFontSrcFormat(InfallibleTArray<nsCSSValue>& values);
bool ParseFontRanges(nsCSSValue& aValue);
@@ -12092,6 +12093,8 @@ CSSParserImpl::ParseSingleValuePropertyByFunction(nsCSSValue& aValue,
return ParseFontVariantNumeric(aValue);
case eCSSProperty_font_feature_settings:
return ParseFontFeatureSettings(aValue);
+ case eCSSProperty_font_variation_settings:
+ return ParseFontVariationSettings(aValue);
case eCSSProperty_font_weight:
return ParseFontWeight(aValue);
case eCSSProperty_image_orientation:
@@ -15315,6 +15318,19 @@ CSSParserImpl::ParseFontFeatureSettings(nsCSSValue& aValue)
return true;
}
+bool
+CSSParserImpl::ParseFontVariationSettings(nsCSSValue& aValue)
+{
+ // TODO: Actually implement this.
+
+ // This stub is here because websites insist on considering this
+ // very hardware-dependent and O.S.-variable low-level font-control
+ // as a "critical feature" which it isn't as there is 0 guarantee
+ // that font variation settings are supported or honored by any
+ // operating system used by the client.
+ return true;
+}
+
bool
CSSParserImpl::ParseListStyle()
{
diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h
index 07db6d3dd..411f982a4 100644
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -2037,6 +2037,20 @@ CSS_PROP_FONT(
CSS_PROP_NO_OFFSET,
eStyleAnimType_Discrete)
CSS_PROP_FONT(
+ font-variation-settings,
+ font_variation_settings,
+ FontVariationSettings,
+ CSS_PROPERTY_PARSE_VALUE |
+ CSS_PROPERTY_VALUE_PARSER_FUNCTION |
+ CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
+ CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
+ CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
+ "layout.css.font-variations.stub",
+ 0,
+ nullptr,
+ CSS_PROP_NO_OFFSET,
+ eStyleAnimType_Discrete)
+CSS_PROP_FONT(
font-weight,
font_weight,
FontWeight,
diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp
index ac2978c27..289a16ecd 100644
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -2189,8 +2189,6 @@ const KTableEntry nsCSSProps::kUserFocusKTable[] = {
const KTableEntry nsCSSProps::kUserInputKTable[] = {
{ eCSSKeyword_none, StyleUserInput::None },
- { eCSSKeyword_enabled, StyleUserInput::Enabled },
- { eCSSKeyword_disabled, StyleUserInput::Disabled },
{ eCSSKeyword_auto, StyleUserInput::Auto },
{ eCSSKeyword_UNKNOWN, -1 }
};
diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp
index 647f7f6dc..910c1de8a 100644
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -674,9 +674,9 @@ nsComputedDOMStyle::UpdateCurrentStyleSources(bool aNeedsLayoutFlush)
mPresShell->GetPresContext()->GetRestyleGeneration();
if (mStyleContext) {
- // We can't rely on the undisplayed restyle generation if mElement is
- // out-of-document, since that generation is not incremented for DOM changes
- // on out-of-document elements.
+ // We can't rely on the undisplayed restyle generation if mElement is
+ // out-of-document, since that generation is not incremented for DOM changes
+ // on out-of-document elements.
if (mStyleContextGeneration == currentGeneration &&
mElement->IsInComposedDoc()) {
// Our cached style context is still valid.
@@ -1620,6 +1620,16 @@ nsComputedDOMStyle::DoGetFontFeatureSettings()
}
already_AddRefed<CSSValue>
+nsComputedDOMStyle::DoGetFontVariationSettings()
+{
+ // TODO: This is still a stub, always returning "normal"
+ RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
+
+ val->SetIdent(eCSSKeyword_normal);
+ return val.forget();
+}
+
+already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetFontKerning()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h
index 7fbf49afe..e94d8dbf6 100644
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -251,6 +251,7 @@ private:
already_AddRefed<CSSValue> DoGetColor();
already_AddRefed<CSSValue> DoGetFontFamily();
already_AddRefed<CSSValue> DoGetFontFeatureSettings();
+ already_AddRefed<CSSValue> DoGetFontVariationSettings();
already_AddRefed<CSSValue> DoGetFontKerning();
already_AddRefed<CSSValue> DoGetFontLanguageOverride();
already_AddRefed<CSSValue> DoGetFontSize();
diff --git a/layout/style/nsComputedDOMStylePropertyList.h b/layout/style/nsComputedDOMStylePropertyList.h
index 825976b58..557281810 100644
--- a/layout/style/nsComputedDOMStylePropertyList.h
+++ b/layout/style/nsComputedDOMStylePropertyList.h
@@ -144,6 +144,7 @@ COMPUTED_STYLE_PROP(font_variant_east_asian, FontVariantEastAsian)
COMPUTED_STYLE_PROP(font_variant_ligatures, FontVariantLigatures)
COMPUTED_STYLE_PROP(font_variant_numeric, FontVariantNumeric)
COMPUTED_STYLE_PROP(font_variant_position, FontVariantPosition)
+COMPUTED_STYLE_PROP(font_variation_settings, FontVariationSettings)
COMPUTED_STYLE_PROP(font_weight, FontWeight)
COMPUTED_STYLE_PROP(grid_auto_columns, GridAutoColumns)
COMPUTED_STYLE_PROP(grid_auto_flow, GridAutoFlow)
diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h
index 6d207aec9..5412eed26 100644
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -241,8 +241,6 @@ enum class StyleUserSelect : uint8_t {
// user-input
enum class StyleUserInput : uint8_t {
None,
- Enabled,
- Disabled,
Auto,
};
diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp
index 118702e8f..a317f9943 100644
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -44,6 +44,7 @@ using mozilla::dom::CSSTransition;
using mozilla::dom::KeyframeEffectReadOnly;
using namespace mozilla;
+using namespace mozilla::dom;
using namespace mozilla::css;
namespace {
diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css
index e7566e183..95025221d 100644
--- a/layout/style/res/forms.css
+++ b/layout/style/res/forms.css
@@ -425,7 +425,6 @@ optgroup:disabled,
select:disabled:disabled /* Need the pseudo-class twice to have the specificity
be at least the same as select[size][multiple] above */
{
- -moz-user-input: disabled;
color: GrayText;
background-color: ThreeDLightShadow;
cursor: inherit;
diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js
index c75f7b498..3486d15d0 100644
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -2203,7 +2203,7 @@ var gCSSProperties = {
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: [ "auto" ],
- other_values: [ "none", "enabled", "disabled" ],
+ other_values: [ "none" ],
invalid_values: []
},
"-moz-user-modify": {