Changeset 103765 in webkit


Ignore:
Timestamp:
Dec 28, 2011 7:25:05 AM (12 years ago)
Author:
apavlov@chromium.org
Message:

Web Inspector: Introduce a Profiler launcher view similar to that in the Audits panel
https://bugs.webkit.org/show_bug.cgi?id=75228

Reviewed by Pavel Feldman.

Source/WebCore:

  • English.lproj/localizedStrings.js:
  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/front-end/AuditLauncherView.js:

(WebInspector.AuditLauncherView):

  • inspector/front-end/AuditsPanel.js:

(WebInspector.AuditsPanel):

  • inspector/front-end/DetailedHeapshotView.js:

(WebInspector.DetailedHeapshotProfileType):
(WebInspector.DetailedHeapshotProfileType.prototype.get treeItemTitle):
(WebInspector.DetailedHeapshotProfileType.prototype.get description):

  • inspector/front-end/ProfileLauncherView.js: Added.

(WebInspector.ProfileLauncherView):
(WebInspector.ProfileLauncherView.prototype.setUpEventListeners):
(WebInspector.ProfileLauncherView.prototype.addProfileType):
(WebInspector.ProfileLauncherView.prototype._controlButtonClicked):
(WebInspector.ProfileLauncherView.prototype._updateControls):
(WebInspector.ProfileLauncherView.prototype._profileTypeChanged):
(WebInspector.ProfileLauncherView.prototype._onProfileStarted):
(WebInspector.ProfileLauncherView.prototype._onProfileFinished):

  • inspector/front-end/ProfileView.js:

(WebInspector.CPUProfileType):
(WebInspector.CPUProfileType.prototype.get treeItemTitle):
(WebInspector.CPUProfileType.prototype.get description):

  • inspector/front-end/ProfilesPanel.js:

(WebInspector.ProfileType.prototype.get treeItemTitle):
(WebInspector.ProfileType.prototype.get description):
(WebInspector.ProfilesPanel.prototype.get statusBarItems):
(WebInspector.ProfilesPanel.prototype.toggleRecordButton):
(WebInspector.ProfilesPanel.prototype._onProfileTypeSelected):
(WebInspector.ProfilesPanel.prototype._reset):
(WebInspector.ProfilesPanel.prototype._showLauncherView):
(WebInspector.ProfilesPanel.prototype._registerProfileType):
(WebInspector.ProfilesPanel.prototype._addProfileHeader):
(WebInspector.ProfilesPanel.prototype._updateInterface):
(WebInspector.ProfileTypeTreeElement):
(WebInspector.ProfileTypeTreeElement.prototype.collapse):
(WebInspector.ProfilesSidebarTreeElement):
(WebInspector.ProfilesSidebarTreeElement.prototype.onattach):
(WebInspector.ProfilesSidebarTreeElement.prototype.onselect):
(WebInspector.ProfilesSidebarTreeElement.prototype.get selectable):
(WebInspector.ProfilesSidebarTreeElement.prototype.refresh):

  • inspector/front-end/WebKit.qrc:
  • inspector/front-end/WelcomeView.js: Removed.
  • inspector/front-end/auditsPanel.css:

(.audit-launcher-view .audit-launcher-view-content):
(.audit-launcher-view div.button-container):
(.panel-enabler-view.audit-launcher-view label):
(.panel-enabler-view.audit-launcher-view label.disabled):

  • inspector/front-end/inspector.html:
  • inspector/front-end/panelEnablerView.css:

(.panel-enabler-view img):
(.panel-enabler-view .flexible-space):
(.panel-enabler-view button:not(.status-bar-item)):
(body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled):
(.panel-enabler-view input[type="radio"]):
(.panel-enabler-view input[type="radio"]:active:not(:disabled)):
(.panel-enabler-view input[type="radio"]:checked):
(.panel-enabler-view input[type="radio"]:checked:active):

  • inspector/front-end/profilesPanel.css:

(.profile-launcher-view-tree-item > .icon):
(.profile-launcher-view-content):
(.profile-launcher-view-content h1):
(.panel-enabler-view.profile-launcher-view form):
(.panel-enabler-view.profile-launcher-view label):
(.profile-launcher-view-content p):
(.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)):
(.profile-launcher-view-content button.running:not(.status-bar-item)):
(body.inactive .profile-launcher-view-content button.running:not(.status-bar-item)):

LayoutTests:

  • inspector/profiler/profiler-test.js:

(initialize_ProfilerTest):

Location:
trunk
Files:
1 added
1 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r103762 r103765  
     12011-12-28  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: Introduce a Profiler launcher view similar to that in the Audits panel
     4        https://bugs.webkit.org/show_bug.cgi?id=75228
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/profiler/profiler-test.js:
     9        (initialize_ProfilerTest):
     10
    1112011-12-28  Hans Wennborg  <hans@chromium.org>
    212
  • trunk/LayoutTests/inspector/profiler/profiler-test.js

    r81945 r103765  
    7676
    7777    var profilesPanel = WebInspector.panels.profiles;
    78     if (profilesPanel.visibleView && profilesPanel.visibleView.profile.title === title)
     78    if (profilesPanel.visibleView && profilesPanel.visibleView.profile && profilesPanel.visibleView.profile.title === title)
    7979        callback(profilesPanel.visibleView);
    8080    else
  • trunk/Source/WebCore/ChangeLog

    r103764 r103765  
     12011-12-28  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: Introduce a Profiler launcher view similar to that in the Audits panel
     4        https://bugs.webkit.org/show_bug.cgi?id=75228
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * English.lproj/localizedStrings.js:
     9        * WebCore.gypi:
     10        * WebCore.vcproj/WebCore.vcproj:
     11        * inspector/front-end/AuditLauncherView.js:
     12        (WebInspector.AuditLauncherView):
     13        * inspector/front-end/AuditsPanel.js:
     14        (WebInspector.AuditsPanel):
     15        * inspector/front-end/DetailedHeapshotView.js:
     16        (WebInspector.DetailedHeapshotProfileType):
     17        (WebInspector.DetailedHeapshotProfileType.prototype.get treeItemTitle):
     18        (WebInspector.DetailedHeapshotProfileType.prototype.get description):
     19        * inspector/front-end/ProfileLauncherView.js: Added.
     20        (WebInspector.ProfileLauncherView):
     21        (WebInspector.ProfileLauncherView.prototype.setUpEventListeners):
     22        (WebInspector.ProfileLauncherView.prototype.addProfileType):
     23        (WebInspector.ProfileLauncherView.prototype._controlButtonClicked):
     24        (WebInspector.ProfileLauncherView.prototype._updateControls):
     25        (WebInspector.ProfileLauncherView.prototype._profileTypeChanged):
     26        (WebInspector.ProfileLauncherView.prototype._onProfileStarted):
     27        (WebInspector.ProfileLauncherView.prototype._onProfileFinished):
     28        * inspector/front-end/ProfileView.js:
     29        (WebInspector.CPUProfileType):
     30        (WebInspector.CPUProfileType.prototype.get treeItemTitle):
     31        (WebInspector.CPUProfileType.prototype.get description):
     32        * inspector/front-end/ProfilesPanel.js:
     33        (WebInspector.ProfileType.prototype.get treeItemTitle):
     34        (WebInspector.ProfileType.prototype.get description):
     35        (WebInspector.ProfilesPanel.prototype.get statusBarItems):
     36        (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
     37        (WebInspector.ProfilesPanel.prototype._onProfileTypeSelected):
     38        (WebInspector.ProfilesPanel.prototype._reset):
     39        (WebInspector.ProfilesPanel.prototype._showLauncherView):
     40        (WebInspector.ProfilesPanel.prototype._registerProfileType):
     41        (WebInspector.ProfilesPanel.prototype._addProfileHeader):
     42        (WebInspector.ProfilesPanel.prototype._updateInterface):
     43        (WebInspector.ProfileTypeTreeElement):
     44        (WebInspector.ProfileTypeTreeElement.prototype.collapse):
     45        (WebInspector.ProfilesSidebarTreeElement):
     46        (WebInspector.ProfilesSidebarTreeElement.prototype.onattach):
     47        (WebInspector.ProfilesSidebarTreeElement.prototype.onselect):
     48        (WebInspector.ProfilesSidebarTreeElement.prototype.get selectable):
     49        (WebInspector.ProfilesSidebarTreeElement.prototype.refresh):
     50        * inspector/front-end/WebKit.qrc:
     51        * inspector/front-end/WelcomeView.js: Removed.
     52        * inspector/front-end/auditsPanel.css:
     53        (.audit-launcher-view .audit-launcher-view-content):
     54        (.audit-launcher-view div.button-container):
     55        (.panel-enabler-view.audit-launcher-view label):
     56        (.panel-enabler-view.audit-launcher-view label.disabled):
     57        * inspector/front-end/inspector.html:
     58        * inspector/front-end/panelEnablerView.css:
     59        (.panel-enabler-view img):
     60        (.panel-enabler-view .flexible-space):
     61        (.panel-enabler-view button:not(.status-bar-item)):
     62        (body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled):
     63        (.panel-enabler-view input[type="radio"]):
     64        (.panel-enabler-view input[type="radio"]:active:not(:disabled)):
     65        (.panel-enabler-view input[type="radio"]:checked):
     66        (.panel-enabler-view input[type="radio"]:checked:active):
     67        * inspector/front-end/profilesPanel.css:
     68        (.profile-launcher-view-tree-item > .icon):
     69        (.profile-launcher-view-content):
     70        (.profile-launcher-view-content h1):
     71        (.panel-enabler-view.profile-launcher-view form):
     72        (.panel-enabler-view.profile-launcher-view label):
     73        (.profile-launcher-view-content p):
     74        (.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)):
     75        (.profile-launcher-view-content button.running:not(.status-bar-item)):
     76        (body.inactive .profile-launcher-view-content button.running:not(.status-bar-item)):
     77
    1782011-12-28  Sheriff Bot  <webkit.review.bot@gmail.com>
    279
  • trunk/Source/WebCore/WebCore.gypi

    r103742 r103765  
    64476447            'inspector/front-end/Popover.js',
    64486448            'inspector/front-end/ProfileDataGridTree.js',
     6449            'inspector/front-end/ProfileLauncherView.js',
    64496450            'inspector/front-end/ProfilesPanel.js',
    64506451            'inspector/front-end/ProfileView.js',
     
    65116512            'inspector/front-end/View.js',
    65126513            'inspector/front-end/WatchExpressionsSidebarPane.js',
    6513             'inspector/front-end/WelcomeView.js',
    65146514            'inspector/front-end/WorkerManager.js',
    65156515            'inspector/front-end/WorkersSidebarPane.js',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r103707 r103765  
    7183871838                                </File>
    7183971839                                <File
     71840                                        RelativePath="..\inspector\front-end\ProfileLauncherView.js"
     71841                                        >
     71842                                </File>
     71843                                <File
    7184071844                                        RelativePath="..\inspector\front-end\ProfilesPanel.js"
    7184171845                                        >
     
    7212772131                                <File
    7212872132                                        RelativePath="..\inspector\front-end\WatchExpressionsSidebarPane.js"
    72129                                         >
    72130                                 </File>
    72131                                 <File
    72132                                         RelativePath="..\inspector\front-end\WelcomeView.js"
    7213372133                                        >
    7213472134                                </File>
  • trunk/Source/WebCore/inspector/front-end/AuditLauncherView.js

    r102109 r103765  
    3636{
    3737    WebInspector.View.call(this);
     38
    3839    this._runnerCallback = runnerCallback;
    3940    this._stopCallback = stopCallback;
     
    4243
    4344    this.element.addStyleClass("audit-launcher-view");
     45    this.element.addStyleClass("panel-enabler-view");
    4446
    4547    this._contentElement = document.createElement("div");
  • trunk/Source/WebCore/inspector/front-end/AuditsPanel.js

    r102109 r103765  
    3636{
    3737    WebInspector.Panel.call(this, "audits");
     38    this.registerRequiredCSS("panelEnablerView.css");
    3839    this.registerRequiredCSS("auditsPanel.css");
    3940
  • trunk/Source/WebCore/inspector/front-end/DetailedHeapshotView.js

    r103176 r103765  
    12981298WebInspector.DetailedHeapshotProfileType = function()
    12991299{
    1300     WebInspector.ProfileType.call(this, WebInspector.DetailedHeapshotProfileType.TypeId, WebInspector.UIString("HEAP SNAPSHOTS"));
     1300    WebInspector.ProfileType.call(this, WebInspector.DetailedHeapshotProfileType.TypeId, WebInspector.UIString("Take Heap Snapshot"));
    13011301}
    13021302
     
    13191319    },
    13201320
    1321     get welcomeMessage()
    1322     {
    1323         return WebInspector.UIString("Get a heap snapshot by pressing the %s button on the status bar.");
     1321    get treeItemTitle()
     1322    {
     1323        return WebInspector.UIString("HEAP SNAPSHOTS");
     1324    },
     1325
     1326    get description()
     1327    {
     1328        return WebInspector.UIString("Heap snapshot profiles show memory distribution among your page's JavaScript objects and related DOM nodes.");
    13241329    },
    13251330
  • trunk/Source/WebCore/inspector/front-end/ProfileView.js

    r102910 r103765  
    570570WebInspector.CPUProfileType = function()
    571571{
    572     WebInspector.ProfileType.call(this, WebInspector.CPUProfileType.TypeId, WebInspector.UIString("CPU PROFILES"));
     572    WebInspector.ProfileType.call(this, WebInspector.CPUProfileType.TypeId, WebInspector.UIString("Collect JavaScript CPU Profile"));
    573573    this._recording = false;
    574574    WebInspector.CPUProfileType.instance = this;
     
    599599    },
    600600
    601     get welcomeMessage()
    602     {
    603         return WebInspector.UIString("Control CPU profiling by pressing the %s button on the status bar.");
     601    get treeItemTitle()
     602    {
     603        return WebInspector.UIString("CPU PROFILES");
     604    },
     605
     606    get description()
     607    {
     608        return WebInspector.UIString("CPU profiles show where the execution time is spent in your page's JavaScript functions.");
    604609    },
    605610
  • trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js

    r102906 r103765  
    5555    },
    5656
     57    get treeItemTitle()
     58    {
     59        return this._name;
     60    },
     61
    5762    get name()
    5863    {
     
    7176    },
    7277
    73     get welcomeMessage()
     78    get description()
    7479    {
    7580        return "";
     
    100105{
    101106    WebInspector.Panel.call(this, "profiles");
     107    this.registerRequiredCSS("panelEnablerView.css");
    102108    this.registerRequiredCSS("heapProfiler.css");
    103109    this.registerRequiredCSS("profilesPanel.css");
     
    105111    this.createSplitViewWithSidebarTree();
    106112
     113    this.profilesItemTreeElement = new WebInspector.ProfilesSidebarTreeElement(this);
     114    this.sidebarTree.appendChild(this.profilesItemTreeElement);
     115
    107116    this._profileTypesByIdMap = {};
    108     this._profileTypeButtonsByIdMap = {};
    109117
    110118    var panelEnablerHeading = WebInspector.UIString("You need to enable profiling before you can use the Profiles panel.");
     
    123131        this.enableToggleButton.element.addStyleClass("hidden");
    124132
     133    this.recordButton = new WebInspector.StatusBarButton("", "record-profile-status-bar-item");
     134    this.recordButton.addEventListener("click", this.toggleRecordButton, this);
     135
    125136    this.clearResultsButton = new WebInspector.StatusBarButton(WebInspector.UIString("Clear all profiles."), "clear-status-bar-item");
    126137    this.clearResultsButton.addEventListener("click", this._clearProfiles.bind(this), false);
     
    129140    this.profileViewStatusBarItemsContainer.className = "status-bar-items";
    130141
    131     this.welcomeView = new WebInspector.WelcomeView("profiles", WebInspector.UIString("Welcome to the Profiles panel"));
    132 
    133142    this._profiles = [];
    134143    this._profilerEnabled = !Capabilities.profilerCausesRecompilation;
     144
     145    this._launcherView = new WebInspector.ProfileLauncherView(this);
     146    this._launcherView.addEventListener(WebInspector.ProfileLauncherView.EventTypes.ProfileTypeSelected, this._onProfileTypeSelected, this);
    135147    this._reset();
     148    this._launcherView.setUpEventListeners();
    136149
    137150    this._registerProfileType(new WebInspector.CPUProfileType());
     
    145158}
    146159
     160WebInspector.ProfilesPanel.EventTypes = {
     161    ProfileStarted: "profile-started",
     162    ProfileFinished: "profile-finished"
     163}
     164
    147165WebInspector.ProfilesPanel.prototype = {
    148166    get toolbarItemLabel()
     
    153171    get statusBarItems()
    154172    {
    155         function clickHandler(profileType, button)
    156         {
    157             var wasProfiling = button.toggled;
    158             profileType.buttonClicked.call(profileType);
    159             this.updateProfileTypeButtons(!wasProfiling, button);
    160         }
    161 
    162         var items = [this.enableToggleButton.element];
    163         // FIXME: Generate a single "combo-button".
    164         for (var typeId in this._profileTypesByIdMap) {
    165             var profileType = this.getProfileType(typeId);
    166             if (profileType.buttonStyle) {
    167                 var button = new WebInspector.StatusBarButton(profileType.buttonTooltip, profileType.buttonStyle);
    168                 this._profileTypeButtonsByIdMap[typeId] = button;
    169                 button.element.addEventListener("click", clickHandler.bind(this, profileType, button), false);
    170                 items.push(button.element);
    171             }
    172         }
    173         items.push(this.clearResultsButton.element, this.profileViewStatusBarItemsContainer);
    174         return items;
     173        return [this.enableToggleButton.element, this.recordButton.element, this.clearResultsButton.element, this.profileViewStatusBarItemsContainer];
     174    },
     175
     176    toggleRecordButton: function()
     177    {
     178        this._selectedProfileType.buttonClicked();
    175179    },
    176180
     
    200204        this._profilerEnabled = false;
    201205        this._reset();
     206    },
     207
     208    _onProfileTypeSelected: function(event)
     209    {
     210        this._selectedProfileType = event.data;
     211        this.recordButton.title = this._selectedProfileType.buttonTooltip;
    202212    },
    203213
     
    221231        this.searchCanceled();
    222232
     233        for (var id in this._profileTypesByIdMap) {
     234            var treeElement = this._profileTypesByIdMap[id].treeElement;
     235            treeElement.removeChildren();
     236            treeElement.hidden = true;
     237        }
     238
    223239        this._profiles = [];
    224240        this._profilesIdMap = {};
     
    229245        this.sidebarTreeElement.removeStyleClass("some-expandable");
    230246
    231         for (var typeId in this._profileTypesByIdMap)
    232             this.getProfileType(typeId).treeElement.removeChildren();
    233 
    234247        this.profileViews.removeChildren();
    235 
    236248        this.profileViewStatusBarItemsContainer.removeChildren();
    237249
    238250        this.removeAllListeners();
     251        this._launcherView.setUpEventListeners();
    239252
    240253        this._updateInterface();
    241         this.welcomeView.show(this.splitView.mainElement);
     254        this.profilesItemTreeElement.select();
     255        this._showLauncherView();
     256    },
     257
     258    _showLauncherView: function()
     259    {
     260        this.closeVisibleView();
     261        this.profileViewStatusBarItemsContainer.removeChildren();
     262        this._launcherView.show(this.splitView.mainElement);
     263        this.visibleView = this._launcherView;
    242264    },
    243265
     
    251273    {
    252274        this._profileTypesByIdMap[profileType.id] = profileType;
    253         profileType.treeElement = new WebInspector.SidebarSectionTreeElement(profileType.name, null, true);
     275        this._launcherView.addProfileType(profileType);
     276        profileType.treeElement = new WebInspector.ProfileTypeTreeElement(profileType.treeItemTitle);
     277        profileType.treeElement.hidden = true;
    254278        this.sidebarTree.appendChild(profileType.treeElement);
    255         profileType.treeElement.expand();
    256         this._addWelcomeMessage(profileType);
    257     },
    258 
    259     _addWelcomeMessage: function(profileType)
    260     {
    261         var message = profileType.welcomeMessage;
    262         // Message text is supposed to have a '%s' substring as a placeholder
    263         // for a status bar button. If it is there, we split the message in two
    264         // parts, and insert the button between them.
    265         var buttonPos = message.indexOf("%s");
    266         if (buttonPos > -1) {
    267             var container = document.createDocumentFragment();
    268             var part1 = document.createElement("span");
    269             part1.textContent = message.substr(0, buttonPos);
    270             container.appendChild(part1);
    271 
    272             var button = new WebInspector.StatusBarButton(profileType.buttonTooltip, profileType.buttonStyle, profileType.buttonCaption);
    273             container.appendChild(button.element);
    274 
    275             var part2 = document.createElement("span");
    276             part2.textContent = message.substr(buttonPos + 2);
    277             container.appendChild(part2);
    278             this.welcomeView.addMessage(container);
    279         } else
    280             this.welcomeView.addMessage(message);
    281279    },
    282280
     
    294292        var profileType = this.getProfileType(typeId);
    295293        var sidebarParent = profileType.treeElement;
     294        sidebarParent.hidden = false;
    296295        var small = false;
    297296        var alternateTitle;
     
    346345        sidebarParent.appendChild(profileTreeElement);
    347346        if (!profile.isTemporary) {
    348             this.welcomeView.detach();
    349347            if (!this.visibleView)
    350348                this.showProfile(profile);
    351349            this.dispatchEventToListeners("profile added");
    352             this.updateProfileTypeButtons(false, this._profileTypeButtonsByIdMap[typeId]);
    353         }
     350            delete this._temporaryRecordingProfile;
     351            this.dispatchEventToListeners(WebInspector.ProfilesPanel.EventTypes.ProfileFinished);
     352            this.recordButton.toggled = false;
     353        } else {
     354            this.dispatchEventToListeners(WebInspector.ProfilesPanel.EventTypes.ProfileStarted);
     355            this.recordButton.toggled = true;
     356        }
     357
     358        this.recordButton.title = this._selectedProfileType.buttonTooltip;
    354359    },
    355360
     
    504509    },
    505510
    506     /**
    507      * @param {boolean} isProfiling
    508      * @param {WebInspector.StatusBarButton=} effectButton
    509      */
    510     updateProfileTypeButtons: function(isProfiling, effectButton)
    511     {
    512         for (var typeId in this._profileTypeButtonsByIdMap) {
    513             var button = this._profileTypeButtonsByIdMap[typeId];
    514             var profileType = this.getProfileType(typeId);
    515             button.element.className = profileType.buttonStyle;
    516             button.element.title = profileType.buttonTooltip;
    517             // FIXME: Apply profileType.buttonCaption once captions are added to button controls.
    518             if (!isProfiling)
    519                 button.disabled = false;
    520             else {
    521                 if (effectButton && button !== effectButton)
    522                     button.disabled = true;
    523             }
    524         }
    525     },
    526 
    527511    closeVisibleView: function()
    528512    {
     
    760744            this.enableToggleButton.title = WebInspector.UIString("Profiling enabled. Click to disable.");
    761745            this.enableToggleButton.toggled = true;
    762             for (var typeId in this._profileTypeButtonsByIdMap)
    763                 this._profileTypeButtonsByIdMap[typeId].visible = true;
     746            this.recordButton.visible = true;
    764747            this.profileViewStatusBarItemsContainer.removeStyleClass("hidden");
    765748            this.clearResultsButton.element.removeStyleClass("hidden");
     
    768751            this.enableToggleButton.title = WebInspector.UIString("Profiling disabled. Click to enable.");
    769752            this.enableToggleButton.toggled = false;
    770             for (var typeId in this._profileTypeButtonsByIdMap)
    771                 this._profileTypeButtonsByIdMap[typeId].visible = false;
     753            this.recordButton.visible = false;
    772754            this.profileViewStatusBarItemsContainer.addStyleClass("hidden");
    773755            this.clearResultsButton.element.addStyleClass("hidden");
     
    924906}
    925907
     908WebInspector.ProfileTypeTreeElement = function(title)
     909{
     910    WebInspector.SidebarSectionTreeElement.call(this, title, null, true);
     911    this.expand();
     912}
     913
     914WebInspector.ProfileTypeTreeElement.prototype = {
     915    collapse: function()
     916    {
     917        // Should not collapse.
     918    }
     919}
     920
     921WebInspector.ProfileTypeTreeElement.prototype.__proto__ = WebInspector.SidebarSectionTreeElement.prototype;
     922
    926923WebInspector.ProfileSidebarTreeElement = function(profile, titleFormat, className)
    927924{
     
    996993
    997994WebInspector.ProfileGroupSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
     995
     996/**
     997 * @constructor
     998 * @extends {WebInspector.SidebarTreeElement}
     999 */
     1000WebInspector.ProfilesSidebarTreeElement = function(panel)
     1001{
     1002    this._panel = panel;
     1003    this.small = false;
     1004
     1005    WebInspector.SidebarTreeElement.call(this, "profile-launcher-view-tree-item", WebInspector.UIString("Profiles"), "", null, false);
     1006}
     1007
     1008WebInspector.ProfilesSidebarTreeElement.prototype = {
     1009    onselect: function()
     1010    {
     1011        this._panel._showLauncherView();
     1012    },
     1013
     1014    get selectable()
     1015    {
     1016        return true;
     1017    }
     1018}
     1019
     1020WebInspector.ProfilesSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r103707 r103765  
    9090    <file>Popover.js</file>
    9191    <file>ProfileDataGridTree.js</file>
     92    <file>ProfileLauncherView.js</file>
    9293    <file>ProfilesPanel.js</file>
    9394    <file>ProfileView.js</file>
     
    154155    <file>View.js</file>
    155156    <file>WatchExpressionsSidebarPane.js</file>
    156     <file>WelcomeView.js</file>
    157157    <file>WorkerManager.js</file>
    158158    <file>WorkersSidebarPane.js</file>
  • trunk/Source/WebCore/inspector/front-end/auditsPanel.css

    r101509 r103765  
    6565    white-space: nowrap;
    6666    display: -webkit-box;
     67    text-align: left;
    6768    -webkit-box-orient: vertical;
    6869}
    6970
    7071.audit-launcher-view h1 {
    71     color: rgb(110, 116, 128);
    72     font-size: 16px;
    73     line-height: 20px;
    74     font-weight: normal;
    7572    padding-top: 15px;
    7673}
     
    8986    padding: 16px 0;
    9087}
    91 .audit-launcher-view .flexible-space {
    92     -webkit-box-flex: 1;
    93 }
    9488
    9589.audit-launcher-view div.audit-categories-container {
     
    10296
    10397.audit-launcher-view button {
    104     color: rgb(6, 6, 6);
    105     background-color: transparent;
    106     border: 1px solid rgb(165, 165, 165);
    107     background-color: rgb(237, 237, 237);
    108     background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
    109     -webkit-border-radius: 12px;
    110     -webkit-appearance: none;
    111 }
    112 
    113 .audit-launcher-view button {
    114     font-size: 13px;
    115     padding: 3px 20px;
    116     height: 24px;
    11798    margin: 0 5px 0 0;
    11899}
     
    123104}
    124105
    125 body.inactive .audit-launcher-view button, .audit-launcher-view button:disabled {
    126     color: rgb(130, 130, 130);
    127     border-color: rgb(212, 212, 212);
    128     background-color: rgb(239, 239, 239);
    129     background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(250, 250, 250)), to(rgb(235, 235, 235)));
    130 }
    131 
    132 .audit-launcher-view label {
    133     position: relative;
    134     display: block;
    135     text-align: left;
    136     word-break: break-word;
     106.panel-enabler-view.audit-launcher-view label {
    137107    padding: 0 0 5px 0;
    138 }
    139 
    140 .audit-launcher-view label.disabled {
     108    margin: 0;
     109}
     110
     111.panel-enabler-view.audit-launcher-view label.disabled {
    141112    color: rgb(130, 130, 130);
    142113}
     
    144115.audit-launcher-view input[type="checkbox"] {
    145116    margin-left: 0;
    146 }
    147 
    148 .audit-launcher-view input[type="radio"] {
    149     height: 17px;
    150     width: 17px;
    151     border: 1px solid rgb(165, 165, 165);
    152     background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
    153     -webkit-border-radius: 8px;
    154     -webkit-appearance: none;
    155     vertical-align: middle;
    156     margin: 0 5px 5px 0;
    157 }
    158 
    159 .audit-launcher-view input[type="radio"]:active:not(:disabled) {
    160     background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
    161 }
    162 
    163 .audit-launcher-view input[type="radio"]:checked:not(:disabled), .audit-launcher-view input[type="radio"]:checked:disabled {
    164     background: url(Images/radioDot.png) center no-repeat,
    165                 -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
    166117}
    167118
  • trunk/Source/WebCore/inspector/front-end/inspector.html

    r103707 r103765  
    106106    <script type="text/javascript" src="StylesSidebarPane.js"></script>
    107107    <script type="text/javascript" src="PanelEnablerView.js"></script>
    108     <script type="text/javascript" src="WelcomeView.js"></script>
    109108    <script type="text/javascript" src="StatusBarButton.js"></script>
    110109    <script type="text/javascript" src="ElementsPanel.js"></script>
     
    154153    <script type="text/javascript" src="DatabaseTableView.js"></script>
    155154    <script type="text/javascript" src="DatabaseQueryView.js"></script>
     155    <script type="text/javascript" src="ProfileLauncherView.js"></script>
    156156    <script type="text/javascript" src="ProfileDataGridTree.js"></script>
    157157    <script type="text/javascript" src="BottomUpProfileDataGridTree.js"></script>
  • trunk/Source/WebCore/inspector/front-end/panelEnablerView.css

    r98228 r103765  
    7777}
    7878
    79 .panel-enabler-view img, div.welcome-instructions-aligner {
     79.panel-enabler-view img {
    8080    height: 100%;
    8181    min-height: 200px;
     
    9191    display: initial !important;
    9292    width: 0;
     93}
     94
     95.panel-enabler-view .flexible-space {
     96    -webkit-box-flex: 1;
    9397}
    9498
     
    115119    padding: 3px 20px;
    116120    height: 24px;
     121    color: rgb(6, 6, 6);
     122    background-color: transparent;
     123    border: 1px solid rgb(165, 165, 165);
     124    background-color: rgb(237, 237, 237);
     125    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
     126    -webkit-border-radius: 12px;
     127    -webkit-appearance: none;
    117128}
    118129
    119 .panel-enabler-view.welcome {
    120     z-index: auto;
     130body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled {
     131    color: rgb(130, 130, 130);
     132    border-color: rgb(212, 212, 212);
     133    background-color: rgb(239, 239, 239);
     134    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(250, 250, 250)), to(rgb(235, 235, 235)));
    121135}
    122136
    123 .panel-enabler-view.welcome div.welcome-instructions-aligner {
    124     display: inline-block;
    125     width: 0;
    126 }
    127 
    128 .panel-enabler-view.welcome .instructions {
    129     display: inline-block;
    130     vertical-align: middle;
    131     margin: 0;
    132     white-space: normal;
    133     line-height: 175%;
    134 }
    135 
    136 .panel-enabler-view.welcome .message {
    137     margin-bottom: 2ex;
    138 }
    139 
    140 .panel-enabler-view.welcome button.status-bar-item {
    141     background-image: none;
    142     vertical-align: top;
    143 }
    144 
    145 .panel-enabler-view input {
     137.panel-enabler-view input[type="radio"] {
    146138    height: 17px;
    147139    width: 17px;
     
    154146}
    155147
    156 .panel-enabler-view input:active {
     148.panel-enabler-view input[type="radio"]:active:not(:disabled) {
    157149    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
    158150}
    159151
    160 .panel-enabler-view input:checked {
     152.panel-enabler-view input[type="radio"]:checked {
    161153    background: url(Images/radioDot.png) center no-repeat,
    162154                -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
     155}
     156
     157.panel-enabler-view input[type="radio"]:checked:active {
     158    background: url(Images/radioDot.png) center no-repeat,
     159                -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
    163160}
    164161
  • trunk/Source/WebCore/inspector/front-end/profilesPanel.css

    r100991 r103765  
    4646    border-left: 1px solid rgb(184, 184, 184);
    4747    margin-left: -1px;
     48}
     49
     50.profile-launcher-view-tree-item > .icon {
     51    padding: 15px;
     52    background-image: url(Images/toolbarIcons.png);
     53    background-position-x: -160px;
    4854}
    4955
     
    141147    -webkit-mask-position: 0 0;
    142148}
     149
     150.profile-launcher-view-content {
     151    position: absolute;
     152    top: 0;
     153    right: 0;
     154    bottom: 0;
     155    left: 0;
     156    padding: 0 0 0 16px;
     157    display: -webkit-box;
     158    text-align: left;
     159    -webkit-box-orient: vertical;
     160}
     161
     162.profile-launcher-view-content h1 {
     163    padding: 15px 0 10px;
     164}
     165
     166.panel-enabler-view.profile-launcher-view form {
     167    padding: 0;
     168    font-size: 13px;
     169    width: 100%;
     170}
     171
     172.panel-enabler-view.profile-launcher-view label {
     173    margin: 0;
     174}
     175
     176.profile-launcher-view-content p {
     177    color: grey;
     178    margin-top: 1px;
     179    margin-left: 22px;
     180}
     181
     182.panel-enabler-view.profile-launcher-view button:not(.status-bar-item) {
     183    color: rgb(6, 6, 6);
     184    margin: 16px 0;
     185}
     186
     187.profile-launcher-view-content button.running:not(.status-bar-item) {
     188    color: red;
     189}
     190
     191body.inactive .profile-launcher-view-content button.running:not(.status-bar-item) {
     192    color: rgb(220, 130, 130);
     193}
Note: See TracChangeset for help on using the changeset viewer.