<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[189924] trunk/Source/WebInspectorUI</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/189924">189924</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-17 12:29:38 -0700 (Thu, 17 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Make Find / Save keyboard shortcuts work better globally
https://bugs.webkit.org/show_bug.cgi?id=149198

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2015-09-17
Reviewed by Brian Burg.

Previously find/save keyboard shortcuts required the user have the
ContentView in the ContentBrowser focused. That means nothing would
happen if you clicked / focused in the Sidebars. This change considers
the keyboard shortcuts globally, like Copy.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Add global find and save keyboard shortcuts.

(WebInspector._focusChanged):
It is often useful to have the currentFocusedElement know if it is
in a TextEditor or other CodeMirror editor. When editable the &lt;textarea&gt;
is selected and not updating focused element.

(WebInspector._focusedContentBrowser):
(WebInspector._focusedContentView):
Provide helpers for getting a good approximation of the current focused
or visible content view that users would expect to be interacting with.
Since the focus event may not fire when clicking around to elements
like the &lt;body&gt;. Rather than make it explicitly focusable, check the
document.activeElement, and if it is body aim for the main content
browser instead of the currentFocusedElement which may be stale.
Likewise, if the QuickConsole is focused and the split console is
showing, treat it like the split browser is focused.

(WebInspector._focusedOrVisibleContentBrowser):
(WebInspector._focusedOrVisibleContentView):
If nothing is focused, default to the main content browser.

(WebInspector._find):
Pass on to the ContentView which typically handles Find
by showing its find banner.

(WebInspector._save):
(WebInspector._saveAs):
Check and save the current ContentView if supported.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.get supportsSearch):
(WebInspector.LogContentView.prototype.handleFindEvent):
Add custom find handling for LogContentView from the routed through the
BrowserController instead of special event handlers in the controller.

(WebInspector.LogContentView.prototype.get supportsSave):
(WebInspector.LogContentView.prototype.save): Deleted.
(WebInspector.LogContentView.prototype.saveAs): Deleted.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Deleted.
(WebInspector.JavaScriptLogViewController.prototype._handleFindShortcut): Deleted.
(WebInspector.JavaScriptLogViewController.prototype._save): Deleted.
(WebInspector.JavaScriptLogViewController.prototype._saveAs): Deleted.
Special save handling is no longer needed in the log view controller.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.handleFindEvent):
(WebInspector.ContentBrowser): Deleted.
(WebInspector.ContentBrowser.prototype._save): Deleted.
(WebInspector.ContentBrowser.prototype._saveAs): Deleted.
(WebInspector.ContentBrowser.prototype._showFindBanner): Deleted.
Save functionality moved globally, find functionality moved to a
public method called like copy event handling.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseMainjs">trunk/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersJavaScriptLogViewControllerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserjs">trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (189923 => 189924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-09-17 19:28:33 UTC (rev 189923)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-09-17 19:29:38 UTC (rev 189924)
</span><span class="lines">@@ -1,5 +1,74 @@
</span><span class="cx"> 2015-09-17  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Make Find / Save keyboard shortcuts work better globally
+        https://bugs.webkit.org/show_bug.cgi?id=149198
+
+        Reviewed by Brian Burg.
+
+        Previously find/save keyboard shortcuts required the user have the
+        ContentView in the ContentBrowser focused. That means nothing would
+        happen if you clicked / focused in the Sidebars. This change considers
+        the keyboard shortcuts globally, like Copy.
+
+        * UserInterface/Base/Main.js:
+        (WebInspector.contentLoaded):
+        Add global find and save keyboard shortcuts.
+
+        (WebInspector._focusChanged):
+        It is often useful to have the currentFocusedElement know if it is
+        in a TextEditor or other CodeMirror editor. When editable the &lt;textarea&gt;
+        is selected and not updating focused element. 
+
+        (WebInspector._focusedContentBrowser):
+        (WebInspector._focusedContentView):
+        Provide helpers for getting a good approximation of the current focused
+        or visible content view that users would expect to be interacting with.
+        Since the focus event may not fire when clicking around to elements
+        like the &lt;body&gt;. Rather than make it explicitly focusable, check the
+        document.activeElement, and if it is body aim for the main content
+        browser instead of the currentFocusedElement which may be stale.
+        Likewise, if the QuickConsole is focused and the split console is
+        showing, treat it like the split browser is focused.
+
+        (WebInspector._focusedOrVisibleContentBrowser):
+        (WebInspector._focusedOrVisibleContentView):
+        If nothing is focused, default to the main content browser.
+
+        (WebInspector._find):
+        Pass on to the ContentView which typically handles Find
+        by showing its find banner.
+
+        (WebInspector._save):
+        (WebInspector._saveAs):
+        Check and save the current ContentView if supported.
+
+        * UserInterface/Views/LogContentView.js:
+        (WebInspector.LogContentView.prototype.get supportsSearch):
+        (WebInspector.LogContentView.prototype.handleFindEvent):
+        Add custom find handling for LogContentView from the routed through the
+        BrowserController instead of special event handlers in the controller.
+
+        (WebInspector.LogContentView.prototype.get supportsSave):
+        (WebInspector.LogContentView.prototype.save): Deleted.
+        (WebInspector.LogContentView.prototype.saveAs): Deleted.
+        * UserInterface/Controllers/JavaScriptLogViewController.js:
+        (WebInspector.JavaScriptLogViewController): Deleted.
+        (WebInspector.JavaScriptLogViewController.prototype._handleFindShortcut): Deleted.
+        (WebInspector.JavaScriptLogViewController.prototype._save): Deleted.
+        (WebInspector.JavaScriptLogViewController.prototype._saveAs): Deleted.
+        Special save handling is no longer needed in the log view controller.
+
+        * UserInterface/Views/ContentBrowser.js:
+        (WebInspector.ContentBrowser.prototype.handleFindEvent):
+        (WebInspector.ContentBrowser): Deleted.
+        (WebInspector.ContentBrowser.prototype._save): Deleted.
+        (WebInspector.ContentBrowser.prototype._saveAs): Deleted.
+        (WebInspector.ContentBrowser.prototype._showFindBanner): Deleted.
+        Save functionality moved globally, find functionality moved to a
+        public method called like copy event handling.
+
+2015-09-17  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: Inactive window may cause many layers to be created due to Dashboard opacity
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=149274
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (189923 => 189924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-09-17 19:28:33 UTC (rev 189923)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-09-17 19:29:38 UTC (rev 189924)
</span><span class="lines">@@ -238,6 +238,9 @@
</span><span class="cx">     this.detailsSidebar.addEventListener(WebInspector.Sidebar.Event.WidthDidChange, this._sidebarWidthDidChange, this);
</span><span class="cx"> 
</span><span class="cx">     this.searchKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, &quot;F&quot;, this._focusSearchField.bind(this));
</span><ins>+    this._findKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;F&quot;, this._find.bind(this));
+    this._saveKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;S&quot;, this._save.bind(this));
+    this._saveAsKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;S&quot;, this._saveAs.bind(this));
</ins><span class="cx"> 
</span><span class="cx">     this.navigationSidebarKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;0&quot;, this.toggleNavigationSidebar.bind(this));
</span><span class="cx">     this.detailsSidebarKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Option, &quot;0&quot;, this.toggleDetailsSidebar.bind(this));
</span><span class="lines">@@ -1109,8 +1112,15 @@
</span><span class="cx">     // a caret selection inside. This is needed (at least) to remove caret from console when focus is moved.
</span><span class="cx">     // The selection change should not apply to text fields and text areas either.
</span><span class="cx"> 
</span><del>-    if (WebInspector.isEventTargetAnEditableField(event))
</del><ins>+    if (WebInspector.isEventTargetAnEditableField(event)) {
+        // Still update the currentFocusElement if inside of a CodeMirror editor.
+        var codeMirrorEditorElement = event.target.enclosingNodeOrSelfWithClass(&quot;CodeMirror&quot;);
+        if (codeMirrorEditorElement &amp;&amp; codeMirrorEditorElement !== this.currentFocusElement) {
+            this.previousFocusElement = this.currentFocusElement;
+            this.currentFocusElement = codeMirrorEditorElement;
+        }
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     var selection = window.getSelection();
</span><span class="cx">     if (!selection.isCollapsed)
</span><span class="lines">@@ -1656,19 +1666,63 @@
</span><span class="cx">     this.quickConsole.prompt.focus();
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector._focusedContentBrowser = function()
+{
+    if (this.tabBrowser.element.isSelfOrAncestor(this.currentFocusElement) || document.activeElement === document.body) {
+        var tabContentView = this.tabBrowser.selectedTabContentView;
+        if (tabContentView instanceof WebInspector.ContentBrowserTabContentView)
+            return tabContentView.contentBrowser;
+        return null;
+    }
+
+    if (this.splitContentBrowser.element.isSelfOrAncestor(this.currentFocusElement)
+        || (WebInspector.isShowingSplitConsole() &amp;&amp; this.quickConsole.element.isSelfOrAncestor(this.currentFocusElement)))
+        return this.splitContentBrowser;
+
+    return null;
+};
+
</ins><span class="cx"> WebInspector._focusedContentView = function()
</span><span class="cx"> {
</span><del>-    if (this.tabBrowser.element.isSelfOrAncestor(this.currentFocusElement)) {
</del><ins>+    if (this.tabBrowser.element.isSelfOrAncestor(this.currentFocusElement) || document.activeElement === document.body) {
</ins><span class="cx">         var tabContentView = this.tabBrowser.selectedTabContentView;
</span><span class="cx">         if (tabContentView instanceof WebInspector.ContentBrowserTabContentView)
</span><span class="cx">             return tabContentView.contentBrowser.currentContentView;
</span><span class="cx">         return tabContentView;
</span><span class="cx">     }
</span><del>-    if (this.splitContentBrowser.element.isSelfOrAncestor(this.currentFocusElement))
-        return  this.splitContentBrowser.currentContentView;
</del><ins>+
+    if (this.splitContentBrowser.element.isSelfOrAncestor(this.currentFocusElement)
+        || (WebInspector.isShowingSplitConsole() &amp;&amp; this.quickConsole.element.isSelfOrAncestor(this.currentFocusElement)))
+        return this.splitContentBrowser.currentContentView;
+
</ins><span class="cx">     return null;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector._focusedOrVisibleContentBrowser = function()
+{
+    let focusedContentBrowser = this._focusedContentBrowser();
+    if (focusedContentBrowser)
+        return focusedContentBrowser;
+
+    var tabContentView = this.tabBrowser.selectedTabContentView;
+    if (tabContentView instanceof WebInspector.ContentBrowserTabContentView)
+        return tabContentView.contentBrowser;
+
+    return null;
+};
+
+WebInspector._focusedOrVisibleContentView = function()
+{
+    let focusedContentView = this._focusedContentView();
+    if (focusedContentView)
+        return focusedContentView;
+
+    var tabContentView = this.tabBrowser.selectedTabContentView;
+    if (tabContentView instanceof WebInspector.ContentBrowserTabContentView)
+        return tabContentView.contentBrowser.currentContentView;
+    return tabContentView;
+};
+
</ins><span class="cx"> WebInspector._beforecopy = function(event)
</span><span class="cx"> {
</span><span class="cx">     var selection = window.getSelection();
</span><span class="lines">@@ -1698,6 +1752,33 @@
</span><span class="cx">     event.preventDefault();
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector._find = function(event)
+{
+    var contentBrowser = this._focusedOrVisibleContentBrowser();
+    if (!contentBrowser || typeof contentBrowser.handleFindEvent !== &quot;function&quot;)
+        return;
+    
+    contentBrowser.handleFindEvent(event);
+};
+
+WebInspector._save = function(event)
+{
+    var contentView = this._focusedOrVisibleContentView();
+    if (!contentView || !contentView.supportsSave)
+        return;
+
+    WebInspector.saveDataToFile(contentView.saveData);
+};
+
+WebInspector._saveAs = function(event)
+{
+    var contentView = this._focusedOrVisibleContentView();
+    if (!contentView || !contentView.supportsSave)
+        return;
+
+    WebInspector.saveDataToFile(contentView.saveData, true);
+};
+
</ins><span class="cx"> WebInspector._copy = function(event)
</span><span class="cx"> {
</span><span class="cx">     var selection = window.getSelection();
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersJavaScriptLogViewControllerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js (189923 => 189924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js        2015-09-17 19:28:33 UTC (rev 189923)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js        2015-09-17 19:29:38 UTC (rev 189924)
</span><span class="lines">@@ -53,16 +53,12 @@
</span><span class="cx">         this.messagesClearKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;K&quot;, this._handleClearShortcut.bind(this));
</span><span class="cx">         this.messagesAlternateClearKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control, &quot;L&quot;, this._handleClearShortcut.bind(this), this._element);
</span><span class="cx"> 
</span><del>-        this._messagesFindKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;F&quot;, this._handleFindShortcut.bind(this), this._element);
</del><span class="cx">         this._messagesFindNextKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;G&quot;, this._handleFindNextShortcut.bind(this), this._element);
</span><span class="cx">         this._messagesFindPreviousKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, &quot;G&quot;, this._handleFindPreviousShortcut.bind(this), this._element);
</span><span class="cx"> 
</span><span class="cx">         this._promptAlternateClearKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control, &quot;L&quot;, this._handleClearShortcut.bind(this), this._prompt.element);
</span><del>-        this._promptFindKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;F&quot;, this._handleFindShortcut.bind(this), this._prompt.element);
</del><span class="cx">         this._promptFindNextKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;G&quot;, this._handleFindNextShortcut.bind(this), this._prompt.element);
</span><span class="cx">         this._promptFindPreviousKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, &quot;G&quot;, this._handleFindPreviousShortcut.bind(this), this._prompt.element);
</span><del>-        this._promptSaveKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;S&quot;, this._save.bind(this), this._prompt.element);
-        this._promptSaveAsKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;S&quot;, this._saveAs.bind(this), this._prompt.element);
</del><span class="cx"> 
</span><span class="cx">         this.startNewSession();
</span><span class="cx">     }
</span><span class="lines">@@ -243,11 +239,6 @@
</span><span class="cx">         WebInspector.logManager.requestClearMessages();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _handleFindShortcut()
-    {
-        this.delegate.focusSearchBar();
-    }
-
</del><span class="cx">     _handleFindNextShortcut()
</span><span class="cx">     {
</span><span class="cx">         this.delegate.highlightNextSearchMatch();
</span><span class="lines">@@ -258,16 +249,6 @@
</span><span class="cx">         this.delegate.highlightPreviousSearchMatch();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _save()
-    {
-        this.delegate.save();
-    }
-
-    _saveAs()
-    {
-        this.delegate.saveAs();
-    }
-
</del><span class="cx">     _appendConsoleMessageView(messageView, repeatCountWasInterrupted)
</span><span class="cx">     {
</span><span class="cx">         var wasScrolledToBottom = this.isScrolledToBottom();
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js (189923 => 189924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js        2015-09-17 19:28:33 UTC (rev 189923)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js        2015-09-17 19:29:38 UTC (rev 189924)
</span><span class="lines">@@ -43,10 +43,6 @@
</span><span class="cx">         this._findBanner.addEventListener(WebInspector.FindBanner.Event.DidShow, this._findBannerDidShow, this);
</span><span class="cx">         this._findBanner.addEventListener(WebInspector.FindBanner.Event.DidHide, this._findBannerDidHide, this);
</span><span class="cx"> 
</span><del>-        this._findKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;F&quot;, this._showFindBanner.bind(this), this._element);
-        this._saveKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;S&quot;, this._save.bind(this), this._element);
-        this._saveAsKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, &quot;S&quot;, this._saveAs.bind(this), this._element);
-
</del><span class="cx">         if (!disableBackForward) {
</span><span class="cx">             this._backKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Left, this._backButtonClicked.bind(this), this._element);
</span><span class="cx">             this._forwardKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Right, this._forwardButtonClicked.bind(this), this._element);
</span><span class="lines">@@ -211,6 +207,21 @@
</span><span class="cx">         // so it does not need to be called here.
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    handleFindEvent(event)
+    {
+        var currentContentView = this.currentContentView;
+        if (!currentContentView || !currentContentView.supportsSearch)
+            return;
+
+        // LogContentView has custom search handling.
+        if (typeof currentContentView.handleFindEvent === &quot;function&quot;) {
+            currentContentView.handleFindEvent(event);
+            return;
+        }
+
+        this._findBanner.show();
+    }
+
</ins><span class="cx">     findBannerPerformSearch(findBanner, query)
</span><span class="cx">     {
</span><span class="cx">         var currentContentView = this.currentContentView;
</span><span class="lines">@@ -282,33 +293,6 @@
</span><span class="cx">         this.goForward();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _save(event)
-    {
-        var currentContentView = this.currentContentView;
-        if (!currentContentView || !currentContentView.supportsSave)
-            return;
-
-        WebInspector.saveDataToFile(currentContentView.saveData);
-    }
-
-    _saveAs(event)
-    {
-        var currentContentView = this.currentContentView;
-        if (!currentContentView || !currentContentView.supportsSave)
-            return;
-
-        WebInspector.saveDataToFile(currentContentView.saveData, true);
-    }
-
-    _showFindBanner(event)
-    {
-        var currentContentView = this.currentContentView;
-        if (!currentContentView || !currentContentView.supportsSearch)
-            return;
-
-        this._findBanner.show();
-    }
-
</del><span class="cx">     _findBannerDidShow(event)
</span><span class="cx">     {
</span><span class="cx">         var currentContentView = this.currentContentView;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (189923 => 189924)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js        2015-09-17 19:28:33 UTC (rev 189923)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js        2015-09-17 19:29:38 UTC (rev 189924)
</span><span class="lines">@@ -178,54 +178,43 @@
</span><span class="cx">         WebInspector.quickConsole.updateLayout();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    get supportsSave()
</del><ins>+    get supportsSearch()
</ins><span class="cx">     {
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    get saveData()
</del><ins>+    handleFindEvent(event)
</ins><span class="cx">     {
</span><del>-        return {url: &quot;web-inspector:///Console.txt&quot;, content: this._formatMessagesAsData(false), forceSaveAs: true};
-    }
-
-    handleCopyEvent(event)
-    {
-        if (!this._selectedMessages.length)
-            return;
-
-        event.clipboardData.setData(&quot;text/plain&quot;, this._formatMessagesAsData(true));
-        event.stopPropagation();
-        event.preventDefault();
-    }
-
-    focusSearchBar()
-    {
</del><span class="cx">         if (!this.visible)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         this._searchBar.focus();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    save()
</del><ins>+    get supportsSave()
</ins><span class="cx">     {
</span><span class="cx">         if (!this.visible)
</span><del>-            return;
</del><ins>+            return false;
</ins><span class="cx"> 
</span><span class="cx">         if (WebInspector.isShowingSplitConsole())
</span><del>-            return;
</del><ins>+            return false;
</ins><span class="cx"> 
</span><del>-        WebInspector.saveDataToFile(this.saveData);
</del><ins>+        return true;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    saveAs()
</del><ins>+    get saveData()
</ins><span class="cx">     {
</span><del>-        if (!this.visible)
-            return;
</del><ins>+        return {url: &quot;web-inspector:///Console.txt&quot;, content: this._formatMessagesAsData(false), forceSaveAs: true};
+    }
</ins><span class="cx"> 
</span><del>-        if (WebInspector.isShowingSplitConsole())
</del><ins>+    handleCopyEvent(event)
+    {
+        if (!this._selectedMessages.length)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        WebInspector.saveDataToFile(this.saveData, true);
</del><ins>+        event.clipboardData.setData(&quot;text/plain&quot;, this._formatMessagesAsData(true));
+        event.stopPropagation();
+        event.preventDefault();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     highlightPreviousSearchMatch()
</span></span></pre>
</div>
</div>

</body>
</html>