Bug 72482 - <style scoped>: rename matchRules() to matchRulesGlobally() to indicate that no scope is used
Summary: <style scoped>: rename matchRules() to matchRulesGlobally() to indicate that ...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Roland Steiner
URL:
Keywords:
Depends on:
Blocks: 49142 67720
  Show dependency treegraph
 
Reported: 2011-11-16 02:11 PST by Roland Steiner
Modified: 2011-11-27 23:42 PST (History)
6 users (show)

See Also:


Attachments
Patch (6.73 KB, patch)
2011-11-16 02:13 PST, Roland Steiner
no flags Details | Formatted Diff | Diff
patch, matchRulesInGlobalScope (6.79 KB, patch)
2011-11-16 20:56 PST, Roland Steiner
koivisto: review-
koivisto: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.