Bug 115954 - [att~=val] attribute selectors fail when tab is used as the whitespace character
Summary: [att~=val] attribute selectors fail when tab is used as the whitespace character
Status: RESOLVED DUPLICATE of bug 136807
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
: 116504 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-11 01:08 PDT by Dan Nye
Modified: 2014-09-17 14:58 PDT (History)
6 users (show)

See Also:


Attachments
Test case showing the problem (583 bytes, text/html)
2013-05-11 01:08 PDT, Dan Nye
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Nye 2013-05-11 01:08:33 PDT
Created attachment 201453 [details]
Test case showing the problem

Note: I have also reported this bug in the Chromium bug tracker... presumably now they've forked WebKit to Blink, we need to report issues both here and there? (https://code.google.com/p/chromium/issues/detail?id=239786)

Steps to reproduce the problem:
1. Create an element that has an attribute with a whitespace-delimited list of values. Make the whitespace a space character
2. Create another element that has an attribute with a whitespace-delimited list of values. Make the whitespace a tab character
3. Assign styles to those values using the [att~=val] attribute selector
4. Load the page

What is the expected behaviour?
Both elements should have identical styling

What went wrong?
Only the element whose attribute is delimited with space characters will see the styling applied

Does this work in other browsers? Yes

This fails in the following browsers:
WebKit r149907 nightly build from 10 May 2013 (OSX 10.8.3)
Safari 6.0.4 (8536.29.13) (OSX 10.8.3)
Chrome 28.0.1500.6 dev (OSX 10.8.3)

This passes in the following browsers:
Opera 12.15 (build 1748) (OSX 10.8.3)
Firefox 20.0 (OSX 10.8.3)
IE10 (Win 7)
IE9 (Win 7)
IE8 (Win 7)
IE7 (Win XP)

I've not tested on Windows in any non-IE browser.

Interestingly enough, the Chromium team have marked this as being part of the Blink-JavaScript component, whereas I'd say it was a CSS bug. For this reason (they certainly know more about browser internals than I do), I've left the "component" field here as "New Bugs" rather than setting it to "CSS".
Comment 1 Alexey Proskuryakov 2013-05-11 17:03:58 PDT
> presumably now they've forked WebKit to Blink, we need to report issues both here and there?

This is correct. Cross-referencing the bugs would be helpful to avoid duplicating work (think you for providing a link to chromium bug tracker).
Comment 2 Alexey Proskuryakov 2013-05-21 10:03:52 PDT
*** Bug 116504 has been marked as a duplicate of this bug. ***
Comment 3 Alexey Proskuryakov 2013-05-21 10:04:21 PDT
This was fixed in Blink: https://chromium.googlesource.com/chromium/blink/+/3b062d8c310875be0fe6f26a89e2592104944e83
Comment 4 Richard Gibson 2014-09-17 14:45:26 PDT
I didn't see this bug when I filed #136807, but they are identical. I suppose this one should be closed as a duplicate, temporal anomalies notwithstanding.
Comment 5 Alexey Proskuryakov 2014-09-17 14:58:45 PDT
As that one is fixed already, forward duping.

*** This bug has been marked as a duplicate of bug 136807 ***