WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
141037
Convert WebInspectorProxy to use WKWebView API for the inspector view
https://bugs.webkit.org/show_bug.cgi?id=141037
Summary
Convert WebInspectorProxy to use WKWebView API for the inspector view
Brian Burg
Reported
2015-01-29 09:16:10 PST
.
Attachments
WIP
(18.04 KB, patch)
2015-01-29 15:06 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
WIP
(18.04 KB, patch)
2015-01-29 15:10 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch
(19.05 KB, patch)
2015-01-31 21:09 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch for EWS
(19.10 KB, patch)
2015-02-01 11:17 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Patch
(31.45 KB, patch)
2015-02-03 13:40 PST
,
Brian Burg
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Brian Burg
Comment 1
2015-01-29 15:06:09 PST
Created
attachment 245656
[details]
WIP
Brian Burg
Comment 2
2015-01-29 15:10:17 PST
Created
attachment 245657
[details]
WIP
Brian Burg
Comment 3
2015-01-29 16:22:51 PST
The attached patch mostly works, except for dock to bottom. In that case, the initial draw seems to be correct, but subsequent draws paint the inspector over the entire inspected page superview, with web content on top. Our initial assessment is that Safari or some other component is resizing the view behind our backs. Not sure I can diagnose further from OpenSource only, so benching this patch for now. There is also some clean up to do with the PageGroup stuff. Unless I'm missing some important detail, the whole "level" system can be significantly simplified now that multi-process guarantees concurrent execution between different inspector levels (no stalling during debugger pauses).
Sam Weinig
Comment 4
2015-01-29 17:25:51 PST
(In reply to
comment #3
)
> The attached patch mostly works, except for dock to bottom. In that case, > the initial draw seems to be correct, but subsequent draws paint the > inspector over the entire inspected page superview, with web content on top. > > Our initial assessment is that Safari or some other component is resizing > the view behind our backs. Not sure I can diagnose further from OpenSource > only, so benching this patch for now.
Do you see the same behavior in MiniBrowser? If so, I would recommend debugging from there.
> > There is also some clean up to do with the PageGroup stuff. Unless I'm > missing some important detail, the whole "level" system can be significantly > simplified now that multi-process guarantees concurrent execution between > different inspector levels (no stalling during debugger pauses).
I am generally confused by the layering of this code. It seems like the inspector code in WebKit2 lives both at the WebPageProxy/C++ layer, yet knows about things like WKWebView. Is there something cleaner we can do here?
Brian Burg
Comment 5
2015-01-29 22:02:16 PST
> > There is also some clean up to do with the PageGroup stuff. Unless I'm > > missing some important detail, the whole "level" system can be significantly > > simplified now that multi-process guarantees concurrent execution between > > different inspector levels (no stalling during debugger pauses). > > I am generally confused by the layering of this code. It seems like the > inspector code in WebKit2 lives both at the WebPageProxy/C++ layer, yet > knows about things like WKWebView. Is there something cleaner we can do > here?
Most of inspector WK2 code is cross-platform and in the C++ layer, except port-specific WebInspectorProxy functions. The platform-specific parts are to manage frame sizes and windows while attached and detached. This isn't cross-platform because every port does windowing differently. I think it is pretty well segregated as-is; this patch does not affect ports other than Mac. Other code in WebInspectorProxy and WebKit2 doesn't care whether WKView or WKWebView API is used to set up the underlying WebPageProxy.
Timothy Hatcher
Comment 6
2015-01-30 17:23:38 PST
Disabling automaticallyAdjustsContentInsets fixes this. Add this after creating the WKWebView in m_inspectorView: #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 [m_inspectorView _setAutomaticallyAdjustsContentInsets:NO]; #endif
Brian Burg
Comment 7
2015-01-31 21:09:39 PST
Created
attachment 245817
[details]
Patch
Timothy Hatcher
Comment 8
2015-02-01 07:07:20 PST
Comment on
attachment 245817
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245817&action=review
> Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:498 > [m_inspectorView setDrawsBackground:NO];
This needs to be _setDrawsTransparentBackground:YES to fix the 10.9 build.
Brian Burg
Comment 9
2015-02-01 11:17:07 PST
Created
attachment 245836
[details]
Patch for EWS
Timothy Hatcher
Comment 10
2015-02-02 13:43:45 PST
Comment on
attachment 245836
[details]
Patch for EWS View in context:
https://bugs.webkit.org/attachment.cgi?id=245836&action=review
> Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:497 > -#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090 > - [m_inspectorView setDrawsBackground:NO]; > + [m_inspectorView _setDrawsTransparentBackground:YES];
On Yosemite we don't need to be transparent. We draw everything. So the __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090 check needs to stay.
Timothy Hatcher
Comment 11
2015-02-02 13:45:49 PST
Comment on
attachment 245836
[details]
Patch for EWS Just add that #ifdef around _setDrawsTransparentBackground:YES back and this looks good to me.
Brian Burg
Comment 12
2015-02-02 21:28:44 PST
Committed
r179540
: <
http://trac.webkit.org/changeset/179540
>
Darin Adler
Comment 13
2015-02-02 21:47:01 PST
After this landed, 32-bit build started failing:
https://build.webkit.org/builders/Apple%20Yosemite%20Release%20%2832-bit%20Build%29/builds/270/steps/compile-webkit/logs/stdio
WebKit Commit Bot
Comment 14
2015-02-02 22:10:45 PST
Re-opened since this is blocked by
bug 141190
Brian Burg
Comment 15
2015-02-03 13:40:12 PST
Created
attachment 245961
[details]
Patch
WebKit Commit Bot
Comment 16
2015-02-03 15:21:52 PST
Comment on
attachment 245961
[details]
Patch Clearing flags on attachment: 245961 Committed
r179573
: <
http://trac.webkit.org/changeset/179573
>
WebKit Commit Bot
Comment 17
2015-02-03 15:21:56 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug