haikuwebkit/Tools/TestWebKitAPI/cocoa
Carlos Garcia Campos 6d32f07ec6 document.hasFocus() returns true for unfocused pages
https://bugs.webkit.org/show_bug.cgi?id=229139

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-08-19
Reviewed by Adrian Perez de Castro.

Source/WebCore:

We are always claiming to be focused when the document in the active window even if the page is not actually
focused.

* dom/Document.cpp:
(WebCore::Document::hasFocus const): Check also that page is focused.

Tools:

Add a unit tests to check document.hasFocus() returns false when a web view is in the active window, but not focused.

* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST): Ensure web view is focused as required by credentials container.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewDocumentFocus):
(beforeAll):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView focus]):

Canonical link: https://commits.webkit.org/240665@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 08:46:05 +00:00
..
WebProcessPlugIn
DragAndDropSimulator.h It should be possible to drag images with overlay content 2021-03-26 02:27:29 +00:00
HTTPServer.h REGRESSION (r275496): WebSocket Message too long when message is larger than 1mb 2021-06-21 18:15:04 +00:00
HTTPServer.mm REGRESSION (r275496): WebSocket Message too long when message is larger than 1mb 2021-06-21 18:15:04 +00:00
NSItemProviderAdditions.h
NSItemProviderAdditions.mm
PlatformUtilitiesCocoa.mm API test for AppHighlights 2021-02-27 08:04:31 +00:00
TestCocoa.h
TestCocoa.mm
TestContextMenuDriver.h [macCatalyst] Enable context menus for WKWebView 2020-12-09 01:15:31 +00:00
TestContextMenuDriver.mm [macCatalyst] Enable context menus for WKWebView 2020-12-09 01:15:31 +00:00
TestDownloadDelegate.h Remove WKDownloadDelegate.didWriteData 2020-12-14 19:27:33 +00:00
TestDownloadDelegate.mm Remove WKDownloadDelegate.didWriteData 2020-12-14 19:27:33 +00:00
TestLegacyDownloadDelegate.h Source/WebKit: 2020-12-10 19:27:49 +00:00
TestLegacyDownloadDelegate.mm Source/WebKit: 2020-12-10 19:27:49 +00:00
TestNavigationDelegate.h Migrate _WKUserContentExtension and older versions of WKContentRuleList to WKContentRuleList during lookup 2021-03-29 18:12:24 +00:00
TestNavigationDelegate.mm Migrate _WKUserContentExtension and older versions of WKContentRuleList to WKContentRuleList during lookup 2021-03-29 18:12:24 +00:00
TestPDFDocument.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
TestPDFDocument.mm Source/WebCore: 2021-01-21 17:40:58 +00:00
TestProtocol.h
TestProtocol.mm Reduce explicit usage of [objC autorelease] in WebKit even further 2021-02-18 05:06:15 +00:00
TestUIDelegate.h sessionStorage should not be cloned when a window is opened with rel=noopener 2020-11-30 23:43:42 +00:00
TestUIDelegate.mm sessionStorage should not be cloned when a window is opened with rel=noopener 2020-11-30 23:43:42 +00:00
TestWKWebView.h document.hasFocus() returns true for unfocused pages 2021-08-19 08:46:05 +00:00
TestWKWebView.mm document.hasFocus() returns true for unfocused pages 2021-08-19 08:46:05 +00:00
UserMediaCaptureUIDelegate.h Promote WKWebView getUserMedia SPI to API 2021-03-29 16:32:58 +00:00
UserMediaCaptureUIDelegate.mm Promote WKWebView getUserMedia SPI to API 2021-03-29 16:32:58 +00:00
UtilitiesCocoa.mm REGRESSION: [ BigSur ] 3 PictureInPicture related API tests timing out 2020-12-18 04:45:21 +00:00