Changeset 121671 in webkit


Ignore:
Timestamp:
Jul 2, 2012 5:07:51 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Add DirectoryContentView for FileSystemView
https://bugs.webkit.org/show_bug.cgi?id=89961

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-07-02
Reviewed by Vsevolod Vlasov.

  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/compile-front-end.py:
  • inspector/front-end/DirectoryContentView.js: Added.
  • inspector/front-end/FileSystemView.js:

(WebInspector.FileSystemView):
(WebInspector.FileSystemView.EntryTreeElement.prototype.onattach):
(WebInspector.FileSystemView.EntryTreeElement.prototype.onselect):
(WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):

  • inspector/front-end/WebKit.qrc:
  • inspector/front-end/inspector.html:
Location:
trunk/Source/WebCore
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121668 r121671  
     12012-07-02  Taiju Tsuiki  <tzik@chromium.org>
     2
     3        Web Inspector: Add DirectoryContentView for FileSystemView
     4        https://bugs.webkit.org/show_bug.cgi?id=89961
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        * WebCore.gypi:
     9        * WebCore.vcproj/WebCore.vcproj:
     10        * inspector/compile-front-end.py:
     11        * inspector/front-end/DirectoryContentView.js: Added.
     12        * inspector/front-end/FileSystemView.js:
     13        (WebInspector.FileSystemView):
     14        (WebInspector.FileSystemView.EntryTreeElement.prototype.onattach):
     15        (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect):
     16        (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):
     17        * inspector/front-end/WebKit.qrc:
     18        * inspector/front-end/inspector.html:
     19
    1202012-07-02  Christophe Dumez  <christophe.dumez@intel.com>
    221
  • trunk/Source/WebCore/WebCore.gypi

    r121610 r121671  
    62576257            'inspector/front-end/DebuggerScriptMapping.js',
    62586258            'inspector/front-end/Dialog.js',
     6259            'inspector/front-end/DirectoryContentView.js',
    62596260            'inspector/front-end/DOMAgent.js',
    62606261            'inspector/front-end/DOMBreakpointsSidebarPane.js',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r121542 r121671  
    7485174851                                </File>
    7485274852                                <File
     74853                                        RelativePath="..\inspector\front-end\DirectoryContentView.js"
     74854                                        >
     74855                                </File>
     74856                                <File
    7485374857                                        RelativePath="..\inspector\front-end\DOMAgent.js"
    7485474858                                        >
  • trunk/Source/WebCore/inspector/compile-front-end.py

    r121542 r121671  
    211211            "DatabaseQueryView.js",
    212212            "DatabaseTableView.js",
     213            "DirectoryContentView.js",
    213214            "DOMStorageItemsView.js",
    214215            "FileSystemView.js",
  • trunk/Source/WebCore/inspector/front-end/FileSystemView.js

    r121542 r121671  
    3838    WebInspector.SplitView.call(this, WebInspector.SplitView.SidebarPosition.Left, "FileSystemViewSidebarWidth");
    3939    this.element.addStyleClass("file-system-view");
     40    this.element.addStyleClass("storage-view");
    4041
    4142    var directoryTreeElement = this.element.createChild("ol", "filesystem-directory-tree");
     
    8788        var selection = this.listItemElement.createChild("div", "selection");
    8889        this.listItemElement.insertBefore(selection, this.listItemElement.firstChild);
     90    },
    8991
    90         this.listItemElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
     92    onselect: function()
     93    {
     94        if (!this._view) {
     95            if (this._entry.isDirectory)
     96                this._view = new WebInspector.DirectoryContentView();
     97            else
     98                return;
     99        }
     100        this._fileSystemView.showView(this._view);
     101        this.refresh();
    91102    },
    92103
     
    94105    {
    95106        this.refresh();
    96     },
    97 
    98     _handleContextMenuEvent: function(event)
    99     {
    100         if (!this._entry.isDirectory)
    101             return;
    102 
    103         var contextMenu = new WebInspector.ContextMenu();
    104         contextMenu.appendItem(WebInspector.UIString("Refresh"), this.refresh.bind(this));
    105         contextMenu.show(event);
    106107    },
    107108
     
    124125
    125126        entries.sort(WebInspector.FileSystemModel.Entry.compare);
     127        if (this._view)
     128            this._view.showEntries(entries);
     129
    126130        var oldChildren = this.children.slice(0);
    127131
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r121542 r121671  
    4141    <file>DebuggerScriptMapping.js</file>
    4242    <file>Dialog.js</file>
     43    <file>DirectoryContentView.js</file>
    4344    <file>DOMAgent.js</file>
    4445    <file>DOMBreakpointsSidebarPane.js</file>
  • trunk/Source/WebCore/inspector/front-end/inspector.html

    r121542 r121671  
    162162    <script type="text/javascript" src="SourceHTMLTokenizer.js"></script>
    163163    <script type="text/javascript" src="SourceJavaScriptTokenizer.js"></script>
     164    <script type="text/javascript" src="DirectoryContentView.js"></script>
    164165    <script type="text/javascript" src="FileSystemModel.js"></script>
    165166    <script type="text/javascript" src="FileSystemView.js"></script>
Note: See TracChangeset for help on using the changeset viewer.