Title: [217266] trunk/Source/WebInspectorUI
- Revision
- 217266
- Author
- drou...@apple.com
- Date
- 2017-05-22 21:59:53 -0700 (Mon, 22 May 2017)
Log Message
Web Inspector: Changes are not applied in CSS sidebar when switching to Resources tab without blurring editor
https://bugs.webkit.org/show_bug.cgi?id=172388
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refreshEditor):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorFocused):
(WebInspector.RulesStyleDetailsPanel.prototype.shown):
When showing the StyleDetailsPanel, if there is an active editor, which is now saved each
time one becomes focused, force an update of that editor's content.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (217265 => 217266)
--- trunk/Source/WebInspectorUI/ChangeLog 2017-05-23 03:50:13 UTC (rev 217265)
+++ trunk/Source/WebInspectorUI/ChangeLog 2017-05-23 04:59:53 UTC (rev 217266)
@@ -1,3 +1,18 @@
+2017-05-22 Devin Rousso <drou...@apple.com>
+
+ Web Inspector: Changes are not applied in CSS sidebar when switching to Resources tab without blurring editor
+ https://bugs.webkit.org/show_bug.cgi?id=172388
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Views/CSSStyleDeclarationSection.js:
+ (WebInspector.CSSStyleDeclarationSection.prototype.refreshEditor):
+ * UserInterface/Views/RulesStyleDetailsPanel.js:
+ (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorFocused):
+ (WebInspector.RulesStyleDetailsPanel.prototype.shown):
+ When showing the StyleDetailsPanel, if there is an active editor, which is now saved each
+ time one becomes focused, force an update of that editor's content.
+
2017-05-22 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: New Tab contents not centered vertically
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (217265 => 217266)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js 2017-05-23 03:50:13 UTC (rev 217265)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js 2017-05-23 04:59:53 UTC (rev 217266)
@@ -303,6 +303,11 @@
this._selectorInput.value = this._selectorElement.textContent;
}
+ refreshEditor()
+ {
+ this._propertiesTextEditor.refresh();
+ }
+
highlightProperty(property)
{
if (this._propertiesTextEditor.highlightProperty(property)) {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js (217265 => 217266)
--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js 2017-05-23 03:50:13 UTC (rev 217265)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js 2017-05-23 04:59:53 UTC (rev 217266)
@@ -320,6 +320,8 @@
if (section !== focusedSection)
section.clearSelection();
}
+
+ this._sectionWithActiveEditor = focusedSection;
}
cssStyleDeclarationSectionEditorNextRule(currentSection)
@@ -433,6 +435,11 @@
section.style.__rulesSection = section;
section.updateLayout();
}
+
+ // If there was an active section and the panel was hidden, refresh the section in case
+ // changes were made to the underlying resource.
+ if (this._sectionWithActiveEditor)
+ this._sectionWithActiveEditor.refreshEditor();
}
hidden()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes