Changeset 122104 in webkit


Ignore:
Timestamp:
Jul 9, 2012 5:33:48 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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

Adding FileContentView to Inspector.
This class provides preview of text files in FileSystem.

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

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

(WebInspector.FileSystemView.prototype.get visibleView):
(WebInspector.FileSystemView.EntryTreeElement.prototype.onselect):
(WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):
(WebInspector.FileSystemView.EntryTreeElement.prototype.refresh):

  • 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

    r122103 r122104  
     12012-07-09  Taiju Tsuiki  <tzik@chromium.org>
     2
     3        Web Inspector: Add FileContentView for FileSystemView
     4        https://bugs.webkit.org/show_bug.cgi?id=90529
     5
     6        Adding FileContentView to Inspector.
     7        This class provides preview of text files in FileSystem.
     8
     9        Reviewed by Vsevolod Vlasov.
     10
     11        * WebCore.gypi:
     12        * WebCore.vcproj/WebCore.vcproj:
     13        * inspector/compile-front-end.py:
     14        * inspector/front-end/FileContentView.js: Added.
     15        * inspector/front-end/FileSystemView.js:
     16        (WebInspector.FileSystemView.prototype.get visibleView):
     17        (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect):
     18        (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):
     19        (WebInspector.FileSystemView.EntryTreeElement.prototype.refresh):
     20        * inspector/front-end/WebKit.qrc:
     21        * inspector/front-end/inspector.html:
     22
    1232012-07-09  Carlos Garcia Campos  <cgarcia@igalia.com>
    224
  • trunk/Source/WebCore/WebCore.gypi

    r121900 r122104  
    62806280            'inspector/front-end/ExtensionServer.js',
    62816281            'inspector/front-end/FileManager.js',
     6282            'inspector/front-end/FileContentView.js',
    62826283            'inspector/front-end/FileSystemModel.js',
    62836284            'inspector/front-end/FileSystemView.js',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r121900 r122104  
    7492374923                                </File>
    7492474924                                <File
     74925                                        RelativePath="..\inspector\front-end\FileContentView.js"
     74926                                        >
     74927                                </File>
     74928                                <File
    7492574929                                        RelativePath="..\inspector\front-end\FileManager.js"
    7492674930                                        >
  • trunk/Source/WebCore/inspector/compile-front-end.py

    r121850 r122104  
    213213            "DirectoryContentView.js",
    214214            "DOMStorageItemsView.js",
     215            "FileContentView.js",
    215216            "FileSystemView.js",
    216217            "IndexedDBViews.js",
  • trunk/Source/WebCore/inspector/front-end/FileSystemView.js

    r122101 r122104  
    6666
    6767    /**
     68     * @type {WebInspector.View}
     69     */
     70    get visibleView()
     71    {
     72        return this._visibleView;
     73    },
     74
     75    /**
    6876     * @param {WebInspector.View} view
    6977     */
     
    112120            if (this._entry.isDirectory)
    113121                this._view = new WebInspector.DirectoryContentView();
    114             else
    115                 return;
     122            else {
     123                var file = /** @type {WebInspector.FileSystemModel.File} */ this._entry;
     124                this._view = new WebInspector.FileContentView(file);
     125            }
    116126        }
    117127        this._fileSystemView.showView(this._view);
     
    158168                if (oldChild._entry.isDirectory)
    159169                    oldChild.shouldRefreshChildren = true;
     170                else
     171                    oldChild.refresh();
     172
    160173                ++newEntryIndex;
    161174                ++oldChildIndex;
     
    182195    refresh: function()
    183196    {
    184         if (!this._entry.isDirectory)
    185             return;
    186         this._entry.requestDirectoryContent(this._directoryContentReceived.bind(this));
     197        if (!this._entry.isDirectory) {
     198            if (this._view && this._view === this._fileSystemView.visibleView) {
     199                var fileContentView = /** @type {WebInspector.FileContentView} */ this._view;
     200                fileContentView.refresh();
     201            }
     202        } else
     203            this._entry.requestDirectoryContent(this._directoryContentReceived.bind(this));
    187204    }
    188205}
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r121850 r122104  
    5858    <file>ExtensionRegistryStub.js</file>
    5959    <file>ExtensionServer.js</file>
     60    <file>FileContentView.js</file>
    6061    <file>FileManager.js</file>
    6162    <file>FileSystemModel.js</file>
  • trunk/Source/WebCore/inspector/front-end/inspector.html

    r121911 r122104  
    163163    <script type="text/javascript" src="SourceJavaScriptTokenizer.js"></script>
    164164    <script type="text/javascript" src="DirectoryContentView.js"></script>
     165    <script type="text/javascript" src="FileContentView.js"></script>
    165166    <script type="text/javascript" src="FileSystemModel.js"></script>
    166167    <script type="text/javascript" src="FileSystemView.js"></script>
Note: See TracChangeset for help on using the changeset viewer.