Modified: trunk/Source/WebInspectorUI/ChangeLog (174669 => 174670)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-10-14 01:31:00 UTC (rev 174669)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-10-14 04:43:53 UTC (rev 174670)
@@ -1,5 +1,23 @@
2014-10-13 Joseph Pecoraro <[email protected]>
+ Web Inspector: Paint Flashing button does not match page state after reload
+ https://bugs.webkit.org/show_bug.cgi?id=137680
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.loaded):
+ Make paint flashing a frontend setting. Enable it when the inspector
+ is opened if it was previously enabled.
+
+ * UserInterface/Views/DOMTreeContentView.js:
+ (WebInspector.DOMTreeContentView):
+ (WebInspector.DOMTreeContentView.prototype._togglePaintFlashing):
+ (WebInspector.DOMTreeContentView.prototype._showPaintRectsSettingChanged):
+ Have the paint flashing button always match the global setting.
+
+2014-10-13 Joseph Pecoraro <[email protected]>
+
Web Inspector: Improve appearance of alpha color swatches
https://bugs.webkit.org/show_bug.cgi?id=137627
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (174669 => 174670)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2014-10-14 01:31:00 UTC (rev 174669)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2014-10-14 04:43:53 UTC (rev 174670)
@@ -163,9 +163,13 @@
this.showReplayInterfaceSetting = new WebInspector.Setting("show-web-replay", false);
this.showJavaScriptTypeInformationSetting = new WebInspector.Setting("show-_javascript_-type-information", false);
- if (this.showJavaScriptTypeInformationSetting.value)
+ if (this.showJavaScriptTypeInformationSetting.value && RuntimeAgent && RuntimeAgent.enableTypeProfiler)
RuntimeAgent.enableTypeProfiler();
+ this.showPaintRectsSetting = new WebInspector.Setting("show-paint-rects", false);
+ if (this.showPaintRectsSetting.value && PageAgent && PageAgent.setShowPaintRects)
+ PageAgent.setShowPaintRects(true);
+
this.mouseCoords = {
x: 0,
y: 0
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js (174669 => 174670)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2014-10-14 01:31:00 UTC (rev 174669)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2014-10-14 04:43:53 UTC (rev 174670)
@@ -42,9 +42,11 @@
this._compositingBordersButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._toggleCompositingBorders, this);
this._compositingBordersButtonNavigationItem.enabled = !!PageAgent.getCompositingBordersVisible;
+ WebInspector.showPaintRectsSetting.addEventListener(WebInspector.Setting.Event.Changed, this._showPaintRectsSettingChanged, this);
this._paintFlashingButtonNavigationItem = new WebInspector.ActivateButtonNavigationItem("paint-flashing", WebInspector.UIString("Enable paint flashing"), WebInspector.UIString("Disable paint flashing"), "Images/PaintFlashing.svg", 16, 16);
this._paintFlashingButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._togglePaintFlashing, this);
- this._paintFlashingButtonNavigationItem.enabled = true;
+ this._paintFlashingButtonNavigationItem.enabled = !!PageAgent.setShowPaintRects;
+ this._paintFlashingButtonNavigationItem.activated = PageAgent.setShowPaintRects && WebInspector.showPaintRectsSetting.value;
WebInspector.showShadowDOMSetting.addEventListener(WebInspector.Setting.Event.Changed, this._showShadowDOMSettingChanged, this);
this._showsShadowDOMButtonNavigationItem = new WebInspector.ActivateButtonNavigationItem("shows-shadow-DOM", WebInspector.UIString("Show shadow DOM nodes"), WebInspector.UIString("Hide shadow DOM nodes"), shadowDOMImage.src, shadowDOMImage.width, shadowDOMImage.height);
@@ -430,11 +432,7 @@
_togglePaintFlashing: function(event)
{
- console.assert(PageAgent.setShowPaintRects);
-
- var activated = !this._paintFlashingButtonNavigationItem.activated;
- this._paintFlashingButtonNavigationItem.activated = activated;
- PageAgent.setShowPaintRects(activated);
+ WebInspector.showPaintRectsSetting.value = !WebInspector.showPaintRectsSetting.value;
},
_updateCompositingBordersButtonToMatchPageSettings: function()
@@ -451,6 +449,15 @@
});
},
+ _showPaintRectsSettingChanged: function(event)
+ {
+ console.assert(PageAgent.setShowPaintRects);
+
+ this._paintFlashingButtonNavigationItem.activated = WebInspector.showPaintRectsSetting.value;
+
+ PageAgent.setShowPaintRects(this._paintFlashingButtonNavigationItem.activated);
+ },
+
_showShadowDOMSettingChanged: function(event)
{
this._showsShadowDOMButtonNavigationItem.activated = WebInspector.showShadowDOMSetting.value;