Changeset 70454 in webkit


Ignore:
Timestamp:
Oct 25, 2010 9:01:34 AM (13 years ago)
Author:
pfeldman@chromium.org
Message:

2010-10-25 Pavel Feldman <pfeldman@chromium.org>

Reviewed by Timothy Hatcher.

Web Inspector: slowly make old resources panel optional (continued).
https://bugs.webkit.org/show_bug.cgi?id=48207

  • inspector/front-end/Resource.js: (WebInspector.Resource.prototype.set url):
  • inspector/front-end/StoragePanel.js: (WebInspector.StoragePanel.prototype.get toolbarItemLabel): (WebInspector.StoragePanel.prototype.showResource): (WebInspector.StoragePanel.prototype.searchMatchFound): (WebInspector.StoragePanel.prototype._findTreeElementForResource): (WebInspector.StoragePanel.prototype._findTreeElementForResource.getParent): (WebInspector.BaseStorageTreeElement.prototype.onattach):
  • inspector/front-end/inspector.css: (.storage.panel .sidebar): (.storage.panel .sidebar li): (.storage.panel .sidebar li.parent): (.storage.panel .sidebar li.selected): (.storage.panel .sidebar li .selection): (.storage.panel .sidebar :focus li .selection): (body.inactive .storage.panel .sidebar li .selection): (.storage.panel .sidebar .icon):
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70452 r70454  
     12010-10-25  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Web Inspector: slowly make old resources panel optional (continued).
     6        https://bugs.webkit.org/show_bug.cgi?id=48207
     7
     8        * inspector/front-end/Resource.js:
     9        (WebInspector.Resource.prototype.set url):
     10        * inspector/front-end/StoragePanel.js:
     11        (WebInspector.StoragePanel.prototype.get toolbarItemLabel):
     12        (WebInspector.StoragePanel.prototype.showResource):
     13        (WebInspector.StoragePanel.prototype.searchMatchFound):
     14        (WebInspector.StoragePanel.prototype._findTreeElementForResource):
     15        (WebInspector.StoragePanel.prototype._findTreeElementForResource.getParent):
     16        (WebInspector.BaseStorageTreeElement.prototype.onattach):
     17        * inspector/front-end/inspector.css:
     18        (.storage.panel .sidebar):
     19        (.storage.panel .sidebar li):
     20        (.storage.panel .sidebar li.parent):
     21        (.storage.panel .sidebar li.selected):
     22        (.storage.panel .sidebar li .selection):
     23        (.storage.panel .sidebar :focus li .selection):
     24        (body.inactive .storage.panel .sidebar li .selection):
     25        (.storage.panel .sidebar .icon):
     26
    1272010-10-25  No'am Rosenthal  <noam.rosenthal@nokia.com>
    228
  • trunk/WebCore/inspector/front-end/Resource.js

    r70445 r70454  
    106106        this.lastPathComponent = "";
    107107        if (parsedURL && parsedURL.path) {
    108             var lastSlashIndex = parsedURL.path.lastIndexOf("/");
     108            // First cut the query params.
     109            var path = parsedURL.path;
     110            var indexOfQuery = path.indexOf("?");
     111            if (indexOfQuery !== -1)
     112                path = path.substring(0, indexOfQuery);
     113
     114            // Then take last path component.
     115            var lastSlashIndex = path.lastIndexOf("/");
    109116            if (lastSlashIndex !== -1)
    110                 this.lastPathComponent = parsedURL.path.substring(lastSlashIndex + 1);
     117                this.lastPathComponent = path.substring(lastSlashIndex + 1);
    111118        }
    112119        this.lastPathComponentLowerCase = this.lastPathComponent.toLowerCase();
  • trunk/WebCore/inspector/front-end/StoragePanel.js

    r70445 r70454  
    7878    get toolbarItemLabel()
    7979    {
    80         return WebInspector.UIString("Storage");
     80        return Preferences.networkPanelEnabled ? WebInspector.UIString("Resources") : WebInspector.UIString("Storage");
    8181    },
    8282
     
    263263    showResource: function(resource, line)
    264264    {
    265         var resourceTreeElement = this.sidebarTree.findTreeElement(resource);
     265        var resourceTreeElement = this._findTreeElementForResource(resource);
    266266        if (resourceTreeElement) {
    267267            resourceTreeElement.reveal();
     
    567567        if (!view.resource)
    568568            return;
    569         var treeElement = this.sidebarTree.findTreeElement(view.resource);
     569        var treeElement = this._findTreeElementForResource(view.resource);
    570570        if (treeElement)
    571571            treeElement.searchMatchFound(matches);
     572    },
     573
     574    _findTreeElementForResource: function(resource)
     575    {
     576        function isAncestor(ancestor, object)
     577        {
     578            console.error("There should be no calls to isAncestor, but there was one for ", object);
     579            return false;
     580        }
     581
     582        function getParent(object)
     583        {
     584            console.error("There should be no calls to getParent, but there was one for ", object);
     585            return null;
     586        }
     587
     588        return this.sidebarTree.findTreeElement(resource, isAncestor, getParent);
    572589    },
    573590
     
    619636        this.listItemElement.addStyleClass(this._iconClass);
    620637
     638        var selectionElement = document.createElement("div");
     639        selectionElement.className = "selection";
     640        this.listItemElement.appendChild(selectionElement);
     641
    621642        this.imageElement = document.createElement("img");
    622643        this.imageElement.className = "icon";
     
    627648        this.titleElement.textContent = this._titleText;
    628649        this.listItemElement.appendChild(this.titleElement);
    629 
    630         var selectionElement = document.createElement("div");
    631         selectionElement.className = "selection";
    632         this.listItemElement.appendChild(selectionElement);
    633650    },
    634651
  • trunk/WebCore/inspector/front-end/inspector.css

    r70445 r70454  
    19191919
    19201920.storage.panel .sidebar {
    1921     border-left: rgb(232, 232, 232);
    1922     background-color: transparent;
    1923     padding-left: 0px;
    1924 }
    1925 
    1926 .storage.panel .outline-disclosure li {
     1921    padding-left: 0;
     1922    z-index: 10;
     1923}
     1924
     1925.storage.panel .sidebar li {
    19271926    height: 17px;
    19281927    white-space: nowrap;
     
    19311930}
    19321931
    1933 .storage.panel .outline-disclosure li.parent {
     1932.storage.panel .sidebar li.parent {
    19341933    text-indent: 0;
    19351934    margin-left: -12px;
    19361935}
    19371936
    1938 .storage.panel .outline-disclosure li .selection {
     1937.storage.panel .sidebar li.selected {
     1938    color: white;
     1939    text-shadow: rgba(0, 0, 0, 0.33) 0 1px 0;
     1940    font-weight: bold;
     1941}
     1942
     1943.storage.panel .sidebar li .selection {
     1944    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(162, 177, 207)), to(rgb(120, 138, 177)));
     1945    border-top: 1px solid #979797;
    19391946    height: 17px;
    1940     margin-top: -13px;
    1941 }
    1942 
    1943 .storage.panel .sidebar-resizer-vertical {
    1944     background: rgb(220, 220, 220);
    1945     border-left: 1px solid gray;
    1946     border-right: 1px solid gray;
    1947 }
    1948 
    1949 .storage.panel .outline-disclosure .icon {
     1947}
     1948
     1949.storage.panel .sidebar :focus li .selection {
     1950    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(92, 147, 213)), to(rgb(21, 83, 170)));
     1951    border-top: 1px solid rgb(68, 128, 200);
     1952}
     1953
     1954body.inactive .storage.panel .sidebar li .selection {
     1955    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(180, 180, 180)), to(rgb(138, 138, 138)));
     1956    border-top: 1px solid rgb(151, 151, 151);
     1957}
     1958
     1959.storage.panel .sidebar .icon {
    19501960    width: 16px;
    19511961    height: 16px;
Note: See TracChangeset for help on using the changeset viewer.