Title: [193238] branches/safari-601-branch/Source

Diff

Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193237 => 193238)


--- branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-03 19:00:42 UTC (rev 193237)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-03 19:00:48 UTC (rev 193238)
@@ -1,5 +1,27 @@
 2015-12-02  Timothy Hatcher  <[email protected]>
 
+        Merge r190416. rdar://problem/23221163
+
+    2015-09-30  João Oliveira  <[email protected]>
+
+            Web Inspector: Adjust font size of Developer Tools using Command,+ or Command,-
+            https://bugs.webkit.org/show_bug.cgi?id=149590
+
+            Reviewed by Joseph Pecoraro.
+
+            Patch by João Oliveira and Brian Burg.
+
+            Expose the frontend page's zoom factor so we can implement relative zoom.
+
+            * inspector/InspectorFrontendHost.cpp:
+            (WebCore::InspectorFrontendHost::zoomFactor): Added.
+            * inspector/InspectorFrontendHost.h:
+            * inspector/InspectorFrontendHost.idl:
+            * page/Frame.h:
+            (WebCore::Frame::pageZoomFactor):
+
+2015-12-02  Timothy Hatcher  <[email protected]>
+
         Merge r189883. rdar://problem/23221163
 
     2015-09-16  Joseph Pecoraro  <[email protected]>

Modified: branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.cpp (193237 => 193238)


--- branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.cpp	2015-12-03 19:00:42 UTC (rev 193237)
+++ branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.cpp	2015-12-03 19:00:48 UTC (rev 193238)
@@ -174,15 +174,20 @@
         m_client->bringToFront();
 }
 
+void InspectorFrontendHost::inspectedURLChanged(const String& newURL)
+{
+    if (m_client)
+        m_client->inspectedURLChanged(newURL);
+}
+
 void InspectorFrontendHost::setZoomFactor(float zoom)
 {
     m_frontendPage->mainFrame().setPageAndTextZoomFactors(zoom, 1);
 }
 
-void InspectorFrontendHost::inspectedURLChanged(const String& newURL)
+float InspectorFrontendHost::zoomFactor()
 {
-    if (m_client)
-        m_client->inspectedURLChanged(newURL);
+    return m_frontendPage->mainFrame().pageZoomFactor();
 }
 
 void InspectorFrontendHost::setAttachedWindowHeight(unsigned height)

Modified: branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.h (193237 => 193238)


--- branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.h	2015-12-03 19:00:42 UTC (rev 193237)
+++ branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.h	2015-12-03 19:00:48 UTC (rev 193238)
@@ -57,9 +57,11 @@
     void requestSetDockSide(const String&);
     void closeWindow();
     void bringToFront();
-    void setZoomFactor(float);
     void inspectedURLChanged(const String&);
 
+    void setZoomFactor(float);
+    float zoomFactor();
+
     void setAttachedWindowHeight(unsigned);
     void setAttachedWindowWidth(unsigned);
     void setToolbarHeight(unsigned);

Modified: branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.idl (193237 => 193238)


--- branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.idl	2015-12-03 19:00:42 UTC (rev 193237)
+++ branches/safari-601-branch/Source/WebCore/inspector/InspectorFrontendHost.idl	2015-12-03 19:00:48 UTC (rev 193238)
@@ -37,9 +37,11 @@
     void loaded();
     void closeWindow();
     void bringToFront();
-    void setZoomFactor(unrestricted float zoom);
     void inspectedURLChanged(DOMString newURL);
 
+    void setZoomFactor(unrestricted float zoom);
+    float zoomFactor();
+
     void requestSetDockSide(DOMString side);
 
     void setAttachedWindowHeight(unsigned long height);

Modified: branches/safari-601-branch/Source/WebInspectorUI/ChangeLog (193237 => 193238)


--- branches/safari-601-branch/Source/WebInspectorUI/ChangeLog	2015-12-03 19:00:42 UTC (rev 193237)
+++ branches/safari-601-branch/Source/WebInspectorUI/ChangeLog	2015-12-03 19:00:48 UTC (rev 193238)
@@ -1,5 +1,21 @@
 2015-12-02  Timothy Hatcher  <[email protected]>
 
+        Merge r190416. rdar://problem/23221163
+
+    2015-09-30  João Oliveira  <[email protected]>
+
+            Web Inspector: Adjust font size of Developer Tools using Command,+ or Command,-
+            https://bugs.webkit.org/show_bug.cgi?id=149590
+
+            Reviewed by Joseph Pecoraro.
+
+            Patch by João Oliveira and Brian Burg.
+
+            * UserInterface/Base/Main.js:
+            (WebInspector.contentLoaded): Add global keyboard shortcuts for zoom in and zoom out.
+
+2015-12-02  Timothy Hatcher  <[email protected]>
+
         Merge r190381. rdar://problem/23221163
 
     2015-09-30  Joseph Pecoraro  <[email protected]>

Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Main.js (193237 => 193238)


--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Main.js	2015-12-03 19:00:42 UTC (rev 193237)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Base/Main.js	2015-12-03 19:00:48 UTC (rev 193238)
@@ -245,6 +245,9 @@
     this.navigationSidebarKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "0", this.toggleNavigationSidebar.bind(this));
     this.detailsSidebarKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Option, "0", this.toggleDetailsSidebar.bind(this));
 
+    this._increaseZoomKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, WebInspector.KeyboardShortcut.Key.Plus, this._increaseZoom.bind(this));
+    this._decreaseZoomKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, WebInspector.KeyboardShortcut.Key.Minus, this._decreaseZoom.bind(this));
+
     this.tabBrowser = new WebInspector.TabBrowser(document.getElementById("tab-browser"), this.tabBar, this.navigationSidebar, this.detailsSidebar);
     this.tabBrowser.addEventListener(WebInspector.TabBrowser.Event.SelectedTabContentViewDidChange, this._tabBrowserSelectedTabContentViewDidChange, this);
 
@@ -1808,6 +1811,18 @@
     event.preventDefault();
 };
 
+WebInspector._increaseZoom = function(event) {
+    var currentZoom = InspectorFrontendHost.zoomFactor();
+    InspectorFrontendHost.setZoomFactor(currentZoom * 1.2);
+    event.preventDefault();
+};
+
+WebInspector._decreaseZoom = function(event) {
+    var currentZoom = InspectorFrontendHost.zoomFactor();
+    InspectorFrontendHost.setZoomFactor(currentZoom * 0.8);
+    event.preventDefault();
+};
+
 WebInspector._generateDisclosureTriangleImages = function()
 {
     var specifications = {};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to