Summary: | Web Inspector: [CSS Regions] Move the Regions support out of experiments | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mihai Balan <mibalan> |
Component: | Web Inspector (Deprecated) | Assignee: | Mihai Balan <mibalan> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | apavlov, burg, bweinstein, joepeck, keishi, loislo, mvujovic, pfeldman, pmuellr, rik, syoichi, WebkitBugTracker, yurys |
Priority: | P2 | Keywords: | AdobeTracked |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 90786 |
Description
Mihai Balan
2012-10-10 10:18:18 PDT
You can introduce a new command "CSS.supportsRegions" and query it post-load or upon context menu. (In reply to comment #1) > You can introduce a new command "CSS.supportsRegions" and query it post-load or upon context menu. The most common way to do this is through the concept of "capabilities". See: - Settings.js, var Capabilities = {...} - the default values (yours should be "false") - inspector.js, WebInspector.doLoadedDone() queries agents for their supported capabilities and initializes their values according to the response. The last one should provide bound WebInspector._doLoadedDoneWithCapabilities as the callback. Your call will most probably look similar to: CSS.supportsRegions(WebInspector._initializeCapability.bind(WebInspector, "cssRegionsSupported", null)); // not the last capability initializer Afterwards, you just check: if (Capabilities.cssRegionsSupported) { // do something } (In reply to comment #2) > (In reply to comment #1) > > You can introduce a new command "CSS.supportsRegions" and query it post-load or upon context menu. > > The most common way to do this is through the concept of "capabilities". Pavel has rightly pointed out that this approach will add up to the total inspector loading time. So it is better to query the agent when you do need the real value and cache it once received. This seems to be a Chromium bug, closing. Reopening as the Web Inspector code is still in trunk and usable and the code isn't Chrome-only. |