-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UI-side compositing] [GPU Process] Emailing a webpage from Safari causes the tab to stop rendering #12130
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
whsieh
added
the
Platform
Portability improvements and other general platform improvements not driven directly by site bugs.
label
Mar 29, 2023
EWS run on current version of this PR (hash 404f156)
|
smfr
approved these changes
Mar 29, 2023
Thanks for the review! |
…uses the tab to stop rendering https://bugs.webkit.org/show_bug.cgi?id=254683 rdar://107329972 Reviewed by Simon Fraser. When sharing a webpage via Mail, Safari first generates a web archive from the existing web view's content, and then creates an offscreen web view *backed by the tab's existing web process*, which we then use to load the web archive and perform reader extraction heuristics. However, when the DOM GPU process experimental feature flag is enabled for Safari tabs, it only affects the web view used for rendering the main page content; importantly, this related web view does not have DOM GPUP enabled. When subsequently loading the web archive data via this reader web view, we end up *disabling* GPUP for DOM rendering in the original tab's web process, due to the following code: ``` bool usingGPUProcessForDOMRendering = m_shouldRenderDOMInGPUProcess && DrawingArea::supportsGPUProcessRendering(m_drawingAreaType); WebProcess::singleton().setUseGPUProcessForDOMRendering(usingGPUProcessForDOMRendering); ``` The current implementation of GPUP for DOM rendering doesn't handle on-the-fly GPUP disablement — and in fact, in the case where IOKit has already been blocked in the web process, it's impossible to disable GPUP at all once a page has been created with all the relevant GPUP flags enabled. As such, we mitigate this by simply forcing DOM GPUP to be enabled (regardless of preferences state) for a web view, if its related web view already has DOM GPUP enabled. Once DOM GPUP is enabled by default, this won't be an issue anyway, since all web views will be created with consistent feature flag statuses. Test: GPUProcess.GPUProcessForDOMRenderingCarriesOverFromRelatedPage * Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::useGPUProcessForDOMRenderingEnabled const): * Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (-[NSUserDefaults swizzled_objectForKey:]): (TestWebKitAPI::EnableUISideCompositingScope::EnableUISideCompositingScope): (TestWebKitAPI::EnableUISideCompositingScope::~EnableUISideCompositingScope): Add a new RAII helper class to temporarily swizzle out `-objectForKey:`, in order to forcibly enable UI-side compositing for this test, as it's necessary to exercise the bug fix. Note that I'm using swizzling here to avoid also enabling UI-side compositing for downstream API tests, even if the test crashes or times out. (TestWebKitAPI::TEST): (convertToCGImage): Deleted. (getPixelIndex): Deleted. (TEST): Deleted. (runMemoryPressureExitTest): Deleted. (waitUntilCaptureState): Deleted. Canonical link: https://commits.webkit.org/262296@main
webkit-commit-queue
force-pushed
the
eng/254683
branch
from
March 29, 2023 23:03
404f156
to
e74572e
Compare
Committed 262296@main (e74572e): https://commits.webkit.org/262296@main Reviewed commits have been landed. Closing PR #12130 and removing active labels. |
webkit-commit-queue
removed
the
merge-queue
Applied to send a pull request to merge-queue
label
Mar 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Platform
Portability improvements and other general platform improvements not driven directly by site bugs.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
e74572e
404f156
🧪 ios-wk2🧪 gtk-wk2🧪 api-gtk🧪 mac-AS-debug-wk2