.
<rdar://problem/76568094>
Created attachment 428209 [details] Patch
Comment on attachment 428209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428209&action=review > Source/WebCore/page/Page.cpp:2577 > + if (auto* frameView = mainFrame().view()) { > + if (auto* renderView = frameView->renderView()) { Nit - `if (auto … = makeRefPtr(…))` > Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:493 > + return webView.underPageBackgroundColor.CGColor; We seem to have lost the null check for `webView->_page` here, since `-underPageBackgroundColor` dereferences `_page`. > Source/WebKit/UIProcess/WebPageProxy.cpp:8622 > +#if !PLATFORM(MAC) && !PLATFORM(IOS_FAMILY) Nit - !PLATFORM(COCOA)? > Source/WebKit/UIProcess/WebPageProxy.h:2661 > + bool m_pendingUnderPageBackgroundColorOverrideToDispatch { false }; Nit - m_hasPendingUnderPageBackgroundColorOverrideToDispatch? (The current name makes it sound like it should be a `Color` or `Optional<Color>`)
Comment on attachment 428209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428209&action=review >> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:493 >> + return webView.underPageBackgroundColor.CGColor; > > We seem to have lost the null check for `webView->_page` here, since `-underPageBackgroundColor` dereferences `_page`. Is it ever actually possible for a `WKWebView` to not have a `_page`?
Comment on attachment 428209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428209&action=review >>> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:493 >>> + return webView.underPageBackgroundColor.CGColor; >> >> We seem to have lost the null check for `webView->_page` here, since `-underPageBackgroundColor` dereferences `_page`. > > Is it ever actually possible for a `WKWebView` to not have a `_page`? `_page` is set very early on when initializing the web view, but it might be theoretically possible for a WebKit client to call into API that requires `_page` before this happens... Potentially something like trying to `-setBackgroundColor` before calling into the superclass initializer?
Created attachment 428234 [details] Patch
Created attachment 428306 [details] [Patch] logging for EWS
Created attachment 428326 [details] [Patch] logging for EWS
Created attachment 428339 [details] [Patch] logging for EWS
Created attachment 428352 [details] [Patch] logging for EWS
Created attachment 428391 [details] Patch
Tools/Scripts/svn-apply failed to apply attachment 428391 [details] to trunk. Please resolve the conflicts and upload a new patch.
Created attachment 428651 [details] Patch
Committed r277505 (237736@main): <https://commits.webkit.org/237736@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 428651 [details].