Bug 98924
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 |
Mihai Balan
The purpose of this patch is to have the WebInspector features related to regions available outside of the experiments tab.
I don't have an answer yet as to how this should interact with the runtime flag for regions.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Pavel Feldman
You can introduce a new command "CSS.supportsRegions" and query it post-load or upon context menu.
Alexander Pavlov (apavlov)
(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
}
Alexander Pavlov (apavlov)
(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.
Michelangelo De Simone
This seems to be a Chromium bug, closing.
Mihai Balan
Reopening as the Web Inspector code is still in trunk and usable and the code isn't Chrome-only.