Changeset 90635 in webkit


Ignore:
Timestamp:
Jul 8, 2011 8:53:56 AM (13 years ago)
Author:
loislo@chromium.org
Message:

Web Inspector: NetworkPanel search failed if the matched sting is in the query part of url
https://bugs.webkit.org/show_bug.cgi?id=64167

Reviewed by Yury Semikhatsky.

  • inspector/front-end/NetworkPanel.js:

(WebInspector.NetworkPanel.prototype._matchResource):
(WebInspector.NetworkPanel.prototype._highlightNthMatchedResource):
(WebInspector.NetworkDataGridNode.prototype._refreshNameCell):

  • inspector/front-end/Resource.js:

(WebInspector.Resource.prototype.get folder):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90634 r90635  
     12011-07-08  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: NetworkPanel search failed if the matched sting is in the query part of url
     4        https://bugs.webkit.org/show_bug.cgi?id=64167
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * inspector/front-end/NetworkPanel.js:
     9        (WebInspector.NetworkPanel.prototype._matchResource):
     10        (WebInspector.NetworkPanel.prototype._highlightNthMatchedResource):
     11        (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
     12        * inspector/front-end/Resource.js:
     13        (WebInspector.Resource.prototype.get folder):
     14
    1152011-07-08  Benjamin Poulain  <benjamin@webkit.org>
    216
  • trunk/Source/WebCore/inspector/front-end/NetworkPanel.js

    r90556 r90635  
    11181118            return -1;
    11191119
    1120         if ((!resource.displayName || !resource.displayName.match(this._searchRegExp)) && (!resource.path || !resource.path.match(this._searchRegExp)))
     1120        if ((!resource.displayName || !resource.displayName.match(this._searchRegExp)) && !resource.folder.match(this._searchRegExp))
    11211121            return -1;
    11221122
     
    11691169
    11701170        var nameMatched = resource.displayName && resource.displayName.match(this._searchRegExp);
    1171         var pathMatched = resource.path && resource.path.match(this._searchRegExp);
     1171        var pathMatched = resource.path && resource.folder.match(this._searchRegExp);
    11721172        if (!nameMatched && pathMatched && !this._largerResourcesButton.toggled)
    11731173            this._toggleLargerResources();
     
    16591659        var subtitle = this._resource.displayDomain;
    16601660
    1661         if (this._resource.path && this._resource.lastPathComponent) {
    1662             var lastPathComponentIndex = this._resource.path.lastIndexOf("/" + this._resource.lastPathComponent);
    1663             if (lastPathComponentIndex != -1)
    1664                 subtitle += this._resource.path.substring(0, lastPathComponentIndex);
    1665         }
     1661        if (this._resource.path)
     1662            subtitle += this._resource.folder;
    16661663
    16671664        this._appendSubtitle(this._nameCell, subtitle);
  • trunk/Source/WebCore/inspector/front-end/Resource.js

    r90389 r90635  
    248248    },
    249249
     250    get folder()
     251    {
     252        var path = this.path;
     253        var indexOfQuery = path.indexOf("?");
     254        if (indexOfQuery !== -1)
     255            path = path.substring(0, indexOfQuery);
     256        var lastSlashIndex = path.lastIndexOf("/");
     257        return lastSlashIndex !== -1 ? path.substring(0, lastSlashIndex) : "";
     258    },
     259
    250260    get displayDomain()
    251261    {
Note: See TracChangeset for help on using the changeset viewer.