Bug 1556855 part 4: Remove support for the layout.css.prefixes.webkit pref. r=mats

From this point on, the webkit-prefixed CSS features that were previously
protected by this pref will now be unconditionally enabled.

Differential Revision: https://phabricator.services.mozilla.com/D33807

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daniel Holbert 2019-06-05 18:23:02 +00:00
Родитель 82eb52d2a9
Коммит d9ebfdd4d2
8 изменённых файлов: 15 добавлений и 45 удалений

Просмотреть файл

@ -18,8 +18,7 @@ namespace dom {
static const double sRadPerDegree = 2.0 * M_PI / 360.0;
bool WebKitCSSMatrix::FeatureEnabled(JSContext* aCx, JSObject* aObj) {
return StaticPrefs::layout_css_DOMMatrix_enabled() &&
StaticPrefs::layout_css_prefixes_webkit();
return StaticPrefs::layout_css_DOMMatrix_enabled();
}
already_AddRefed<WebKitCSSMatrix> WebKitCSSMatrix::Constructor(

Просмотреть файл

@ -19,7 +19,6 @@
#include "mozilla/MemoryReporting.h"
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/Event.h"
@ -1035,24 +1034,18 @@ nsresult EventListenerManager::HandleEventSubType(Listener* aListener,
EventMessage EventListenerManager::GetLegacyEventMessage(
EventMessage aEventMessage) const {
// (If we're off-main-thread, we can't check the pref; so we just behave as
// if it's disabled.)
if (mIsMainThreadELM) {
if (StaticPrefs::layout_css_prefixes_webkit()) {
// webkit-prefixed legacy events:
if (aEventMessage == eTransitionEnd) {
return eWebkitTransitionEnd;
}
if (aEventMessage == eAnimationStart) {
return eWebkitAnimationStart;
}
if (aEventMessage == eAnimationEnd) {
return eWebkitAnimationEnd;
}
if (aEventMessage == eAnimationIteration) {
return eWebkitAnimationIteration;
}
}
// webkit-prefixed legacy events:
if (aEventMessage == eTransitionEnd) {
return eWebkitTransitionEnd;
}
if (aEventMessage == eAnimationStart) {
return eWebkitAnimationStart;
}
if (aEventMessage == eAnimationEnd) {
return eWebkitAnimationEnd;
}
if (aEventMessage == eAnimationIteration) {
return eWebkitAnimationIteration;
}
switch (aEventMessage) {

Просмотреть файл

@ -263,7 +263,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = {
{eCSSKeyword_ruby_text_container, StyleDisplay::RubyTextContainer},
{eCSSKeyword_grid, StyleDisplay::Grid},
{eCSSKeyword_inline_grid, StyleDisplay::InlineGrid},
// The next 4 entries are controlled by the layout.css.prefixes.webkit pref.
{eCSSKeyword__webkit_box, StyleDisplay::WebkitBox},
{eCSSKeyword__webkit_inline_box, StyleDisplay::WebkitInlineBox},
{eCSSKeyword__webkit_flex, StyleDisplay::Flex},

Просмотреть файл

@ -4327,9 +4327,7 @@ VARCACHE_PREF(
bool, true
)
// Are "-webkit-{min|max}-device-pixel-ratio" media queries supported? (Note:
// this pref has no effect if the master 'layout.css.prefixes.webkit' pref is
// set to false.)
// Are "-webkit-{min|max}-device-pixel-ratio" media queries supported?
VARCACHE_PREF(
Live,
"layout.css.prefixes.device-pixel-ratio-webkit",
@ -4337,14 +4335,6 @@ VARCACHE_PREF(
bool, true
)
// Are webkit-prefixed properties & property-values supported?
VARCACHE_PREF(
Live,
"layout.css.prefixes.webkit",
layout_css_prefixes_webkit,
bool, true
)
// Is CSS error reporting enabled?
VARCACHE_PREF(
Live,

Просмотреть файл

@ -298,8 +298,7 @@ impl MediaFeatureExpression {
#[cfg(feature = "gecko")]
{
if unsafe { structs::StaticPrefs_sVarCache_layout_css_prefixes_webkit } &&
starts_with_ignore_ascii_case(feature_name, "-webkit-")
if starts_with_ignore_ascii_case(feature_name, "-webkit-")
{
feature_name = &feature_name[8..];
requirements.insert(ParsingRequirements::WEBKIT_PREFIX);

Просмотреть файл

@ -159,8 +159,6 @@ def parse_property_aliases(alias_list):
if alias_list:
for alias in alias_list.split():
(name, _, pref) = alias.partition(":")
if name.startswith("-webkit-") and not pref:
pref = "layout.css.prefixes.webkit"
result.append((name, pref))
return result
@ -542,10 +540,6 @@ class PropertiesData(object):
# See servo/servo#14941.
if self.product == "gecko":
for (prefix, pref) in property.extra_prefixes:
# All webkit prefixed properties are currently under
# control of this pref in Gecko currently.
if prefix == "webkit" and not pref:
pref = "layout.css.prefixes.webkit"
property.alias.append(('-%s-%s' % (prefix, property.name), pref))
def declare_longhand(self, name, products="gecko servo", **kwargs):

Просмотреть файл

@ -291,7 +291,6 @@ ${helpers.predefined_type(
"Color",
"computed_value::T::currentcolor()",
products="gecko",
gecko_pref="layout.css.prefixes.webkit",
animation_value_type="AnimatedColor",
ignored_when_colors_disabled=True,
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
@ -306,7 +305,6 @@ ${helpers.predefined_type(
products="gecko",
animation_value_type="AnimatedColor",
ignored_when_colors_disabled=True,
gecko_pref="layout.css.prefixes.webkit",
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color",
)}
@ -318,7 +316,6 @@ ${helpers.predefined_type(
initial_specified_value="specified::BorderSideWidth::zero()",
computed_type="crate::values::computed::NonNegativeLength",
products="gecko",
gecko_pref="layout.css.prefixes.webkit",
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-width",
animation_value_type="discrete",

Просмотреть файл

@ -48,7 +48,6 @@
<%helpers:shorthand name="-webkit-text-stroke"
sub_properties="-webkit-text-stroke-width
-webkit-text-stroke-color"
gecko_pref="layout.css.prefixes.webkit"
products="gecko"
derive_serialize="True"
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke">