Bug 32045

Summary: Escapes need to work with known @-rules
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: CSSAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal CC: annevk, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
URL: http://www.w3.org/Style/CSS/Test/CSS3/Namespace/20090210/syntax-002.xml
Attachments:
Description Flags
Patch mitz: review+

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]
Patch
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]
Patch

> +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. ***