RESOLVED FIXED 212060
Hide password echo when screen is being captured.
https://bugs.webkit.org/show_bug.cgi?id=212060
Summary Hide password echo when screen is being captured.
Megan Gardner
Reported 2020-05-18 20:45:25 PDT
Hide password echo when screen is being captured.
Attachments
Patch (12.74 KB, patch)
2020-05-18 20:58 PDT, Megan Gardner
no flags
Patch (18.33 KB, patch)
2020-05-19 18:20 PDT, Megan Gardner
no flags
Patch (18.89 KB, patch)
2020-05-19 20:04 PDT, Megan Gardner
no flags
Patch (19.28 KB, patch)
2020-05-20 11:56 PDT, Megan Gardner
no flags
Patch for landing (19.28 KB, patch)
2020-05-20 13:25 PDT, Megan Gardner
no flags
Patch for landing (19.30 KB, patch)
2020-05-20 14:57 PDT, Megan Gardner
no flags
Megan Gardner
Comment 1 2020-05-18 20:58:24 PDT
Megan Gardner
Comment 2 2020-05-18 20:58:42 PDT
Tim Horton
Comment 3 2020-05-18 21:15:50 PDT
Comment on attachment 399708 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399708&action=review > Source/WebCore/editing/InsertIntoTextNodeCommand.cpp:56 > + bool screenIsCaptured = document().editor().client()->isScreenCaptured(); IMO the editor client method should be named similarly to the setting (shouldEchoPassword or something) > Source/WebKit/UIProcess/ios/WKContentView.mm:172 > + _page->setIsScreenCaptured([[UIScreen mainScreen] isCaptured]); I’m not sure it makes sense to mirror the main screen’s state, we should send the message (with the right window’s state) when we’re parented instead. > Source/WebKit/UIProcess/ios/WKContentView.mm:778 > + _page->setIsScreenCaptured([[UIScreen mainScreen] isCaptured]); Should always be using the WebView or content view screen
Tim Horton
Comment 4 2020-05-18 21:25:30 PDT
Also, nothing is pushing the right state in the process swap or crash case. You should add a bit to WebPageCreationParameters that, if parented, provides the current window’s state.
Megan Gardner
Comment 5 2020-05-19 18:20:40 PDT
Megan Gardner
Comment 6 2020-05-19 20:04:54 PDT
Wenson Hsieh
Comment 7 2020-05-19 21:26:44 PDT
Comment on attachment 399801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399801&action=review > Source/WebCore/page/EditorClient.h:74 > + virtual bool surpressPasswordEcho() const { return false; }; Nit - `suppressPasswordEcho`. > Source/WebKitLegacy/ios/DefaultDelegates/WebDefaultUIKitDelegate.m:271 > +- (BOOL)surpressPasswordEcho Nit - `suppressPasswordEcho`.
Wenson Hsieh
Comment 8 2020-05-19 21:37:17 PDT
Comment on attachment 399801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399801&action=review > Source/WebKit/UIProcess/ios/WKContentView.mm:776 > +- (void)_screenCapturedDidChange:(NSNotification*)notification Nit - space before the *. > Source/WebKit/WebProcess/WebPage/WebPage.h:2002 > + WebCore::FloatSize m_screenCaptured; I think you meant to delete this.
Wenson Hsieh
Comment 9 2020-05-19 21:46:27 PDT
Comment on attachment 399801 [details] Patch Oh also — is UIScreenCapturedDidChangeNotification dispatched when we’re unparented or parented? (e.g. what happens if the screen is being captured in a WKWebView, but then the web view is removed from the view hierarchy and added later after screen capture has ended?)
Simon Fraser (smfr)
Comment 10 2020-05-19 22:07:23 PDT
Comment on attachment 399801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399801&action=review > Source/WebCore/editing/InsertIntoTextNodeCommand.cpp:56 > + bool suppressPasswordEcho = document().editor().client()->surpressPasswordEcho(); shouldSuppressPasswordEcho > Source/WebKit/UIProcess/WebPageProxy.h:722 > + void setIsScreenCaptured(bool); setScreenIsBeingCaptured. > Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:1583 > +void WebPageProxy::setIsScreenCaptured(bool screenMirroring) The dissonance between "captured" and "mirroring" is confusing. > Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:122 > +bool WebEditorClient::surpressPasswordEcho() const shouldSurpressPasswordEcho > Source/WebKit/WebProcess/WebPage/WebPage.h:670 > + bool isScreenCaptured() const { return m_isScreenCaptured; } > + void setIsScreenCaptured(bool); isScreenBeingCaptured? > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:4281 > +void WebPage::setIsScreenCaptured(bool captured) I would say "being captured" here. We're not capturing the screen, someone else is. "captured" is also vague here (easily confused with pointer capture). Can we say "being mirrored" instead? > Source/WebKitLegacy/ios/WebView/WebUIKitDelegate.h:131 > +- (BOOL)surpressPasswordEcho; Sounds like a verb. Should be isPasswordEchoSurpressed. > Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm:833 > +bool WebEditorClient::surpressPasswordEcho() const isPasswordEchoSurpressed > Source/WebKitLegacy/mac/WebView/WebViewData.h:248 > + BOOL surpressPasswordEcho; isPasswordEchoSurpressed?
Megan Gardner
Comment 11 2020-05-20 11:56:04 PDT
Megan Gardner
Comment 12 2020-05-20 13:25:45 PDT
Created attachment 399883 [details] Patch for landing
Simon Fraser (smfr)
Comment 13 2020-05-20 13:54:48 PDT
Comment on attachment 399883 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=399883&action=review > Source/WebKit/WebProcess/WebPage/WebPage.h:669 > + bool screenIsCaptured() const { return m_screenIsCaptured; } Missing a "being" here.
Megan Gardner
Comment 14 2020-05-20 14:57:41 PDT
Created attachment 399896 [details] Patch for landing
EWS
Comment 15 2020-05-20 15:34:04 PDT
Committed r261966: <https://trac.webkit.org/changeset/261966> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399896 [details].
Darin Adler
Comment 16 2020-05-25 14:57:54 PDT
Comment on attachment 399867 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399867&action=review > Source/WebCore/editing/InsertIntoTextNodeCommand.cpp:56 > + bool shouldSuppressPasswordEcho = document().editor().client()->shouldSuppressPasswordEcho(); I think this should be added to the passwordEchoEnabled expression, rather than put in a separate boolean. > Source/WebKitLegacy/mac/WebView/WebView.mm:1528 > + if ([[self _UIKitDelegateForwarder] respondsToSelector:@selector(shouldSuppressPasswordEcho)]) > + _private->shouldSuppressPasswordEcho = [[self _UIKitDelegateForwarder] shouldSuppressPasswordEcho]; I think this code should be removed. > Source/WebKitLegacy/mac/WebView/WebViewData.h:248 > + BOOL shouldSuppressPasswordEcho; I think this should be removed. It’s set but never read.
Megan Gardner
Comment 17 2020-05-28 16:39:15 PDT
Post commit comments address in https://trac.webkit.org/changeset/262272/webkit
Note You need to log in before you can comment on or make changes to this bug.