Commit f52dff0d authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Disable Shadow DOM v0 and Custom Elements v0

```yaml
IN CASE OF PROBLEMS: If this CL causes your site/app to break, you are
using deprecated features that have now been removed. Please see [2] to
enroll in the Deprecation Extension program to give yourself more time.
```

With this CL, two of the three Web Components v0 APIs are disabled by
default. The third, HTML Imports, will be disabled (soon) by a separate CL.

These features were deprecated in August, 2018, in [1]. The original
removal timeline called for a deadline of M73. Due to high use counters
for the features, this deadline was extended to M80, which is now here.
For those sites that need additional time, there is a "deprecation
extension" (sometimes called a "reverse origin trial") that can be used
to extend this removal for specific sites through M87. For more
information on that, see [2]. For overall context on this removal,
including motivation and ways to test/upgrade, see [3].

With this CL, these features will still be enabled for testing across
all test suites. Once this CL has had a chance to land and stabilize,
subsequent CLs will disable the features for all tests by default, and
enable a virtual test suite to continue testing specific code with WCv0
features enabled, to ensure the features continue to function through
the end of the deprecation extension period.

[1] https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/h-JwMiPUnuU/sl79aLoLBQAJ
[2] https://developers.chrome.com/origintrials/#/view_trial/2431943798780067841
[3] https://developers.google.com/web/updates/2019/07/web-components-time-to-upgrade

Bug: 911943
Change-Id: I939e1ead03a3196e63f0f9c192f916c87ab16562
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850795Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Reviewed-by: default avatarDarin Fisher <darin@chromium.org>
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708031}
parent f7afddcd
......@@ -70,7 +70,8 @@ void HTMLLinkElement::ParseAttribute(
const AtomicString& value = params.new_value;
if (name == kRelAttr) {
rel_attribute_ = LinkRelAttribute(value);
if (rel_attribute_.IsImport()) {
if (rel_attribute_.IsImport() &&
RuntimeEnabledFeatures::HTMLImportsEnabledByRuntimeFlag()) {
Deprecation::CountDeprecation(&GetDocument(), WebFeature::kHTMLImports);
}
rel_list_->DidUpdateAttributeValue(params.old_value, value);
......
......@@ -502,12 +502,12 @@
name: "CustomElementDefaultStyle",
status: "experimental",
},
// Introduced this flag as stable so web developers can test their sites
// without native Custom Elements v0 support.
// TODO(937746): Web Components v0 is disabled by default, and will be
// removed after M87.
{
name: "CustomElementsV0",
origin_trial_feature_name: "WebComponentsV0",
status: "stable",
status: "test",
},
{
name: "CustomStatePseudoClass",
......@@ -763,7 +763,8 @@
origin_trial_feature_name: "HrefTranslate",
status: "experimental",
},
// https://crbug.com/766694 for testing disabling the feature.
// TODO(911943): HTML Imports is temporarily being left enabled after
// the planned removal milestone of M80.
{
name: "HTMLImports",
origin_trial_feature_name: "WebComponentsV0",
......@@ -773,10 +774,11 @@
{
name: "HTMLImportsOnlyChrome",
},
// https://crbug.com/523952 for testing disabling the feature.
// TODO(937746): Web Components v0 is disabled by default, and will be
// removed after M87.
{
name: "HTMLImportsStyleApplication",
status: "stable",
status: "test",
},
{
name: "IDBObserver",
......@@ -1499,12 +1501,12 @@
name: "SetRootScroller",
status: "experimental",
},
// Introduced this flag as stable so web developers can test their sites
// without native Shadow DOM v0 support
// TODO(937746): Web Components v0 is disabled by default, and will be
// removed after M87.
{
name: "ShadowDOMV0",
origin_trial_feature_name: "WebComponentsV0",
status: "stable",
status: "test",
},
{
name: "ShadowPiercingDescendantCombinator",
......
This is a testharness.js-based test.
FAIL Comfirm HTMLImportsOnReverseOriginTrials counter assert_true: expected true got false
Harness: the test ran to completion.
Tests basic web-exposure of Custom Elements
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Document.prototype.hasOwnProperty("registerElement")
false
typeof Document.prototype.registerElement
undefined
document.createElement("x-a") instanceof HTMLUnknownElement
false
document.querySelector(":unresolved")
FAIL document.querySelector(":unresolved") threw exception SyntaxError: Failed to execute 'querySelector' on 'Document': ':unresolved' is not a valid selector.
undefined
span.getAttribute("is")
PASS window.customElements.define("a-a", A, {extends: "b"}) did not throw exception.
PASS successfullyParsed is true
TEST COMPLETE
......@@ -55,7 +55,6 @@ namespace http://www.w3.org/1999/xhtml
property computedStyleMap
property contains
property contentEditable
property createShadowRoot
property dataset
property dir
property dispatchEvent
......@@ -72,7 +71,6 @@ namespace http://www.w3.org/1999/xhtml
property getAttributeNodeNS
property getBoundingClientRect
property getClientRects
property getDestinationInsertionPoints
property getElementsByClassName
property getElementsByTagName
property getElementsByTagNameNS
......@@ -1167,7 +1165,6 @@ namespace http://www.w3.org/2000/svg
property compareDocumentPosition
property computedStyleMap
property contains
property createShadowRoot
property dataset
property dispatchEvent
property elementTiming
......@@ -1181,7 +1178,6 @@ namespace http://www.w3.org/2000/svg
property getAttributeNodeNS
property getBoundingClientRect
property getClientRects
property getDestinationInsertionPoints
property getElementsByClassName
property getElementsByTagName
property getElementsByTagNameNS
......
......@@ -1447,7 +1447,6 @@ interface Document : Node
method queryCommandValue
method querySelector
method querySelectorAll
method registerElement
method releaseEvents
method webkitCancelFullScreen
method webkitExitFullscreen
......@@ -1656,7 +1655,6 @@ interface Element : Node
method closest
method computedStyleMap
method constructor
method createShadowRoot
method getAttribute
method getAttributeNS
method getAttributeNames
......@@ -1664,7 +1662,6 @@ interface Element : Node
method getAttributeNodeNS
method getBoundingClientRect
method getClientRects
method getDestinationInsertionPoints
method getElementsByClassName
method getElementsByTagName
method getElementsByTagNameNS
......@@ -6872,7 +6869,6 @@ interface Text : CharacterData
getter assignedSlot
getter wholeText
method constructor
method getDestinationInsertionPoints
method splitText
interface TextDecoder
attribute @@toStringTag
......
......@@ -27,9 +27,6 @@
"mac": "system_health_desktop_040.wprgo",
"win": "system_health_desktop_047.wprgo"
},
"browse:media:youtube:2018": {
"DEFAULT": "system_health_desktop_6b6bdda708.wprgo"
},
"browse:media:youtubetv:2019": {
"DEFAULT": "system_health_desktop_e53598d1f4.wprgo"
},
......
......@@ -604,23 +604,6 @@ class YouTubeMobileStory(_MediaBrowsingStory):
story_tags.HEALTH_CHECK, story_tags.YEAR_2016]
class YouTubeDesktopStory2018(_MediaBrowsingStory):
"""Load a typical YouTube video then navigate to a next few videos. Stop and
watch each video for a few seconds.
"""
NAME = 'browse:media:youtube:2018'
URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=0'
ITEM_SELECTOR = 'ytd-compact-video-renderer.ytd-watch-next-secondary-results-renderer a'
SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
IS_SINGLE_PAGE_APP = True
# A longer view time allows videos to load and play.
ITEM_VIEW_TIME_IN_SECONDS = 5
ITEMS_TO_VISIT = 8
ITEM_SELECTOR_INDEX = 3
PLATFORM_SPECIFIC = True
TAGS = [story_tags.JAVASCRIPT_HEAVY, story_tags.YEAR_2018]
class YouTubeTVDesktopStory2019(_MediaBrowsingStory):
"""Load a typical YouTube TV video then navigate to a next few videos. Stop
and watch each video for a few seconds.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment