Bug 31700

Summary: Web Inspector: isMac should be in one central location + Cached
Product: WebKit Reporter: Brian Weinstein <bweinstein>
Component: Web Inspector (Deprecated)Assignee: Brian Weinstein <bweinstein>
Severity: Normal CC: bweinstein, joepeck, keishi, pfeldman, pmuellr, rik, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 31699    
Bug Blocks:    
Description Flags
timothy: review-, bweinstein: commit-queue-
[PATCH] Use function instead of getter timothy: review+, bweinstein: commit-queue-

Description Brian Weinstein 2009-11-19 19:11:52 PST
We have the same isMac code in multiple places throughout the code base. This should be refactored into a WebInspector.isMac, where that value can be cached, for the same reasons as webkit.org/b/31699. The refactoring would put the call to indexOf in one place, and we could cache the result.
Comment 1 Brian Weinstein 2009-11-20 11:03:57 PST
Created attachment 43597 [details]
Comment 2 Timothy Hatcher 2009-11-20 11:24:25 PST
Comment on attachment 43597 [details]

WebInspector.isMac should be a function, since it asks a question with it's name. Otherwise r+.
Comment 3 Brian Weinstein 2009-11-20 11:45:42 PST
Created attachment 43600 [details]
[PATCH] Use function instead of getter
Comment 4 Brian Weinstein 2009-11-20 11:52:13 PST
Landed in r51250.