Bug 72482

Summary: <style scoped>: rename matchRules() to matchRulesGlobally() to indicate that no scope is used
Product: WebKit Reporter: Roland Steiner <rolandsteiner>
Component: CSSAssignee: Roland Steiner <rolandsteiner>
Status: RESOLVED INVALID    
Severity: Normal CC: dglazkov, dominicc, koivisto, macpherson, morrita, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 49142, 67720    
Attachments:
Description Flags
Patch
none
patch, matchRulesInGlobalScope koivisto: review-, koivisto: commit-queue-

Description Roland Steiner 2011-11-16 02:11:02 PST
The implementation of style scoped passes the scope to be used for selector matching into the matching functions. matchRules() does not use a scope, so should be renamed to indicate this.
Comment 1 Roland Steiner 2011-11-16 02:13:23 PST
Created attachment 115350 [details]
Patch
Comment 2 Antti Koivisto 2011-11-16 06:12:26 PST
Comment on attachment 115350 [details]
Patch

I suprised scoped matching would use a different matching function on this level. Why? (please cc me to all these)
Comment 3 Alexey Proskuryakov 2011-11-16 14:23:22 PST
This feels like a name that could be confusing when you are not actively working on scoped stye code. Perhaps "...InGlobalScope" would be more clear?
Comment 4 Roland Steiner 2011-11-16 20:56:34 PST
Created attachment 115516 [details]
patch, matchRulesInGlobalScope

I like matchRulesInGlobalScope()! New patch with this name uploaded.
Comment 5 Roland Steiner 2011-11-16 21:00:51 PST
(In reply to comment #2)
> (From update of attachment 115350 [details])
> I suprised scoped matching would use a different matching function on this level. Why? (please cc me to all these)

matching Author rules will be done both globally and scoped, while other rules are matched globally only. With the rules themselves not carrying the scope, I feel the function name should make it explicit that no scoping will take place.
Comment 6 Antti Koivisto 2011-11-21 11:30:08 PST
Comment on attachment 115516 [details]
patch, matchRulesInGlobalScope

I added some comments to bug 67720. I'd like to see a more narrowly focused full patch before doing any code changes for this feature.
Comment 7 Roland Steiner 2011-11-27 23:42:52 PST
It's probably better to do the renaming after the functionality has landed, to avoid confusion. Marking this as invalid for now.