Title: [194490] trunk/Source/WebInspectorUI
- Revision
- 194490
- Author
- [email protected]
- Date
- 2016-01-01 21:51:18 -0800 (Fri, 01 Jan 2016)
Log Message
Web Inspector: The Computed Styles Properties section shows warning icons and doesn't update if collapsed
https://bugs.webkit.org/show_bug.cgi?id=152609
Patch by Devin Rousso <[email protected]> on 2016-01-01
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
If the CodeMirror instance is read-only, don't add any warning icons.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel):
(WebInspector.ComputedStyleDetailsPanel.prototype._handleCollapsedStateChanged):
The properties text editor will now refresh whenever the details section
becomes un-collapsed.
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection.prototype.set collapsed):
Now fires an event with the current collapsed state as data.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (194489 => 194490)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-01-02 05:50:48 UTC (rev 194489)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-01-02 05:51:18 UTC (rev 194490)
@@ -1,3 +1,24 @@
+2016-01-01 Devin Rousso <[email protected]>
+
+ Web Inspector: The Computed Styles Properties section shows warning icons and doesn't update if collapsed
+ https://bugs.webkit.org/show_bug.cgi?id=152609
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+ (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
+ If the CodeMirror instance is read-only, don't add any warning icons.
+
+ * UserInterface/Views/ComputedStyleDetailsPanel.js:
+ (WebInspector.ComputedStyleDetailsPanel):
+ (WebInspector.ComputedStyleDetailsPanel.prototype._handleCollapsedStateChanged):
+ The properties text editor will now refresh whenever the details section
+ becomes un-collapsed.
+
+ * UserInterface/Views/DetailsSection.js:
+ (WebInspector.DetailsSection.prototype.set collapsed):
+ Now fires an event with the current collapsed state as data.
+
2015-12-31 Matt Baker <[email protected]>
Web Inspector: "No Filter Results" message overlaps Debugger sidebar sections
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (194489 => 194490)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js 2016-01-02 05:50:48 UTC (rev 194489)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js 2016-01-02 05:51:18 UTC (rev 194490)
@@ -1045,7 +1045,7 @@
}
}
- if (property.hasOtherVendorNameOrKeyword() || property.text.trim().endsWith(":"))
+ if (this._codeMirror.getOption("readOnly") || property.hasOtherVendorNameOrKeyword() || property.text.trim().endsWith(":"))
return;
var propertyHasUnnecessaryPrefix = property.name.startsWith("-webkit-") && WebInspector.CSSCompletions.cssNameCompletions.isValidPropertyName(property.canonicalName);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js (194489 => 194490)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js 2016-01-02 05:50:48 UTC (rev 194489)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js 2016-01-02 05:51:18 UTC (rev 194490)
@@ -48,6 +48,7 @@
var propertiesRow = new WebInspector.DetailsSectionRow;
var propertiesGroup = new WebInspector.DetailsSectionGroup([propertiesRow]);
var propertiesSection = new WebInspector.DetailsSection("computed-style-properties", WebInspector.UIString("Properties"), [propertiesGroup], computedStyleShowAllLabel);
+ propertiesSection.addEventListener(WebInspector.DetailsSection.Event.CollapsedStateChanged, this._handleCollapsedStateChanged, this);
propertiesRow.element.appendChild(this._propertiesTextEditor.element);
@@ -225,6 +226,12 @@
this._propertiesTextEditor.showsImplicitProperties = checked;
}
+ _handleCollapsedStateChanged(event)
+ {
+ if (event && event.data && !event.data.collapsed)
+ this._propertiesTextEditor.refresh();
+ }
+
_updateFlowNamesSectionVisibility()
{
this._flowNamesSection.element.classList.toggle("hidden", !this._contentFlow && !this._regionFlow);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.js (194489 => 194490)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.js 2016-01-02 05:50:48 UTC (rev 194489)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.js 2016-01-02 05:51:18 UTC (rev 194490)
@@ -98,6 +98,8 @@
this._element.classList.remove(WebInspector.DetailsSection.CollapsedStyleClassName);
this._collapsedSetting.value = flag || false;
+
+ this.dispatchEventToListeners(WebInspector.DetailsSection.Event.CollapsedStateChanged, {collapsed: this._collapsedSetting.value});
}
get groups()
@@ -147,3 +149,7 @@
WebInspector.DetailsSection.CollapsedStyleClassName = "collapsed";
WebInspector.DetailsSection.MouseOverOptionsElementStyleClassName = "mouse-over-options-element";
+
+WebInspector.DetailsSection.Event = {
+ CollapsedStateChanged: "details-section-collapsed-state-changed"
+};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes