Diff
Modified: trunk/Source/Platform/ChangeLog (142143 => 142144)
--- trunk/Source/Platform/ChangeLog 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/Platform/ChangeLog 2013-02-07 17:55:17 UTC (rev 142144)
@@ -1,3 +1,18 @@
+2013-02-07 Eberhard Graether <[email protected]>
+
+ Web Inspector: Add settings checkbox for composited layer borders
+ https://bugs.webkit.org/show_bug.cgi?id=109096
+
+ Reviewed by Pavel Feldman.
+
+ This change adds a checkbox to show composited layer borders to the WebInspector's
+ rendering settings and plumbs the setting to Chromium's WebLayerTreeView. The setting
+ is visible if InspectorClient::canShowDebugBorders() returns true.
+
+ * chromium/public/WebLayerTreeView.h:
+ (WebLayerTreeView):
+ (WebKit::WebLayerTreeView::setShowDebugBorders):
+
2013-02-06 Tommy Widenflycht <[email protected]>
MediaStream API: Implement DTMF support in RTCPeerConnection
Modified: trunk/Source/Platform/chromium/public/WebLayerTreeView.h (142143 => 142144)
--- trunk/Source/Platform/chromium/public/WebLayerTreeView.h 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/Platform/chromium/public/WebLayerTreeView.h 2013-02-07 17:55:17 UTC (rev 142144)
@@ -184,6 +184,9 @@
// Toggles the paint rects in the HUD layer
virtual void setShowPaintRects(bool) { }
+ // Toggles the debug borders on layers
+ virtual void setShowDebugBorders(bool) { }
+
// Toggles continuous painting
virtual void setContinuousPaintingEnabled(bool) { }
Modified: trunk/Source/WebCore/ChangeLog (142143 => 142144)
--- trunk/Source/WebCore/ChangeLog 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/ChangeLog 2013-02-07 17:55:17 UTC (rev 142144)
@@ -1,3 +1,37 @@
+2013-02-07 Eberhard Graether <[email protected]>
+
+ Web Inspector: Add settings checkbox for composited layer borders
+ https://bugs.webkit.org/show_bug.cgi?id=109096
+
+ Reviewed by Pavel Feldman.
+
+ This change adds a checkbox to show composited layer borders to the WebInspector's
+ rendering settings and plumbs the setting to Chromium's WebLayerTreeView. The setting
+ is visible if InspectorClient::canShowDebugBorders() returns true.
+
+ No new tests.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/Inspector.json:
+ * inspector/InspectorClient.h:
+ (WebCore::InspectorClient::canShowDebugBorders):
+ (WebCore::InspectorClient::setShowDebugBorders):
+ (InspectorClient):
+ * inspector/InspectorPageAgent.cpp:
+ (PageAgentState):
+ (WebCore::InspectorPageAgent::restore):
+ (WebCore::InspectorPageAgent::disable):
+ (WebCore::InspectorPageAgent::canShowDebugBorders):
+ (WebCore):
+ (WebCore::InspectorPageAgent::setShowDebugBorders):
+ * inspector/InspectorPageAgent.h:
+ * inspector/front-end/Settings.js:
+ * inspector/front-end/SettingsScreen.js:
+ (WebInspector.GenericSettingsTab):
+ (WebInspector.GenericSettingsTab.prototype.get _showDebugBordersChanged):
+ * inspector/front-end/inspector.js:
+ (WebInspector.doLoadedDone):
+
2013-02-07 Gavin Peters <[email protected]>
Unreviewed, rolling out r142141.
Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js (142143 => 142144)
--- trunk/Source/WebCore/English.lproj/localizedStrings.js 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/English.lproj/localizedStrings.js 2013-02-07 17:55:17 UTC (rev 142144)
@@ -665,6 +665,7 @@
localizedStrings["IndexedDB"] = "IndexedDB";
localizedStrings["Animation"] = "Animation";
localizedStrings["Show paint rectangles"] = "Show paint rectangles";
+localizedStrings["Show composited layer borders"] = "Show composited layer borders";
localizedStrings["Show FPS meter"] = "Show FPS meter";
localizedStrings["Security origin"] = "Security origin";
localizedStrings["Version"] = "Version";
Modified: trunk/Source/WebCore/inspector/Inspector.json (142143 => 142144)
--- trunk/Source/WebCore/inspector/Inspector.json 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/inspector/Inspector.json 2013-02-07 17:55:17 UTC (rev 142144)
@@ -375,6 +375,22 @@
"hidden": true
},
{
+ "name": "canShowDebugBorders",
+ "description": "Tells if backend supports debug borders on layers",
+ "returns": [
+ { "name": "show", "type": "boolean", "description": "True if the debug borders can be shown" }
+ ],
+ "hidden": true
+ },
+ {
+ "name": "setShowDebugBorders",
+ "description": "Requests that backend shows debug borders on layers",
+ "parameters": [
+ { "name": "show", "type": "boolean", "description": "True for showing debug borders" }
+ ],
+ "hidden": true
+ },
+ {
"name": "canShowFPSCounter",
"description": "Tells if backend supports a FPS counter display",
"returns": [
Modified: trunk/Source/WebCore/inspector/InspectorClient.h (142143 => 142144)
--- trunk/Source/WebCore/inspector/InspectorClient.h 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/inspector/InspectorClient.h 2013-02-07 17:55:17 UTC (rev 142144)
@@ -73,6 +73,9 @@
virtual bool overridesShowPaintRects() { return false; }
virtual void setShowPaintRects(bool) { }
+ virtual bool canShowDebugBorders() { return false; }
+ virtual void setShowDebugBorders(bool) { }
+
virtual bool canShowFPSCounter() { return false; }
virtual void setShowFPSCounter(bool) { }
Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (142143 => 142144)
--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2013-02-07 17:55:17 UTC (rev 142144)
@@ -95,6 +95,7 @@
static const char pageAgentShowFPSCounter[] = "pageAgentShowFPSCounter";
static const char pageAgentContinuousPaintingEnabled[] = "pageAgentContinuousPaintingEnabled";
static const char pageAgentShowPaintRects[] = "pageAgentShowPaintRects";
+static const char pageAgentShowDebugBorders[] = "pageAgentShowDebugBorders";
#if ENABLE(TOUCH_EVENTS)
static const char touchEventEmulationEnabled[] = "touchEventEmulationEnabled";
#endif
@@ -363,6 +364,8 @@
setScriptExecutionDisabled(0, scriptExecutionDisabled);
bool showPaintRects = m_state->getBoolean(PageAgentState::pageAgentShowPaintRects);
setShowPaintRects(0, showPaintRects);
+ bool showDebugBorders = m_state->getBoolean(PageAgentState::pageAgentShowDebugBorders);
+ setShowDebugBorders(0, showDebugBorders);
bool showFPSCounter = m_state->getBoolean(PageAgentState::pageAgentShowFPSCounter);
setShowFPSCounter(0, showFPSCounter);
String emulatedMedia = m_state->getString(PageAgentState::pageAgentEmulatedMedia);
@@ -402,6 +405,7 @@
setScriptExecutionDisabled(0, false);
setShowPaintRects(0, false);
+ setShowDebugBorders(0, false);
setShowFPSCounter(0, false);
setEmulatedMedia(0, "");
setContinuousPaintingEnabled(0, false);
@@ -739,6 +743,19 @@
mainFrame()->view()->invalidate();
}
+void InspectorPageAgent::canShowDebugBorders(ErrorString*, bool* outParam)
+{
+ *outParam = m_client->canShowDebugBorders();
+}
+
+void InspectorPageAgent::setShowDebugBorders(ErrorString*, bool show)
+{
+ m_state->setBoolean(PageAgentState::pageAgentShowDebugBorders, show);
+ m_client->setShowDebugBorders(show);
+ if (mainFrame() && mainFrame()->view())
+ mainFrame()->view()->invalidate();
+}
+
void InspectorPageAgent::canShowFPSCounter(ErrorString*, bool* outParam)
{
*outParam = m_client->canShowFPSCounter();
Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.h (142143 => 142144)
--- trunk/Source/WebCore/inspector/InspectorPageAgent.h 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.h 2013-02-07 17:55:17 UTC (rev 142144)
@@ -109,6 +109,8 @@
virtual void canOverrideDeviceMetrics(ErrorString*, bool*);
virtual void setDeviceMetricsOverride(ErrorString*, int width, int height, double fontScaleFactor, bool fitWindow);
virtual void setShowPaintRects(ErrorString*, bool show);
+ virtual void canShowDebugBorders(ErrorString*, bool*);
+ virtual void setShowDebugBorders(ErrorString*, bool show);
virtual void canShowFPSCounter(ErrorString*, bool*);
virtual void setShowFPSCounter(ErrorString*, bool show);
virtual void canContinuouslyPaint(ErrorString*, bool*);
Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (142143 => 142144)
--- trunk/Source/WebCore/inspector/front-end/Settings.js 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js 2013-02-07 17:55:17 UTC (rev 142144)
@@ -60,6 +60,7 @@
timelineCanMonitorMainThread: false,
canOverrideGeolocation: false,
canOverrideDeviceOrientation: false,
+ canShowDebugBorders: false,
canShowFPSCounter: false,
canContinuouslyPaint: false
}
@@ -100,6 +101,7 @@
this.emulateTouchEvents = this.createSetting("emulateTouchEvents", false);
this.showPaintRects = this.createSetting("showPaintRects", false);
this.continuousPainting = this.createSetting("continuousPainting", false);
+ this.showDebugBorders = this.createSetting("showDebugBorders", false);
this.showFPSCounter = this.createSetting("showFPSCounter", false);
this.showShadowDOM = this.createSetting("showShadowDOM", false);
this.zoomLevel = this.createSetting("zoomLevel", 0);
Modified: trunk/Source/WebCore/inspector/front-end/SettingsScreen.js (142143 => 142144)
--- trunk/Source/WebCore/inspector/front-end/SettingsScreen.js 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/inspector/front-end/SettingsScreen.js 2013-02-07 17:55:17 UTC (rev 142144)
@@ -292,6 +292,10 @@
p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Show paint rectangles"), WebInspector.settings.showPaintRects));
WebInspector.settings.showPaintRects.addChangeListener(this._showPaintRectsChanged, this);
+ if (Capabilities.canShowDebugBorders) {
+ p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Show composited layer borders"), WebInspector.settings.showDebugBorders));
+ WebInspector.settings.showDebugBorders.addChangeListener(this._showDebugBordersChanged, this);
+ }
if (Capabilities.canShowFPSCounter) {
p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Show FPS meter"), WebInspector.settings.showFPSCounter));
WebInspector.settings.showFPSCounter.addChangeListener(this._showFPSCounterChanged, this);
@@ -342,6 +346,11 @@
PageAgent.setShowPaintRects(WebInspector.settings.showPaintRects.get());
},
+ _showDebugBordersChanged: function()
+ {
+ PageAgent.setShowDebugBorders(WebInspector.settings.showDebugBorders.get());
+ },
+
_showFPSCounterChanged: function()
{
PageAgent.setShowFPSCounter(WebInspector.settings.showFPSCounter.get());
Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (142143 => 142144)
--- trunk/Source/WebCore/inspector/front-end/inspector.js 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js 2013-02-07 17:55:17 UTC (rev 142144)
@@ -371,6 +371,7 @@
ProfilerAgent.hasHeapProfiler(WebInspector._initializeCapability.bind(WebInspector, "heapProfilerPresent", null));
TimelineAgent.supportsFrameInstrumentation(WebInspector._initializeCapability.bind(WebInspector, "timelineSupportsFrameInstrumentation", null));
TimelineAgent.canMonitorMainThread(WebInspector._initializeCapability.bind(WebInspector, "timelineCanMonitorMainThread", null));
+ PageAgent.canShowDebugBorders(WebInspector._initializeCapability.bind(WebInspector, "canShowDebugBorders", null));
PageAgent.canShowFPSCounter(WebInspector._initializeCapability.bind(WebInspector, "canShowFPSCounter", null));
PageAgent.canContinuouslyPaint(WebInspector._initializeCapability.bind(WebInspector, "canContinuouslyPaint", null));
PageAgent.canOverrideDeviceMetrics(WebInspector._initializeCapability.bind(WebInspector, "canOverrideDeviceMetrics", null));
@@ -492,6 +493,9 @@
if (WebInspector.settings.showPaintRects.get())
PageAgent.setShowPaintRects(true);
+ if (WebInspector.settings.showDebugBorders.get())
+ PageAgent.setShowDebugBorders(true);
+
if (WebInspector.settings.continuousPainting.get())
PageAgent.setContinuousPaintingEnabled(true);
Modified: trunk/Source/WebKit/chromium/ChangeLog (142143 => 142144)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-02-07 17:55:17 UTC (rev 142144)
@@ -1,3 +1,27 @@
+2013-02-07 Eberhard Graether <[email protected]>
+
+ Web Inspector: Add settings checkbox for composited layer borders
+ https://bugs.webkit.org/show_bug.cgi?id=109096
+
+ Reviewed by Pavel Feldman.
+
+ This change adds a checkbox to show composited layer borders to the WebInspector's
+ rendering settings and plumbs the setting to Chromium's WebLayerTreeView. The setting
+ is visible if InspectorClient::canShowDebugBorders() returns true.
+
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::canShowDebugBorders):
+ (WebKit):
+ (WebKit::InspectorClientImpl::setShowDebugBorders):
+ * src/InspectorClientImpl.h:
+ (InspectorClientImpl):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::setShowDebugBorders):
+ (WebKit):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ * src/WebViewImpl.h:
+
2013-02-07 Stephen White <[email protected]>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/src/InspectorClientImpl.cpp (142143 => 142144)
--- trunk/Source/WebKit/chromium/src/InspectorClientImpl.cpp 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebKit/chromium/src/InspectorClientImpl.cpp 2013-02-07 17:55:17 UTC (rev 142144)
@@ -163,6 +163,16 @@
m_inspectedWebView->setShowPaintRects(show);
}
+bool InspectorClientImpl::canShowDebugBorders()
+{
+ return true;
+}
+
+void InspectorClientImpl::setShowDebugBorders(bool show)
+{
+ m_inspectedWebView->setShowDebugBorders(show);
+}
+
bool InspectorClientImpl::canShowFPSCounter()
{
if (m_inspectedWebView->page())
Modified: trunk/Source/WebKit/chromium/src/InspectorClientImpl.h (142143 => 142144)
--- trunk/Source/WebKit/chromium/src/InspectorClientImpl.h 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebKit/chromium/src/InspectorClientImpl.h 2013-02-07 17:55:17 UTC (rev 142144)
@@ -76,6 +76,9 @@
virtual bool overridesShowPaintRects();
virtual void setShowPaintRects(bool);
+ virtual bool canShowDebugBorders();
+ virtual void setShowDebugBorders(bool);
+
virtual bool canShowFPSCounter();
virtual void setShowFPSCounter(bool);
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (142143 => 142144)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-02-07 17:55:17 UTC (rev 142144)
@@ -451,6 +451,7 @@
, m_suppressInvalidations(false)
, m_showFPSCounter(false)
, m_showPaintRects(false)
+ , m_showDebugBorders(false)
, m_continuousPaintingEnabled(false)
{
// WebKit/win/WebView.cpp does the same thing, except they call the
@@ -877,6 +878,13 @@
m_showPaintRects = show;
}
+void WebViewImpl::setShowDebugBorders(bool show)
+{
+ if (isAcceleratedCompositingActive())
+ m_layerTreeView->setShowDebugBorders(show);
+ m_showDebugBorders = show;
+}
+
void WebViewImpl::setContinuousPaintingEnabled(bool enabled)
{
if (isAcceleratedCompositingActive()) {
@@ -4151,6 +4159,7 @@
m_pageOverlays->update();
m_layerTreeView->setShowFPSCounter(m_showFPSCounter);
m_layerTreeView->setShowPaintRects(m_showPaintRects);
+ m_layerTreeView->setShowDebugBorders(m_showDebugBorders);
m_layerTreeView->setContinuousPaintingEnabled(m_continuousPaintingEnabled);
} else {
m_nonCompositedContentHost.clear();
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (142143 => 142144)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.h 2013-02-07 17:51:49 UTC (rev 142143)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h 2013-02-07 17:55:17 UTC (rev 142144)
@@ -311,6 +311,7 @@
virtual void transferActiveWheelFlingAnimation(const WebActiveWheelFlingParameters&);
virtual WebViewBenchmarkSupport* benchmarkSupport();
virtual void setShowPaintRects(bool);
+ virtual void setShowDebugBorders(bool);
virtual void setShowFPSCounter(bool);
virtual void setContinuousPaintingEnabled(bool);
@@ -896,6 +897,7 @@
bool m_showFPSCounter;
bool m_showPaintRects;
+ bool m_showDebugBorders;
bool m_continuousPaintingEnabled;
};