Currently, WKUIDelegate methods are called when a WKWebView begins/ends a capture session. Now, clients must know which specific devices are being used (microphone, camera, or both).
<rdar://problem/30838285>
Created attachment 303598 [details] Proposed patch.
Attachment 303598 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:42: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 303598 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=303598&action=review > Source/WebKit2/ChangeLog:3 > + WKWebView should provide a way for client's to know the specific media state. No apostrophe. > Source/WebKit2/ChangeLog:4 > + https://bugs.webkit.org/show_bug.cgi?id=169140 Please include the Radar number. > Source/WebKit2/UIProcess/WebPageProxy.cpp:6455 > + if ((oldState & activeCaptureMask) != (m_mediaState & activeCaptureMask)) Isn't this just `if (oldMediaStateHasActiveCapture != newMediaStateHasActiveCapture)`?
(In reply to comment #4) > Comment on attachment 303598 [details] > Proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=303598&action=review > > > Source/WebKit2/ChangeLog:3 > > + WKWebView should provide a way for client's to know the specific media state. > > No apostrophe. Oops. > > > Source/WebKit2/ChangeLog:4 > > + https://bugs.webkit.org/show_bug.cgi?id=169140 > > Please include the Radar number. Done. > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:6455 > > + if ((oldState & activeCaptureMask) != (m_mediaState & activeCaptureMask)) > > Isn't this just `if (oldMediaStateHasActiveCapture != > newMediaStateHasActiveCapture)`? No, because the MediaState may change for reasons other than a capture session beginning or ending (such as when audio/video starts playing).
Created attachment 303717 [details] proposed patch v2.
(In reply to comment #6) > Created attachment 303717 [details] > proposed patch v2. Ignore this. Wrong patch.
Created attachment 303720 [details] Proposed patch v3.
Attachment 303720 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:42: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Bug for tests: https://bugs.webkit.org/show_bug.cgi?id=169304
(In reply to comment #5) > (In reply to comment #4) > > Comment on attachment 303598 [details] > > Proposed patch. > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=303598&action=review > > > > > Source/WebKit2/ChangeLog:3 > > > + WKWebView should provide a way for client's to know the specific media state. > > > > No apostrophe. > > Oops. > > > > > > Source/WebKit2/ChangeLog:4 > > > + https://bugs.webkit.org/show_bug.cgi?id=169140 > > > > Please include the Radar number. > > Done. > > > > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:6455 > > > + if ((oldState & activeCaptureMask) != (m_mediaState & activeCaptureMask)) > > > > Isn't this just `if (oldMediaStateHasActiveCapture != > > newMediaStateHasActiveCapture)`? > > No, because the MediaState may change for reasons other than a capture > session beginning or ending (such as when audio/video starts playing). I'm sorry, I misread this comment. You're right, that is the same. Will make this change, along with some others Alex and I discussed offline.
Created attachment 303735 [details] Proposed patch v4.
Attachment 303735 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:42: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 303735 [details] Proposed patch v4. r=me. WK2 review needed.
Comment on attachment 303735 [details] Proposed patch v4. Clearing flags on attachment: 303735 Committed r213683: <http://trac.webkit.org/changeset/213683>
All reviewed patches have been landed. Closing bug.