Title: [149379] trunk/Source/WebKit2
Revision
149379
Author
[email protected]
Date
2013-04-30 10:58:39 -0700 (Tue, 30 Apr 2013)

Log Message

Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4.

https://webkit.org/b/115428

Reviewed by Joseph Pecoraro.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version.
(WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it
works on Safari 6.0.4.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (149378 => 149379)


--- trunk/Source/WebKit2/ChangeLog	2013-04-30 17:49:58 UTC (rev 149378)
+++ trunk/Source/WebKit2/ChangeLog	2013-04-30 17:58:39 UTC (rev 149379)
@@ -1,3 +1,16 @@
+2013-04-30  Timothy Hatcher  <[email protected]>
+
+        Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4.
+
+        https://webkit.org/b/115428
+
+        Reviewed by Joseph Pecoraro.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version.
+        (WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it
+        works on Safari 6.0.4.
+
 2013-04-30  Artur Moryc  <[email protected]>
 
         [WK2][EFL] Spelling marker disappears while selection is being changed

Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (149378 => 149379)


--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2013-04-30 17:49:58 UTC (rev 149378)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2013-04-30 17:58:39 UTC (rev 149379)
@@ -280,7 +280,7 @@
 
     NSView *contentView = [window contentView];
 
-    static const int32_t firstVersionOfSafariWithDockToRightSupport = 0x02192400; // 537.36.0
+    static const int32_t firstVersionOfSafariWithDockToRightSupport = 0x02181d0d; // 536.29.13
     static bool supportsDockToRight = NSVersionOfLinkTimeLibrary("Safari") >= firstVersionOfSafariWithDockToRightSupport;
 
     m_dockBottomButton = adoptNS(createDockButton(@"DockBottom"));
@@ -610,23 +610,8 @@
     // Make sure that we size the inspected view's frame after detaching so that it takes up the space that the
     // attached inspector used to.
 
-    NSRect inspectedViewFrame = [inspectedView frame];
-    NSRect parentBounds = [[inspectedView superview] bounds];
+    [inspectedView setFrame:[[inspectedView superview] bounds]];
 
-    switch (m_attachmentSide) {
-    case AttachmentSideBottom:
-        inspectedViewFrame.size.height = NSHeight(parentBounds);
-        inspectedViewFrame.origin.y = 0;
-        break;
-
-    case AttachmentSideRight:
-        inspectedViewFrame.size.width = NSWidth(parentBounds);
-        inspectedViewFrame.origin.x = 0;
-        break;
-    }
-
-    [inspectedView setFrame:inspectedViewFrame];
-
     // Return early if we are not visible. This means the inspector was closed while attached
     // and we should not create and show the inspector window.
     if (!m_isVisible)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to