Bug 19919

Summary: Add selectors' string parsing in CSSParser
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: hyatt
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
First version
hyatt: review+
Add CSSGrammar magic and switch querySelector to it
none
Same as the previous one, without the memory leak
sam: review-
Updated patch: use auto_ptr sam: review+

Julien Chaffraix
Reported 2008-07-06 15:10:50 PDT
For example, the element attribute (from the tag <binding>) takes a string that is a selector. Currently it is not possible to get the Selector represented by such a string. Patch will follow.
Attachments
First version (5.65 KB, patch)
2008-07-06 15:15 PDT, Julien Chaffraix
hyatt: review+
Add CSSGrammar magic and switch querySelector to it (6.72 KB, patch)
2008-07-15 16:38 PDT, Julien Chaffraix
no flags
Same as the previous one, without the memory leak (8.83 KB, patch)
2008-07-15 18:20 PDT, Julien Chaffraix
sam: review-
Updated patch: use auto_ptr (8.31 KB, patch)
2008-07-21 17:27 PDT, Julien Chaffraix
sam: review+
Julien Chaffraix
Comment 1 2008-07-06 15:15:53 PDT
Created attachment 22121 [details] First version
Eric Seidel (no email)
Comment 2 2008-07-06 19:12:41 PDT
Comment on attachment 22121 [details] First version I'm confused by this patch. I'm not sure what @-webkit-selector is, or what @selector even is. I've also CC'd hyatt, as he likely knows what's going on here (and can better comment if your patch is correct or not).
Dave Hyatt
Comment 3 2008-07-15 13:07:31 PDT
Comment on attachment 22121 [details] First version r=me, although remove the no-op change to QualifiedName.cpp.
Julien Chaffraix
Comment 4 2008-07-15 16:34:04 PDT
This patch is not required for XBL (querySelector will do the trick) but it would enhance querySelector. Changing the bug name to match the new need.
Julien Chaffraix
Comment 5 2008-07-15 16:38:44 PDT
Created attachment 22294 [details] Add CSSGrammar magic and switch querySelector to it
Julien Chaffraix
Comment 6 2008-07-15 18:20:19 PDT
Created attachment 22297 [details] Same as the previous one, without the memory leak
Sam Weinig
Comment 7 2008-07-21 16:43:27 PDT
Comment on attachment 22297 [details] Same as the previous one, without the memory leak Sorry for leading you down a bad path, but I think a better and less invasive would to be just to return an auto_ptr and not turn CSSSelector into a RefCounted object.
Julien Chaffraix
Comment 8 2008-07-21 17:27:30 PDT
Created attachment 22416 [details] Updated patch: use auto_ptr
Julien Chaffraix
Comment 9 2008-07-21 18:44:05 PDT
Landed in r35282.
Note You need to log in before you can comment on or make changes to this bug.