InspectorPageAgent should expose a method to control the compositing debug settings.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Oct 2012 14:19:52 +0000 (14:19 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Oct 2012 14:19:52 +0000 (14:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=99253

Patch by Antoine Quint <graouts@apple.com> on 2012-10-14
Reviewed by Timothy Hatcher.

* inspector/Inspector.json:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::setCompositingBordersVisible):
* inspector/InspectorPageAgent.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131265 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.h

index d935e5a64ee5a5f5be2eda09b30e1163ede9a18b..07c3c1769da86e87cc7f32cdb2da20b78e334144 100644 (file)
@@ -1,3 +1,15 @@
+2012-10-14  Antoine Quint  <graouts@apple.com>
+
+        InspectorPageAgent should expose a method to control the compositing debug settings.
+        https://bugs.webkit.org/show_bug.cgi?id=99253
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/Inspector.json:
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::setCompositingBordersVisible):
+        * inspector/InspectorPageAgent.h:
+
 2012-10-13  Chris Rogers  <crogers@google.com>
 
         WebAudioBus needs support for resizing bus to a smaller size
 2012-10-13  Chris Rogers  <crogers@google.com>
 
         WebAudioBus needs support for resizing bus to a smaller size
index 4a80fe0b4a61fe99cbd5d2e108b5c0c70a1e134c..24ebe882865e3143108ad44acfe283a2f5c7e09d 100644 (file)
                 ],
                 "description": "Toggles mouse event-based touch event emulation.",
                 "hidden": true
                 ],
                 "description": "Toggles mouse event-based touch event emulation.",
                 "hidden": true
+            },
+            {
+                "name": "setCompositingBordersVisible",
+                "description": "Controls the visibility of compositing borders.",
+                "parameters": [
+                    { "name": "visible", "type": "boolean", "description": "True for showing compositing borders." }
+                ],
+                "hidden": true
             }
         ],
         "events": [
             }
         ],
         "events": [
index 1933195a051b2d638323edb8f59a6f691b40c905..b35f1283062f41c1b1855631ccf60f958a88a9e0 100644 (file)
@@ -1108,6 +1108,16 @@ void InspectorPageAgent::setTouchEmulationEnabled(ErrorString* error, bool enabl
 #endif
 }
 
 #endif
 }
 
+void InspectorPageAgent::setCompositingBordersVisible(ErrorString*, bool visible)
+{
+    Settings* settings = m_page->settings();
+    if (!settings)
+        return;
+
+    settings->setShowDebugBorders(visible);
+    settings->setShowRepaintCounter(visible);
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INSPECTOR)
 } // namespace WebCore
 
 #endif // ENABLE(INSPECTOR)
index 38fe121ca063354a9aa041e9366d5dfa9024c6d0..0ce43bef5cecb9cf9e276ed9ee3f70149cad3485 100644 (file)
@@ -118,6 +118,7 @@ public:
     virtual void clearDeviceOrientationOverride(ErrorString*);
     virtual void canOverrideDeviceOrientation(ErrorString*, bool*);
     virtual void setTouchEmulationEnabled(ErrorString*, bool);
     virtual void clearDeviceOrientationOverride(ErrorString*);
     virtual void canOverrideDeviceOrientation(ErrorString*, bool*);
     virtual void setTouchEmulationEnabled(ErrorString*, bool);
+    virtual void setCompositingBordersVisible(ErrorString*, bool);
 
     // Geolocation override helpers.
     GeolocationPosition* overrideGeolocationPosition(GeolocationPosition*);
 
     // Geolocation override helpers.
     GeolocationPosition* overrideGeolocationPosition(GeolocationPosition*);