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

Issue 671823 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

<meta name="theme-color" ...> does not work if it is not inside <head>

Project Member Reported by dim...@chromium.org, Dec 6 2016

Issue description

Chrome version: M57 dev trunk

Document::themeColor(), which is used to fetch the color for the browser UI elements like Omnibox when <meta name="theme-color" is encountered, is only looking inside <head>. The color is used when renderer sends FrameHostMsg_DidChangeThemeColor message.

However, the spec for the theme-color does not restrict it to the <head> (some other meta tags are restricted to it, but not this one).

The spec: https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color



 
test.html
73 bytes View Download
Status: Available (was: Untriaged)
Here's a jsbin for easy mobile viewing:

http://jsbin.com/kajadoravo/1
Labels: Hotlist-GoodFirstBug
Here's what the expected behavior looks like, this has the meta tag in head: http://jsbin.com/rakecopime

It appears Document::themeColor restricts its traversal to head.

Comment 3 by l...@chromium.org, Dec 9 2016

Owner: l...@chromium.org
Status: Assigned (was: Available)
I will take a look at it, assign it to me.
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 9 2016

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

commit b0dcd96c51e12739407d11a0259e338d7630e150
Author: lpy <lpy@chromium.org>
Date: Fri Dec 09 20:19:49 2016

Fix meta-theme-color not working outside <head>

Document::themeColor() only looks for meta-theme-color inside <head>, however,
the spec for meta-theme-color does not restrict it to <head>.

BUG= 671823 

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

[modify] https://crrev.com/b0dcd96c51e12739407d11a0259e338d7630e150/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/b0dcd96c51e12739407d11a0259e338d7630e150/third_party/WebKit/Source/core/dom/DocumentTest.cpp

Comment 5 by l...@chromium.org, Dec 12 2016

Status: Fixed (was: Assigned)
Close as fixed.

Sign in to add a comment