New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 715690 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

<link>'s as="" does not reflect properly

Project Member Reported by domenic@chromium.org, Apr 26 2017

Issue description

Please see the tests at http://w3c-test.org/html/dom/reflection-metadata.html with prefix "link.as".

It seems Blink is just treating <link>'s as="" as a pass-through string, but it should be treated as an enumerated attribute (like, e.g., referrerpolicy="").

This will also likely impact the preload implementation, which should be using the attribute state, not the verbatim attribute. (So, e.g., it should treat "asdf" as "", and "SCRIPT" as "script".)
 
Labels: -Pri-3 Hotlist-Interop Pri-2
Owner: dominicc@chromium.org
Status: Assigned (was: Untriaged)
Looks like we don't implement the "limited to only known values" part of the spec.

Comment 2 by y...@yoav.ws, May 26 2017

Cc: -y...@yoav.ws dominicc@chromium.org
Owner: y...@yoav.ws
Status: Started (was: Assigned)
I've implemented that as part of https://codereview.chromium.org/2903653005/ so taking over...
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f18863cc9b2a5fe463671f3eb60de2f95bbf283

commit 1f18863cc9b2a5fe463671f3eb60de2f95bbf283
Author: yoav <yoav@yoav.ws>
Date: Sat Jun 03 00:20:44 2017

[preload] Mandatory `as` value and related spec alignments

The motivation for this change is to avoid double downloads following developer
confusion around empty `as` values, enable feature detection of supported `as`
values, and simplify the HTML processing model. Details below:
* Avoid fetching a resource if `as` is missing - we've seen many cases where
  developers omit the `as` value from their preload links, which often results in
  double downloads. We've also had developer feedback that an empty `as` value
  being mapped to XHR/fetch() feels magical. This change addresses that, by defining
  a "fetch" value for these cases and ignoring empty/missing `as` values.
* Properly reflect a limited set of known `as` values - enable feature detection of
  supported `as` values (instead of the `onerror` based fallback, which we're
  deprecating.
* Avoid triggering the "onerror" event when an invalid `as` value is encountered -
  simplify HTML's processing model.

BUG= 726647 ,  715690 ,  698520 

Review-Url: https://codereview.chromium.org/2903653005
Cr-Commit-Position: refs/heads/master@{#476840}

[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-metadata-expected.txt
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/preload/download-resources.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/preload/onerror-event.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/preload/onload-event.html
[add] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/preload/reflected-as-value.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/opaque-response-preloaded-iframe.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/fast/dom/HTMLLinkElement/link-preload-validity.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/preload/link_header_preload_on_commit.php
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/preload/memcache_eviction.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/preload/memcache_reuse_of_non_cacheable_preload.html
[delete] https://crrev.com/37003a1722d89acc689cd3911efceb583bad43e0/third_party/WebKit/LayoutTests/http/tests/preload/onerror_event.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-preload-anonymous.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-preload-no-cors.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/LayoutTests/http/tests/security/link-crossorigin-preload-use-credentials.html
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/Source/core/html/HTMLLinkElement.idl
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerTest.cpp
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/Source/core/loader/LinkLoader.cpp
[modify] https://crrev.com/1f18863cc9b2a5fe463671f3eb60de2f95bbf283/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp

Comment 4 by y...@yoav.ws, Jun 3 2017

Status: Fixed (was: Started)

Sign in to add a comment