Title: [253411] trunk/Source/WebInspectorUI
- Revision
- 253411
- Author
- drou...@apple.com
- Date
- 2019-12-11 17:38:57 -0800 (Wed, 11 Dec 2019)
Log Message
Web Inspector: REGRESSION: Console: unable to switch execution contexts
https://bugs.webkit.org/show_bug.cgi?id=205102
<rdar://problem/57748393>
Reviewed by Brian Burg.
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole):
Wait to initialize the main execution context path component until we actually have a main
execution context.
(WI.QuickConsole.prototype._pageTargetTransitioned):
Remove unnecessary duplicate early return.
(WI.QuickConsole.prototype._initializeMainExecutionContextPathComponent):
Restore the link to the next path component if the main execution context path component is
recreated when there already exist other execution contexts.
(WI.QuickConsole.prototype._selectExecutionContext):
Remove unnecessary assertion.
(WI.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
When the execution context of the main frame changes, recreate the main execution context
path component so it has the right `representedObject`.
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WI.HierarchicalPathNavigationItem.prototype.update):
Only hide the tooltip if we're not `sizeToFit` as otherwise we never unhide it due to an
early return (`sizeToFit` just makes everything visible).
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (253410 => 253411)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-12-12 01:28:36 UTC (rev 253410)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-12-12 01:38:57 UTC (rev 253411)
@@ -1,5 +1,37 @@
2019-12-11 Devin Rousso <drou...@apple.com>
+ Web Inspector: REGRESSION: Console: unable to switch execution contexts
+ https://bugs.webkit.org/show_bug.cgi?id=205102
+ <rdar://problem/57748393>
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Views/QuickConsole.js:
+ (WI.QuickConsole):
+ Wait to initialize the main execution context path component until we actually have a main
+ execution context.
+
+ (WI.QuickConsole.prototype._pageTargetTransitioned):
+ Remove unnecessary duplicate early return.
+
+ (WI.QuickConsole.prototype._initializeMainExecutionContextPathComponent):
+ Restore the link to the next path component if the main execution context path component is
+ recreated when there already exist other execution contexts.
+
+ (WI.QuickConsole.prototype._selectExecutionContext):
+ Remove unnecessary assertion.
+
+ (WI.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
+ When the execution context of the main frame changes, recreate the main execution context
+ path component so it has the right `representedObject`.
+
+ * UserInterface/Views/HierarchicalPathNavigationItem.js:
+ (WI.HierarchicalPathNavigationItem.prototype.update):
+ Only hide the tooltip if we're not `sizeToFit` as otherwise we never unhide it due to an
+ early return (`sizeToFit` just makes everything visible).
+
+2019-12-11 Devin Rousso <drou...@apple.com>
+
Web Inspector: Elements: Styles: hovering over an invalid value while holding ⌘ doesn't change the color of the text
https://bugs.webkit.org/show_bug.cgi?id=205039
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HierarchicalPathNavigationItem.js (253410 => 253411)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HierarchicalPathNavigationItem.js 2019-12-12 01:28:36 UTC (rev 253410)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HierarchicalPathNavigationItem.js 2019-12-12 01:38:57 UTC (rev 253411)
@@ -114,17 +114,19 @@
this._collapsedComponent = null;
}
+ let sizesToFit = navigationBar.sizesToFit;
+
// Expand our components to full width to test if the items can fit at full width.
for (var i = 0; i < this._components.length; ++i) {
this._components[i].hidden = false;
this._components[i].forcedWidth = null;
- this._components[i].hideTooltip = true;
+ this._components[i].hideTooltip = !sizesToFit;
}
if (options.expandOnly)
return;
- if (navigationBar.sizesToFit)
+ if (sizesToFit)
return;
// Iterate over all the other navigation items in the bar and calculate their width.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js (253410 => 253411)
--- trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js 2019-12-12 01:28:36 UTC (rev 253410)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js 2019-12-12 01:38:57 UTC (rev 253411)
@@ -69,8 +69,6 @@
this._executionContextSelectorDivider = new WI.DividerNavigationItem;
this._navigationBar.addNavigationItem(this._executionContextSelectorDivider);
- this._initializeMainExecutionContextPathComponent();
-
WI.settings.consoleSavedResultAlias.addEventListener(WI.Setting.Event.Changed, this._updateAutomaticExecutionContextPathComponentTooltip, this);
WI.consoleDrawer.toggleButtonShortcutTooltip(this._toggleOrFocusKeyboardShortcut);
@@ -90,6 +88,10 @@
WI.domManager.addEventListener(WI.DOMManager.Event.InspectedNodeChanged, this._handleInspectedNodeChanged, this);
WI.TabBrowser.addEventListener(WI.TabBrowser.Event.SelectedTabContentViewDidChange, this._updateStyles, this);
+
+ WI.whenTargetsAvailable().then(() => {
+ this._initializeMainExecutionContextPathComponent();
+ });
}
// Public
@@ -114,8 +116,6 @@
_pageTargetTransitioned()
{
- if (WI.mainTarget instanceof WI.MultiplexingBackendTarget)
- return;
this._initializeMainExecutionContextPathComponent();
}
@@ -124,8 +124,11 @@
if (!WI.mainTarget || WI.mainTarget instanceof WI.MultiplexingBackendTarget)
return;
+ let nextSibling = this._mainExecutionContextPathComponent ? this._mainExecutionContextPathComponent.nextSibling : null;
+
this._mainExecutionContextPathComponent = this._createExecutionContextPathComponent(WI.mainTarget.executionContext);
this._mainExecutionContextPathComponent.previousSibling = this._automaticExecutionContextPathComponent;
+ this._mainExecutionContextPathComponent.nextSibling = nextSibling;
this._automaticExecutionContextPathComponent.nextSibling = this._mainExecutionContextPathComponent;
@@ -166,7 +169,6 @@
}
}
- console.assert(executionContext);
if (!executionContext)
executionContext = WI.mainTarget.executionContext;
@@ -384,6 +386,7 @@
{
if (frame.isMainFrame()) {
this._shouldAutomaticallySelectExecutionContext = true;
+ this._initializeMainExecutionContextPathComponent();
return;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes