Bug 98924 - Web Inspector: [CSS Regions] Move the Regions support out of experiments
Summary: Web Inspector: [CSS Regions] Move the Regions support out of experiments
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Mihai Balan
URL:
Keywords: AdobeTracked
Depends on:
Blocks: 90786
  Show dependency treegraph
 
Reported: 2012-10-10 10:18 PDT by Mihai Balan
Modified: 2014-08-03 18:40 PDT (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Balan 2012-10-10 10:18:18 PDT
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.
Comment 1 Pavel Feldman 2012-10-10 11:34:46 PDT
You can introduce a new command "CSS.supportsRegions" and query it post-load or upon context menu.
Comment 2 Alexander Pavlov (apavlov) 2012-10-11 00:11:10 PDT
(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
}
Comment 3 Alexander Pavlov (apavlov) 2012-10-11 01:56:41 PDT
(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.
Comment 4 Michelangelo De Simone 2013-06-13 20:22:58 PDT
This seems to be a Chromium bug, closing.
Comment 5 Mihai Balan 2013-06-14 06:16:37 PDT
Reopening as the Web Inspector code is still in trunk and usable and the code isn't Chrome-only.