Title: [236411] trunk/Source/WebKit
Revision
236411
Author
[email protected]
Date
2018-09-24 10:37:47 -0700 (Mon, 24 Sep 2018)

Log Message

Web Inspector: topContentInset is not accounted for when inspecting a WKWebView and docked to side
https://bugs.webkit.org/show_bug.cgi?id=189859

Reviewed by Joseph Pecoraro.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
Add special cases for inspecting a WKWebView. We already special-case for WKView.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (236410 => 236411)


--- trunk/Source/WebKit/ChangeLog	2018-09-24 17:35:39 UTC (rev 236410)
+++ trunk/Source/WebKit/ChangeLog	2018-09-24 17:37:47 UTC (rev 236411)
@@ -1,3 +1,14 @@
+2018-09-24  Brian Burg  <[email protected]>
+
+        Web Inspector: topContentInset is not accounted for when inspecting a WKWebView and docked to side
+        https://bugs.webkit.org/show_bug.cgi?id=189859
+
+        Reviewed by Joseph Pecoraro.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
+        Add special cases for inspecting a WKWebView. We already special-case for WKView.
+
 2018-09-24  Miguel Gomez  <[email protected]>
 
         [GTK][WPE] Compositing indicators are not working

Modified: trunk/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm (236410 => 236411)


--- trunk/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm	2018-09-24 17:35:39 UTC (rev 236410)
+++ trunk/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm	2018-09-24 17:37:47 UTC (rev 236411)
@@ -526,6 +526,8 @@
         CGFloat insetExcludingBanners = 0;
         if ([inspectedView isKindOfClass:[WKView class]])
             insetExcludingBanners = ((WKView *)inspectedView)._topContentInset - ((WKView *)inspectedView)._totalHeightOfBanners;
+        if ([inspectedView isKindOfClass:[WKWebView class]])
+            insetExcludingBanners = ((WKWebView *)inspectedView)._topContentInset - ((WKWebView *)inspectedView)._totalHeightOfBanners;
         newInspectorViewFrame = NSMakeRect(parentWidth - inspectorWidth, 0, inspectorWidth, NSHeight(parentBounds) - insetExcludingBanners);
         break;
     }
@@ -543,6 +545,8 @@
         CGFloat insetExcludingBanners = 0;
         if ([inspectedView isKindOfClass:[WKView class]])
             insetExcludingBanners = ((WKView *)inspectedView)._topContentInset - ((WKView *)inspectedView)._totalHeightOfBanners;
+        if ([inspectedView isKindOfClass:[WKWebView class]])
+            insetExcludingBanners = ((WKWebView *)inspectedView)._topContentInset - ((WKWebView *)inspectedView)._totalHeightOfBanners;
         newInspectorViewFrame = NSMakeRect(0, 0, inspectorWidth, NSHeight(parentBounds) - insetExcludingBanners);
         break;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to