Title: [264666] trunk/Source/WebInspectorUI
- Revision
- 264666
- Author
- drou...@apple.com
- Date
- 2020-07-21 11:48:59 -0700 (Tue, 21 Jul 2020)
Log Message
Web Inspector: REGRESSION(?): file names are not shown in the open resource dialog
https://bugs.webkit.org/show_bug.cgi?id=214605
Reviewed by Brian Burg.
When a `DocumentFragment` is added to a parent node, the children of the `DocumentFragment`
are added as children of the parent instead of the `DocumentFragment` itself, effectively
emptying the `DocumentFragment`, meaning that adding that `DocumentFragment` to a parent
node again will basically do nothing as there are no children for that `DocumentFragment`.
* UserInterface/Views/GeneralTreeElement.js:
(WI.GeneralTreeElement.prototype._updateTitleElements):
Because the `_mainTitleElement`/`_subtitleElement` is cleared (`removeChildren`), if the
`_mainTitle`/`_subtitle` is a `DocumentFragment` nothing will be added due to the above.
Instead, if the `_mainTitle`/`_subtitle` is a `DocumentFragment`, change it to be the
`textContent` of the `_mainTitleElement`/`_subtitleElement` so that the above does not
happen and so that future calls to `_updateTitleElements` won't make any changes the
`_mainTitle`/`_subtitle` is now a `String` which matches the `textContent`.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (264665 => 264666)
--- trunk/Source/WebInspectorUI/ChangeLog 2020-07-21 18:26:39 UTC (rev 264665)
+++ trunk/Source/WebInspectorUI/ChangeLog 2020-07-21 18:48:59 UTC (rev 264666)
@@ -1,3 +1,24 @@
+2020-07-21 Devin Rousso <drou...@apple.com>
+
+ Web Inspector: REGRESSION(?): file names are not shown in the open resource dialog
+ https://bugs.webkit.org/show_bug.cgi?id=214605
+
+ Reviewed by Brian Burg.
+
+ When a `DocumentFragment` is added to a parent node, the children of the `DocumentFragment`
+ are added as children of the parent instead of the `DocumentFragment` itself, effectively
+ emptying the `DocumentFragment`, meaning that adding that `DocumentFragment` to a parent
+ node again will basically do nothing as there are no children for that `DocumentFragment`.
+
+ * UserInterface/Views/GeneralTreeElement.js:
+ (WI.GeneralTreeElement.prototype._updateTitleElements):
+ Because the `_mainTitleElement`/`_subtitleElement` is cleared (`removeChildren`), if the
+ `_mainTitle`/`_subtitle` is a `DocumentFragment` nothing will be added due to the above.
+ Instead, if the `_mainTitle`/`_subtitle` is a `DocumentFragment`, change it to be the
+ `textContent` of the `_mainTitleElement`/`_subtitleElement` so that the above does not
+ happen and so that future calls to `_updateTitleElements` won't make any changes the
+ `_mainTitle`/`_subtitle` is now a `String` which matches the `textContent`.
+
2020-07-15 Nikita Vasilyev <nvasil...@apple.com>
Web Inspector: Tab bar colors of undocked Inspector should match Safari in Big Sur
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js (264665 => 264666)
--- trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js 2020-07-21 18:26:39 UTC (rev 264665)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js 2020-07-21 18:48:59 UTC (rev 264666)
@@ -335,6 +335,8 @@
} else if (this._mainTitle instanceof Node) {
this._mainTitleElement.removeChildren();
this._mainTitleElement.appendChild(this._mainTitle);
+ if (this._mainTitle instanceof DocumentFragment)
+ this._mainTitle = this._mainTitleElement.textContent;
}
if (typeof this._subtitle === "string" && this._subtitle) {
@@ -346,6 +348,8 @@
this._createSubtitleElementIfNeeded();
this._subtitleElement.removeChildren();
this._subtitleElement.appendChild(this._subtitle);
+ if (this._subtitle instanceof DocumentFragment)
+ this._subtitle = this._subtitleElement.textContent;
this._titlesElement.classList.remove(WI.GeneralTreeElement.NoSubtitleStyleClassName);
} else {
if (this._subtitleElement)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes