-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[macOS] Expose a KVO property for the top scroll pocket on WKWebView #47256
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
Merged
+96
−20
Conversation
This file contains hidden or 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
EWS run on previous version of this PR (hash 6298e28) |
aprotyas
approved these changes
Jun 26, 2025
EWS run on current version of this PR (hash fdd1026) |
https://bugs.webkit.org/show_bug.cgi?id=295051 rdar://154419636 Reviewed by Abrar Rahman Protyasha. Add support for a new property, `-[WKWebView _topScrollPocket]`; additionally, add KVO support, so clients can observe when the top scroll pocket is torn down or recreated. * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h: * Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm: (-[WKWebView _topScrollPocket]): * Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h: * Source/WebKit/UIProcess/API/mac/WKWebViewTestingMac.mm: (-[WKWebView _scrollPocketForTesting]): Deleted. * Source/WebKit/UIProcess/mac/WebViewImpl.mm: (WebKit::WebViewImpl::updateScrollPocket): Call `-{will|did}ChangeValueForKey:` when setting `m_topScrollPocket`. * Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h: * Tools/TestWebKitAPI/Tests/WebKitCocoa/ObscuredContentInsets.mm: (-[TopScrollPocketObserver initWithWebView:]): (-[TopScrollPocketObserver dealloc]): (-[TopScrollPocketObserver observeValueForKeyPath:ofObject:change:context:]): (-[TopScrollPocketObserver changeCount]): (TestWebKitAPI::TEST(ObscuredContentInsets, ResizeScrollPocket)): (TestWebKitAPI::TEST(ObscuredContentInsets, ScrollPocketCaptureColor)): Replace the now-unnecessary `-_scrollPocketForTesting` testing helper with `-_topScrollPocket`. (TestWebKitAPI::TEST(ObscuredContentInsets, TopScrollPocketKVO)): Add a test for KVO on the new property. Canonical link: https://commits.webkit.org/296686@main
fdd1026
to
9ae715d
Compare
Committed 296686@main (9ae715d): https://commits.webkit.org/296686@main Reviewed commits have been landed. Closing PR #47256 and removing active labels. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
New Bugs
Unclassified bugs are placed in this component until the correct component can be determined.
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.
9ae715d
fdd1026
🛠 win🧪 wpe-wk2🧪 win-tests🧪 mac-AS-debug-wk2🧪 gtk-wk2🛠 playstation🛠 mac-safer-cpp