Bug 32045 - Escapes need to work with known @-rules
Summary: Escapes need to work with known @-rules
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
URL: http://www.w3.org/Style/CSS/Test/CSS3...
: 21471 (view as bug list)
Depends on:
Reported: 2009-12-01 17:56 PST by Dave Hyatt
Modified: 2010-02-11 23:22 PST (History)
2 users (show)

See Also:

Patch (5.16 KB, patch)
2009-12-01 17:58 PST, Dave Hyatt
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2009-12-01 17:56:03 PST
Escape sequences aren't working correctly with @-rule names like @namespace or @import.
Comment 1 Dave Hyatt 2009-12-01 17:58:48 PST
Created attachment 44117 [details]
Comment 2 WebKit Review Bot 2009-12-01 18:02:45 PST
style-queue ran check-webkit-style on attachment 44117 [details] without any errors.
Comment 3 Sam Weinig 2009-12-01 18:06:01 PST
Comment on attachment 44117 [details]

> +void CSSParser::recheckAtKeyword(const UChar* str, int len)
> +{
> +    String ruleName(str, len);

This String construction should not be necessary. We should instead add a version of equalIgnoringCase() that takes a UChar* and a length instead of a String.  This will avoid the allocation.
Comment 4 Dave Hyatt 2009-12-01 20:29:08 PST
Given that this is a really silly edge case that will never ever get hit in the real world, I'm not too concerned about making a single String.
Comment 5 Dave Hyatt 2009-12-02 07:59:39 PST
Fixed in r51600.
Comment 6 Alexey Proskuryakov 2010-02-11 23:22:21 PST
*** Bug 21471 has been marked as a duplicate of this bug. ***