Title: [148524] trunk/Source/WebKit2
Revision
148524
Author
[email protected]
Date
2013-04-16 11:08:14 -0700 (Tue, 16 Apr 2013)

Log Message

Create full rects for the inspector and inspected views when
adjusting to an inspected view frame change.

This ensures switching dock sides restores the inspected view
and inspector to fill the parent's bounds.

https://webkit.org/b/114666
rdar://problem/13660796

Reviewed by Joseph Pecoraro.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (148523 => 148524)


--- trunk/Source/WebKit2/ChangeLog	2013-04-16 17:56:15 UTC (rev 148523)
+++ trunk/Source/WebKit2/ChangeLog	2013-04-16 18:08:14 UTC (rev 148524)
@@ -1,3 +1,19 @@
+2013-04-16  Timothy Hatcher  <[email protected]>
+
+        Create full rects for the inspector and inspected views when
+        adjusting to an inspected view frame change. 
+
+        This ensures switching dock sides restores the inspected view
+        and inspector to fill the parent's bounds.
+
+        https://webkit.org/b/114666
+        rdar://problem/13660796
+
+        Reviewed by Joseph Pecoraro.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
+
 2013-04-16  Balazs Kelemen  <[email protected]>
 
         Initialize logging channels for web processes

Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (148523 => 148524)


--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2013-04-16 17:56:15 UTC (rev 148523)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2013-04-16 18:08:14 UTC (rev 148524)
@@ -526,31 +526,31 @@
 
     WKView *inspectedView = m_page->wkView();
     NSRect inspectedViewFrame = [inspectedView frame];
-    NSRect inspectorFrame = inspectedViewFrame;
+    NSRect inspectorFrame = NSZeroRect;
     NSRect parentBounds = [[inspectedView superview] bounds];
 
     switch (m_attachmentSide) {
         case AttachmentSideBottom: {
             if (!currentDimension)
                 currentDimension = NSHeight([m_inspectorView.get() frame]);
+
             CGFloat parentHeight = NSHeight(parentBounds);
             CGFloat inspectorHeight = InspectorFrontendClientLocal::constrainedAttachedWindowHeight(currentDimension, parentHeight);
-            inspectedViewFrame.origin.y = inspectorHeight;
-            inspectedViewFrame.size.height = parentHeight - inspectorHeight;
-            inspectorFrame.origin.y = 0;
-            inspectorFrame.size.height = inspectorHeight;
+
+            inspectedViewFrame = NSMakeRect(0, inspectorHeight, NSWidth(parentBounds), parentHeight - inspectorHeight);
+            inspectorFrame = NSMakeRect(0, 0, NSWidth(inspectedViewFrame), inspectorHeight);
             break;
         }
 
         case AttachmentSideRight: {
             if (!currentDimension)
                 currentDimension = NSWidth([m_inspectorView.get() frame]);
+
             CGFloat parentWidth = NSWidth(parentBounds);
             CGFloat inspectorWidth = InspectorFrontendClientLocal::constrainedAttachedWindowWidth(currentDimension, parentWidth);
-            inspectedViewFrame.origin.x = 0;
-            inspectedViewFrame.size.width = parentWidth - inspectorWidth;
-            inspectorFrame.origin.x = parentWidth - inspectorWidth;
-            inspectorFrame.size.width = inspectorWidth;
+
+            inspectedViewFrame = NSMakeRect(0, 0, parentWidth - inspectorWidth, NSHeight(parentBounds));
+            inspectorFrame = NSMakeRect(parentWidth - inspectorWidth, 0, inspectorWidth, NSHeight(inspectedViewFrame));
             break;
         }
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to