Title: [198794] trunk/Source/WebInspectorUI
Revision
198794
Author
[email protected]
Date
2016-03-29 13:36:37 -0700 (Tue, 29 Mar 2016)

Log Message

Web Inspector: REGRESSION: ⌘E and ⌘G text searching does not work
https://bugs.webkit.org/show_bug.cgi?id=155981
<rdar://problem/25418983>

Patch by Joseph Pecoraro <[email protected]> on 2016-03-29
Reviewed by Timothy Hatcher.

Disable the unused find banner in the RecordingContentView's
ContentBrowser. This is a workaround for the background tab
thinking it is visible, but still useful since the find
banner wouldn't be used in the TimelineContentView anyways so
can avoid being created.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
Add a construction option to not create a FindBanner.

(WebInspector.ContentBrowser.prototype.handleFindEvent):
(WebInspector.ContentBrowser.prototype.shown):
(WebInspector.ContentBrowser.prototype.hidden):
(WebInspector.ContentBrowser.prototype._contentViewNumberOfSearchResultsDidChange):
(WebInspector.ContentBrowser.prototype._updateFindBanner):
Handle when we don't have a find banner.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Do not create a FindBanner in the RecordingContentView.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
This global content browser can also avoid creating a FindBanner.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (198793 => 198794)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-03-29 20:19:51 UTC (rev 198793)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-03-29 20:36:37 UTC (rev 198794)
@@ -1,5 +1,38 @@
 2016-03-29  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: REGRESSION: ⌘E and ⌘G text searching does not work
+        https://bugs.webkit.org/show_bug.cgi?id=155981
+        <rdar://problem/25418983>
+
+        Reviewed by Timothy Hatcher.
+
+        Disable the unused find banner in the RecordingContentView's
+        ContentBrowser. This is a workaround for the background tab
+        thinking it is visible, but still useful since the find
+        banner wouldn't be used in the TimelineContentView anyways so
+        can avoid being created.
+
+        * UserInterface/Views/ContentBrowser.js:
+        (WebInspector.ContentBrowser):
+        Add a construction option to not create a FindBanner.
+        
+        (WebInspector.ContentBrowser.prototype.handleFindEvent):
+        (WebInspector.ContentBrowser.prototype.shown):
+        (WebInspector.ContentBrowser.prototype.hidden):
+        (WebInspector.ContentBrowser.prototype._contentViewNumberOfSearchResultsDidChange):
+        (WebInspector.ContentBrowser.prototype._updateFindBanner):
+        Handle when we don't have a find banner.
+
+        * UserInterface/Views/TimelineRecordingContentView.js:
+        (WebInspector.TimelineRecordingContentView):
+        Do not create a FindBanner in the RecordingContentView.
+
+        * UserInterface/Base/Main.js:
+        (WebInspector.contentLoaded):
+        This global content browser can also avoid creating a FindBanner.
+
+2016-03-29  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: We should have a way to capture heap snapshots programatically.
         https://bugs.webkit.org/show_bug.cgi?id=154407
         <rdar://problem/24726292>

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (198793 => 198794)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2016-03-29 20:19:51 UTC (rev 198793)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2016-03-29 20:36:37 UTC (rev 198794)
@@ -231,7 +231,7 @@
     this._contentElement.setAttribute("role", "main");
     this._contentElement.setAttribute("aria-label", WebInspector.UIString("Content"));
 
-    this.splitContentBrowser = new WebInspector.ContentBrowser(document.getElementById("split-content-browser"), this, true);
+    this.splitContentBrowser = new WebInspector.ContentBrowser(document.getElementById("split-content-browser"), this, true, true);
     this.splitContentBrowser.navigationBar.element.addEventListener("mousedown", this._consoleResizerMouseDown.bind(this));
 
     this.quickConsole = new WebInspector.QuickConsole(document.getElementById("quick-console"));

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js (198793 => 198794)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js	2016-03-29 20:19:51 UTC (rev 198793)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js	2016-03-29 20:36:37 UTC (rev 198794)
@@ -25,7 +25,7 @@
 
 WebInspector.ContentBrowser = class ContentBrowser extends WebInspector.View
 {
-    constructor(element, delegate, disableBackForward)
+    constructor(element, delegate, disableBackForward, disableFindBanner)
     {
         super(element);
 
@@ -38,10 +38,6 @@
         this._contentViewContainer.addEventListener(WebInspector.ContentViewContainer.Event.CurrentContentViewDidChange, this._currentContentViewDidChange, this);
         this.addSubview(this._contentViewContainer);
 
-        this._findBanner = new WebInspector.FindBanner(this);
-        this._findBanner.addEventListener(WebInspector.FindBanner.Event.DidShow, this._findBannerDidShow, this);
-        this._findBanner.addEventListener(WebInspector.FindBanner.Event.DidHide, this._findBannerDidHide, this);
-
         if (!disableBackForward) {
             this._backKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Left, this._backButtonClicked.bind(this), this.element);
             this._forwardKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Right, this._forwardButtonClicked.bind(this), this.element);
@@ -59,6 +55,12 @@
             this._navigationBar.addNavigationItem(new WebInspector.DividerNavigationItem);
         }
 
+        if (!disableFindBanner) {
+            this._findBanner = new WebInspector.FindBanner(this);
+            this._findBanner.addEventListener(WebInspector.FindBanner.Event.DidShow, this._findBannerDidShow, this);
+            this._findBanner.addEventListener(WebInspector.FindBanner.Event.DidHide, this._findBannerDidHide, this);
+        }
+
         this._hierarchicalPathNavigationItem = new WebInspector.HierarchicalPathNavigationItem;
         this._hierarchicalPathNavigationItem.addEventListener(WebInspector.HierarchicalPathNavigationItem.Event.PathComponentWasSelected, this._hierarchicalPathComponentWasSelected, this);
         this._navigationBar.addNavigationItem(this._hierarchicalPathNavigationItem);
@@ -197,6 +199,9 @@
 
     handleFindEvent(event)
     {
+        if (!this._findBanner)
+            return;
+
         var currentContentView = this.currentContentView;
         if (!currentContentView || !currentContentView.supportsSearch)
             return;
@@ -259,14 +264,16 @@
     {
         this._contentViewContainer.shown();
 
-        this._findBanner.enableKeyboardShortcuts();
+        if (this._findBanner)
+            this._findBanner.enableKeyboardShortcuts();
     }
 
     hidden()
     {
         this._contentViewContainer.hidden();
 
-        this._findBanner.disableKeyboardShortcuts();
+        if (this._findBanner)
+            this._findBanner.disableKeyboardShortcuts();
     }
 
     // Private
@@ -301,6 +308,9 @@
 
     _contentViewNumberOfSearchResultsDidChange(event)
     {
+        if (!this._findBanner)
+            return;
+
         if (event.target !== this.currentContentView)
             return;
 
@@ -393,6 +403,9 @@
 
     _updateFindBanner(currentContentView)
     {
+        if (!this._findBanner)
+            return;
+
         if (!currentContentView) {
             this._findBanner.targetElement = null;
             this._findBanner.numberOfResults = null;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (198793 => 198794)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js	2016-03-29 20:19:51 UTC (rev 198793)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js	2016-03-29 20:36:37 UTC (rev 198794)
@@ -42,7 +42,8 @@
         this.addSubview(this._timelineOverview);
 
         const disableBackForward = true;
-        this._timelineContentBrowser = new WebInspector.ContentBrowser(null, this, disableBackForward);
+        const disableFindBanner = true;
+        this._timelineContentBrowser = new WebInspector.ContentBrowser(null, this, disableBackForward, disableFindBanner);
         this._timelineContentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._currentContentViewDidChange, this);
 
         this._entireRecordingPathComponent = this._createTimelineRangePathComponent(WebInspector.UIString("Entire Recording"));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to