Title: [186466] trunk/Source/WebInspectorUI
Revision
186466
Author
drou...@apple.com
Date
2015-07-07 10:25:48 -0700 (Tue, 07 Jul 2015)

Log Message

Web Inspector: Option+Click not jumping to resource
https://bugs.webkit.org/show_bug.cgi?id=146498

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js: Always show the tab which contains the represented object.
(WebInspector._domNodeWasInspected):
(WebInspector._frameWasAdded):
(WebInspector.showConsoleTab):
(WebInspector.showRepresentedObject): Removed forceShowTab parameter.
(WebInspector.showMainFrameDOMTree):
(WebInspector.showContentFlowDOMTree):
(WebInspector.showSourceCodeForFrame):
(WebInspector.showSourceCode):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showMainResourceForFrame):
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186465 => 186466)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 17:22:28 UTC (rev 186465)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 17:25:48 UTC (rev 186466)
@@ -1,5 +1,37 @@
 2015-07-07  Devin Rousso  <drou...@apple.com>
 
+        Web Inspector: Option+Click not jumping to resource
+        https://bugs.webkit.org/show_bug.cgi?id=146498
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Base/Main.js: Always show the tab which contains the represented object.
+        (WebInspector._domNodeWasInspected):
+        (WebInspector._frameWasAdded):
+        (WebInspector.showConsoleTab):
+        (WebInspector.showRepresentedObject): Removed forceShowTab parameter.
+        (WebInspector.showMainFrameDOMTree):
+        (WebInspector.showContentFlowDOMTree):
+        (WebInspector.showSourceCodeForFrame):
+        (WebInspector.showSourceCode):
+        (WebInspector.showSourceCodeLocation):
+        (WebInspector.showOriginalUnformattedSourceCodeLocation):
+        (WebInspector.showOriginalOrFormattedSourceCodeLocation):
+        (WebInspector.showOriginalOrFormattedSourceCodeTextRange):
+        (WebInspector.showResourceRequest):
+        * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
+        (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
+        * UserInterface/Protocol/InspectorFrontendAPI.js:
+        (InspectorFrontendAPI.showMainResourceForFrame):
+        * UserInterface/Views/ComputedStyleDetailsPanel.js:
+        (WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
+        (WebInspector.ComputedStyleDetailsPanel):
+        * UserInterface/Views/ObjectTreeBaseTreeElement.js:
+        (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
+        (WebInspector.ObjectTreeBaseTreeElement):
+
+2015-07-07  Devin Rousso  <drou...@apple.com>
+
         Web Inspector: Regression: CSS autocompletion suggestion applies on pressing delete
         https://bugs.webkit.org/show_bug.cgi?id=146672
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (186465 => 186466)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2015-07-07 17:22:28 UTC (rev 186465)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2015-07-07 17:25:48 UTC (rev 186466)
@@ -761,7 +761,7 @@
     if (requestedScope || !this.consoleContentView.scopeBar.selectedItems.length)
         this.consoleContentView.scopeBar.item(scope).selected = true;
 
-    this.showRepresentedObject(this._consoleRepresentedObject, null, true);
+    this.showRepresentedObject(this._consoleRepresentedObject);
 
     console.assert(this.isShowingConsoleTab());
 };
@@ -923,33 +923,31 @@
     return tabContentView;
 };
 
-WebInspector.showRepresentedObject = function(representedObject, cookie, forceShowTab)
+WebInspector.showRepresentedObject = function(representedObject, cookie)
 {
     var tabContentView = this.tabContentViewForRepresentedObject(representedObject);
     console.assert(tabContentView);
     if (!tabContentView)
         return;
 
-    if (window.event || forceShowTab)
-        this.tabBrowser.showTabForContentView(tabContentView);
-
+    this.tabBrowser.showTabForContentView(tabContentView);
     tabContentView.showRepresentedObject(representedObject, cookie);
 };
 
-WebInspector.showMainFrameDOMTree = function(nodeToSelect, forceShowTab)
+WebInspector.showMainFrameDOMTree = function(nodeToSelect)
 {
     console.assert(WebInspector.frameResourceManager.mainFrame);
     if (!WebInspector.frameResourceManager.mainFrame)
         return;
-    this.showRepresentedObject(WebInspector.frameResourceManager.mainFrame.domTree, {nodeToSelect}, forceShowTab);
+    this.showRepresentedObject(WebInspector.frameResourceManager.mainFrame.domTree, {nodeToSelect});
 };
 
-WebInspector.showContentFlowDOMTree = function(contentFlow, nodeToSelect, forceShowTab)
+WebInspector.showContentFlowDOMTree = function(contentFlow, nodeToSelect)
 {
-    this.showRepresentedObject(contentFlow, {nodeToSelect}, forceShowTab);
+    this.showRepresentedObject(contentFlow, {nodeToSelect});
 };
 
-WebInspector.showSourceCodeForFrame = function(frameIdentifier, forceShowTab)
+WebInspector.showSourceCodeForFrame = function(frameIdentifier)
 {
     var frame = WebInspector.frameResourceManager.frameForIdentifier(frameIdentifier);
     if (!frame) {
@@ -959,10 +957,10 @@
 
     this._frameIdentifierToShowSourceCodeWhenAvailable = undefined;
 
-    this.showRepresentedObject(frame, null, forceShowTab);
+    this.showRepresentedObject(frame);
 };
 
-WebInspector.showSourceCode = function(sourceCode, positionToReveal, textRangeToSelect, forceUnformatted, forceShowTab)
+WebInspector.showSourceCode = function(sourceCode, positionToReveal, textRangeToSelect, forceUnformatted)
 {
     console.assert(!positionToReveal || positionToReveal instanceof WebInspector.SourceCodePosition, positionToReveal);
     var representedObject = sourceCode;
@@ -973,33 +971,33 @@
     }
 
     var cookie = positionToReveal ? {lineNumber: positionToReveal.lineNumber, columnNumber: positionToReveal.columnNumber} : {};
-    this.showRepresentedObject(representedObject, cookie, forceShowTab);
+    this.showRepresentedObject(representedObject, cookie);
 };
 
-WebInspector.showSourceCodeLocation = function(sourceCodeLocation, forceShowTab)
+WebInspector.showSourceCodeLocation = function(sourceCodeLocation)
 {
-    this.showSourceCode(sourceCodeLocation.displaySourceCode, sourceCodeLocation.displayPosition(), null, false, forceShowTab);
+    this.showSourceCode(sourceCodeLocation.displaySourceCode, sourceCodeLocation.displayPosition());
 };
 
-WebInspector.showOriginalUnformattedSourceCodeLocation = function(sourceCodeLocation, forceShowTab)
+WebInspector.showOriginalUnformattedSourceCodeLocation = function(sourceCodeLocation)
 {
     this.showSourceCode(sourceCodeLocation.sourceCode, sourceCodeLocation.position(), null, true);
 };
 
-WebInspector.showOriginalOrFormattedSourceCodeLocation = function(sourceCodeLocation, forceShowTab)
+WebInspector.showOriginalOrFormattedSourceCodeLocation = function(sourceCodeLocation)
 {
-    this.showSourceCode(sourceCodeLocation.sourceCode, sourceCodeLocation.formattedPosition(), null, false, forceShowTab);
+    this.showSourceCode(sourceCodeLocation.sourceCode, sourceCodeLocation.formattedPosition());
 };
 
-WebInspector.showOriginalOrFormattedSourceCodeTextRange = function(sourceCodeTextRange, forceShowTab)
+WebInspector.showOriginalOrFormattedSourceCodeTextRange = function(sourceCodeTextRange)
 {
     var textRangeToSelect = sourceCodeTextRange.formattedTextRange;
-    this.showSourceCode(sourceCodeTextRange.sourceCode, textRangeToSelect.startPosition(), textRangeToSelect, false, forceShowTab);
+    this.showSourceCode(sourceCodeTextRange.sourceCode, textRangeToSelect.startPosition(), textRangeToSelect);
 };
 
-WebInspector.showResourceRequest = function(resource, forceShowTab)
+WebInspector.showResourceRequest = function(resource)
 {
-    this.showRepresentedObject(resource, {[WebInspector.ResourceClusterContentView.ContentViewIdentifierCookieKey]: WebInspector.ResourceClusterContentView.RequestIdentifier}, forceShowTab);
+    this.showRepresentedObject(resource, {[WebInspector.ResourceClusterContentView.ContentViewIdentifierCookieKey]: WebInspector.ResourceClusterContentView.RequestIdentifier});
 };
 
 WebInspector.debuggerToggleBreakpoints = function(event)
@@ -1135,7 +1133,7 @@
 
     function delayedWork()
     {
-        this.showSourceCodeForFrame(frame.id, true);
+        this.showSourceCodeForFrame(frame.id);
     }
 
     // Delay showing the frame since FrameWasAdded is called before MainFrameChanged.
@@ -1532,7 +1530,7 @@
     InspectorFrontendHost.bringToFront();
 
     this.showElementsTab();
-    this.showMainFrameDOMTree(event.data.node, true);
+    this.showMainFrameDOMTree(event.data.node);
 };
 
 WebInspector._inspectModeStateChanged = function(event)

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js (186465 => 186466)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js	2015-07-07 17:22:28 UTC (rev 186465)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js	2015-07-07 17:25:48 UTC (rev 186466)
@@ -351,10 +351,9 @@
             var marks = this._codeMirror.findMarksAt(position);
             for (var i = 0; i < marks.length; ++i) {
                 if (marks[i] === this._codeMirrorMarkedText) {
-                    if (this._delegate && typeof this._delegate.tokenTrackingControllerHighlightedRangeWasClicked === "function") {
-                        // Trigger the clicked delegate asynchronously, letting the editor complete handling of the click.
-                        setTimeout(function() { this._delegate.tokenTrackingControllerHighlightedRangeWasClicked(this); }.bind(this), 0);
-                    }
+                    if (this._delegate && typeof this._delegate.tokenTrackingControllerHighlightedRangeWasClicked === "function")
+                        this._delegate.tokenTrackingControllerHighlightedRangeWasClicked(this);
+
                     break;
                 }
             }

Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js (186465 => 186466)


--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js	2015-07-07 17:22:28 UTC (rev 186465)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js	2015-07-07 17:25:48 UTC (rev 186466)
@@ -93,7 +93,7 @@
 
     showMainResourceForFrame: function(frameIdentifier)
     {
-        WebInspector.showSourceCodeForFrame(frameIdentifier, true);
+        WebInspector.showSourceCodeForFrame(frameIdentifier);
     },
 
     contextMenuItemSelected: function(id)

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js (186465 => 186466)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js	2015-07-07 17:22:28 UTC (rev 186465)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js	2015-07-07 17:25:48 UTC (rev 186466)
@@ -224,7 +224,7 @@
 
     _goToContentFlowArrowWasClicked()
     {
-        WebInspector.showContentFlowDOMTree(this._contentFlow, this.nodeStyles.node, true);
+        WebInspector.showContentFlowDOMTree(this._contentFlow, this.nodeStyles.node);
     }
 };
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js (186465 => 186466)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js	2015-07-07 17:22:28 UTC (rev 186465)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js	2015-07-07 17:25:48 UTC (rev 186466)
@@ -223,7 +223,7 @@
                             return;
 
                         var sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber || 0);
-                        WebInspector.showSourceCodeLocation(sourceCodeLocation, true);
+                        WebInspector.showSourceCodeLocation(sourceCodeLocation);
                     });
                 });
             }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to