New issue
Advanced search Search tips

Issue 676092 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

<meta> refresh should not work in shadow DOM

Project Member Reported by domenic@chromium.org, Dec 20 2016

Issue description

Comment 1 by hayato@chromium.org, Jan 10 2017

Owner: hayato@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by hayato@chromium.org, Jan 12 2017

Cc: domenic@chromium.org
@domenic

It makes sense to me to disable <meta> tag in a shadow tree.

A <meta> tag is not mentioned in http://w3c.github.io/webcomponents/spec/shadow/#inertness-of-html-elements-in-a-shadow-tree. I guess no one has paid attention to <meta> tag so far.

It looks HTML Standard uses a phrase of "inserted into a document" in <meta> tag section.
I am wondering whether this is intentional one after a shadow dom is introduced, or we forgot to update this section with "connected".

Do you know something about it?

Oh I see, I didn't realize that section existed.

The phrasing is slightly intentional. That particular line for meta refresh is old and has not changed. However, for related meta values, e.g. https://html.spec.whatwg.org/#meta-theme-color and https://html.spec.whatwg.org/#meta-referrer which were added recently, we made sure to check that they were "in a document tree".

Maybe this bug should broaden to include those. Although I didn't write web platform tests for them.

Also I guess https://html.spec.whatwg.org/#meta-application-name is imprecise ("in the Document").

Comment 4 by hayato@chromium.org, Jan 13 2017

I see. Thank you for the explanation.

I think it is reasonable to disable all <meta> tag's functionalities if it is not in a document tree.

Let me work on that in Blink. Maybe we have to check (or update if necessary) HTML Standard at first before fixing Blink, but I think no one doesn't care it strongly. :)

It is my mistake that I have not mentioned a meta tag in Shadow DOM's existing section. :(

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 23 2017

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

commit 5dc22a61fc8e68b59cc7e82d2f616daa185c6507
Author: hayato <hayato@chromium.org>
Date: Mon Jan 23 15:14:34 2017

Disable <meta> tag in a shadow tree

The spec is:
- http://w3c.github.io/webcomponents/spec/shadow/#inertness-of-html-elements-in-a-shadow-tree
- https://html.spec.whatwg.org/#meta

Though HTML Standard has not fully explained how <meta> tag should work in a shadow tree yet,
our consensus is <meta> should not work in a shadow tree.

This CL didn't add a new test, just removing one expectation file of a web platform test.
We would have tests for meta tag in web platform tests.

BUG= 676092 

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

[delete] https://crrev.com/a34d185b3e31187fb8aa16b700e5837e9636cba9/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt
[modify] https://crrev.com/5dc22a61fc8e68b59cc7e82d2f616daa185c6507/third_party/WebKit/Source/core/html/HTMLMetaElement.cpp

Comment 6 by hayato@chromium.org, Jan 27 2017

Status: Fixed (was: Assigned)

Sign in to add a comment