Summary: | Implement `CSS.escape` as per CSSOM | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mathias Bynens <mathias> | ||||
Component: | CSS | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, cdumez, commit-queue, darin, dino, hi, hyatt, joepeck, mail, mathias, simon.fraser, webkit | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 151378 | ||||||
Attachments: |
|
Description
Mathias Bynens
2013-12-31 06:50:33 PST
FWIW, this recently landed in Chromium. *** Bug 149175 has been marked as a duplicate of this bug. *** We are considering using the polyfill in Web Inspector at the moment on bug 151378. The Blink commit that included this looks quite small. It would probably be trivial to port it over to WebKit: <https://chromium.googlesource.com/chromium/blink/+/c1a5ffdc924b089e70cd33ad2726b58cc8312abe%5E!/> (In reply to comment #4) > The Blink commit that included this looks quite small. It would probably be > trivial to port it over to WebKit: > <https://chromium.googlesource.com/chromium/blink/+/ > c1a5ffdc924b089e70cd33ad2726b58cc8312abe%5E!/> Keep in mind that various follow-up fixes were committed separately, so be sure to base any ports on the latest code in Blink rather than that individual commit. I'll take this. Created attachment 286768 [details]
[PATCH] Proposed Fix
Comment on attachment 286768 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=286768&action=review > Source/WebCore/ChangeLog:14 > + (WebCore::serializeIdentifier): > + Update serialization to match the latest version of the spec: > + <https://drafts.csswg.org/cssom/#serialize-an-identifier> > + New handling for 0x0, 0x7f, just "-", and "--" is now allowed. Note: WebCore::serializeString can use the same handling updates for 0x0 and 0x7f but I was unsure how to test those. Comment on attachment 286768 [details] [PATCH] Proposed Fix Clearing flags on attachment: 286768 Committed r204952: <http://trac.webkit.org/changeset/204952> All reviewed patches have been landed. Closing bug. Comment on attachment 286768 [details]
[PATCH] Proposed Fix
The characterStartingAt plus U16_LENGTH idiom is ugly. I suggest we use StringView::codePoints instead.
In some other tests like this I changed the tests so we could see non-trivial characters in hex. This made it easier to see the tests were correct for unusual characters. |