New issue
Advanced search Search tips

Issue 831166 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Bug



Sign in to add a comment

DOMTokenList.supports should use case-insensitive comparison

Project Member Reported by iclell...@chromium.org, Apr 10 2018

Issue description

According to https://dom.spec.whatwg.org/#dom-domtokenlist-supports, calling supports(token) on a DOMTokenList object should perform an ASCII-lowercase comparison of token with the list's supported tokens.

Currently, the comparison is case-sensitive:

let frame = document.createElement('iframe');
frame.sandbox.supports('allow-scripts') => true
frame.sandbox.supports('ALLOW-scripts') => false
 
The bindings side is fine, this should probably be fixed by making DOMTokenList::supports() call ValidateTokenValue() with a lowercased version of |token|.
Components: -Blink>Bindings
Owner: iclell...@chromium.org
Status: Started (was: Available)
I think so; I'm testing that out as part of another CL right now; I'll upload it separately (with some tests) if it passes the current test suite.
Labels: Hotlist-Interop
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 11 2018

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

commit 5d969dd6c09fe37e89de502e16983274fa39567c
Author: Ian Clelland <iclelland@chromium.org>
Date: Wed Apr 11 02:23:07 2018

Make DOMTokenList.supports() case-insensitive

According to the DOM spec (https://dom.spec.whatwg.org/#dom-domtokenlist-supports)
the supports() method should compare the ASCII-lowercase transform of its input to
the list of tokens supported by the DOMTokenList.

Bug:  831166 
Change-Id: I40903a307ffb949bbbbc99e02b56565cb81d00ed
Reviewed-on: https://chromium-review.googlesource.com/1005412
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549733}
[modify] https://crrev.com/5d969dd6c09fe37e89de502e16983274fa39567c/third_party/WebKit/LayoutTests/external/wpt/html/semantics/rellist-feature-detection.html
[modify] https://crrev.com/5d969dd6c09fe37e89de502e16983274fa39567c/third_party/WebKit/LayoutTests/fast/dom/HTMLIFrameElement/sandbox-feature-detection.html
[modify] https://crrev.com/5d969dd6c09fe37e89de502e16983274fa39567c/third_party/blink/renderer/core/dom/dom_token_list.cc

Status: Fixed (was: Started)

Sign in to add a comment