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

Issue 726176 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 627682



Sign in to add a comment

U+212A in CSS selectors match to wrong elements/attributes

Project Member Reported by tkent@chromium.org, May 25 2017

Issue description

Chrome Version: 60 Canary
OS: All but iOS

What steps will reproduce the problem?
(1) Open the following HTML document.

<!-- quirks mode -->
<style>
\212a bd:after {
  content: " (CSS matched)";
  color: red;
}
div[\212alass]:after {
  content: " (CSS matched)";
  color: red;
}
</style>
<body>
<kbd>KBD</kbd>
<div klass>klass</div>
</body>

What is the expected result?
The page just show the following black text:

KBD
klass

What happens instead?
Chrome 60 shows the following:

KBD (CSS matched)
klass (CSS matched)

Please use labels and text to provide additional information.
Firefox and Safari work correctly.

According to the standard, we should apply ASCII lowercase, but we apply Unicode lowercase.
https://html.spec.whatwg.org/multipage/scripting.html#selectors

 

Comment 1 by shans@chromium.org, May 26 2017

Labels: -Pri-3 Pri-2
Status: Available (was: Untriaged)

Comment 2 by shans@chromium.org, May 26 2017

Labels: Update-Weekly

Comment 3 by tkent@chromium.org, May 26 2017

Labels: Hotlist-GoodFirstBug
Owner: shanmug...@samsung.com
Status: Assigned (was: Available)

Comment 5 by r...@opera.com, May 26 2017

Sorry, forgot to set the status when I started on this: chromium-review.googlesource.com/c/517105/

Project Member

Comment 6 by bugdroid1@chromium.org, May 26 2017

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

commit 2779cf5d3b716f5a0f6ef37cf0bd20ee764d675e
Author: Rune Lillesveen <rune@opera.com>
Date: Fri May 26 16:08:05 2017

Use LowerASCII instead of DeprecatedLower in css/

Incorrectly folded upper-case non-ascii characters into ascii for type,
attribute, id, and class selectors causing non-matching selectors to
match.

Also fixed for media types and features.

BUG= 726176 

Change-Id: I5a6f813b2722ee4efcff2ab933f5ad075faadcbb
Reviewed-on: https://chromium-review.googlesource.com/517105
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#475021}
[modify] https://crrev.com/2779cf5d3b716f5a0f6ef37cf0bd20ee764d675e/third_party/WebKit/Source/core/css/MediaQuery.cpp
[modify] https://crrev.com/2779cf5d3b716f5a0f6ef37cf0bd20ee764d675e/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
[modify] https://crrev.com/2779cf5d3b716f5a0f6ef37cf0bd20ee764d675e/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
[modify] https://crrev.com/2779cf5d3b716f5a0f6ef37cf0bd20ee764d675e/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
[modify] https://crrev.com/2779cf5d3b716f5a0f6ef37cf0bd20ee764d675e/third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp
[modify] https://crrev.com/2779cf5d3b716f5a0f6ef37cf0bd20ee764d675e/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIContent.cpp

Comment 7 by r...@opera.com, May 26 2017

Owner: r...@opera.com
Status: Fixed (was: Assigned)

Sign in to add a comment