Changeset 17469 in webkit


Ignore:
Timestamp:
Oct 30, 2006 9:29:07 PM (18 years ago)
Author:
thatcher
Message:

Reviewed by Tim H.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=11353

  • Drosera/debugger.js: ParsedURL() object now recognizes local files
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r17468 r17469  
     12006-10-30  Vladimir Olexa  <vladimir.olexa@gmail.com>
     2
     3        Reviewed by Tim H.
     4
     5        Fixes: http://bugs.webkit.org/show_bug.cgi?id=11353
     6
     7        * Drosera/debugger.js: ParsedURL() object now recognizes local files
     8
    192006-10-30  Darin Adler  <darin@apple.com>
    210
  • trunk/WebKitTools/Drosera/debugger.js

    r17436 r17469  
    983983    // Since we're getting the URL from the browser, we're safe to assume the URL is already well formatted
    984984    // and so there is no need for more sophisticated regular expression here
    985     var url_parts = url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/);
    986    
    987     // the domain here is considered the whole http://www.example.org:8000 string for display purposes
     985    var url_parts = ((url.substring(0,4)).toLowerCase() == "file") ? url.match(/(file:[\/]{2,3}(\w|\.|-|_|\/)+)\/(.*)/) : url.match(/(http[s]?:\/\/(www)?\.?(\w|\.|-)+\w(:\d{1,5})?)\/?(.*)/);   
     986    // the domain here is considered the whole http://www.example.org:8000 or file:///Users/user/folder/file.htm string for display purposes
    988987    this.domain = url_parts[1];
    989988    // the relative path is everything following the domain
    990     this.relativePath = "/" + url_parts[5];
     989    this.relativePath = (url_parts[5] === undefined) ? "/" + url_parts[3] : "/" + url_parts[5];
    991990}
    992991
Note: See TracChangeset for help on using the changeset viewer.