Changeset 242844 in webkit
- Timestamp:
- Mar 13, 2019, 12:05:36 AM (7 years ago)
- Location:
- branches/safari-607-branch/Source/WebKit
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/Cocoa/PlaybackSessionManagerProxy.mm (modified) (21 diffs)
-
UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp (modified) (8 diffs)
-
UIProcess/Cocoa/VideoFullscreenManagerProxy.mm (modified) (13 diffs)
-
UIProcess/ios/EditableImageController.mm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/Source/WebKit/ChangeLog
r242843 r242844 1 2019-03-12 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r242501. rdar://problem/48591282 4 5 Cherry-pick r242378. rdar://problem/48591281 6 7 Check contextIDs when handling WebContent messages 8 https://bugs.webkit.org/show_bug.cgi?id=195289 9 <rdar://problem/48475870> 10 11 Reviewed by Alex Christensen. 12 13 The WebContent process is untrusted because it handles arbitrary markup and javascript from untrusted sources. 14 We should handle its messages with suspicion, and make sure the arguments are valid and usable before honoring them. 15 16 This patch hardens the message passing layer by performing MESSAGE_CHECK in places that had been overlooked. 17 18 * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: 19 (WebKit::PlaybackSessionManagerProxy::setUpPlaybackControlsManagerWithID): 20 (WebKit::PlaybackSessionManagerProxy::currentTimeChanged): 21 (WebKit::PlaybackSessionManagerProxy::bufferedTimeChanged): 22 (WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged): 23 (WebKit::PlaybackSessionManagerProxy::canPlayFastReverseChanged): 24 (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged): 25 (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged): 26 (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionIndexChanged): 27 (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged): 28 (WebKit::PlaybackSessionManagerProxy::externalPlaybackPropertiesChanged): 29 (WebKit::PlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged): 30 (WebKit::PlaybackSessionManagerProxy::mutedChanged): 31 (WebKit::PlaybackSessionManagerProxy::volumeChanged): 32 (WebKit::PlaybackSessionManagerProxy::durationChanged): 33 (WebKit::PlaybackSessionManagerProxy::playbackStartedTimeChanged): 34 (WebKit::PlaybackSessionManagerProxy::rateChanged): 35 (WebKit::PlaybackSessionManagerProxy::pictureInPictureSupportedChanged): 36 (WebKit::PlaybackSessionManagerProxy::pictureInPictureActiveChanged): 37 (WebKit::PlaybackSessionManagerProxy::handleControlledElementIDResponse const): 38 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: 39 (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): 40 (WebKit::UserMediaCaptureManagerProxy::startProducingData): 41 (WebKit::UserMediaCaptureManagerProxy::stopProducingData): 42 (WebKit::UserMediaCaptureManagerProxy::end): 43 (WebKit::UserMediaCaptureManagerProxy::capabilities): 44 (WebKit::UserMediaCaptureManagerProxy::setMuted): 45 (WebKit::UserMediaCaptureManagerProxy::applyConstraints): 46 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: 47 (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID): 48 (WebKit::VideoFullscreenManagerProxy::setHasVideo): 49 (WebKit::VideoFullscreenManagerProxy::setVideoDimensions): 50 (WebKit::VideoFullscreenManagerProxy::enterFullscreen): 51 (WebKit::VideoFullscreenManagerProxy::exitFullscreen): 52 (WebKit::VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode): 53 (WebKit::VideoFullscreenManagerProxy::setInlineRect): 54 (WebKit::VideoFullscreenManagerProxy::setHasVideoContentLayer): 55 (WebKit::VideoFullscreenManagerProxy::cleanupFullscreen): 56 (WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline): 57 (WebKit::VideoFullscreenManagerProxy::preparedToExitFullscreen): 58 * UIProcess/ios/EditableImageController.mm: 59 (WebKit::EditableImageController::didCreateEditableImage): 60 (WebKit::EditableImageController::didDestroyEditableImage): 61 (WebKit::EditableImageController::associateWithAttachment): 62 63 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242378 268f45cc-cd09-0410-ab3c-d52691b4dbfc 64 65 git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-607.1.40.0-branch@242501 268f45cc-cd09-0410-ab3c-d52691b4dbfc 66 67 2019-03-05 Kocsen Chung <kocsen_chung@apple.com> 68 69 Cherry-pick r242378. rdar://problem/48591281 70 71 Check contextIDs when handling WebContent messages 72 https://bugs.webkit.org/show_bug.cgi?id=195289 73 <rdar://problem/48475870> 74 75 Reviewed by Alex Christensen. 76 77 The WebContent process is untrusted because it handles arbitrary markup and javascript from untrusted sources. 78 We should handle its messages with suspicion, and make sure the arguments are valid and usable before honoring them. 79 80 This patch hardens the message passing layer by performing MESSAGE_CHECK in places that had been overlooked. 81 82 * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: 83 (WebKit::PlaybackSessionManagerProxy::setUpPlaybackControlsManagerWithID): 84 (WebKit::PlaybackSessionManagerProxy::currentTimeChanged): 85 (WebKit::PlaybackSessionManagerProxy::bufferedTimeChanged): 86 (WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged): 87 (WebKit::PlaybackSessionManagerProxy::canPlayFastReverseChanged): 88 (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged): 89 (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged): 90 (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionIndexChanged): 91 (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged): 92 (WebKit::PlaybackSessionManagerProxy::externalPlaybackPropertiesChanged): 93 (WebKit::PlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged): 94 (WebKit::PlaybackSessionManagerProxy::mutedChanged): 95 (WebKit::PlaybackSessionManagerProxy::volumeChanged): 96 (WebKit::PlaybackSessionManagerProxy::durationChanged): 97 (WebKit::PlaybackSessionManagerProxy::playbackStartedTimeChanged): 98 (WebKit::PlaybackSessionManagerProxy::rateChanged): 99 (WebKit::PlaybackSessionManagerProxy::pictureInPictureSupportedChanged): 100 (WebKit::PlaybackSessionManagerProxy::pictureInPictureActiveChanged): 101 (WebKit::PlaybackSessionManagerProxy::handleControlledElementIDResponse const): 102 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: 103 (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): 104 (WebKit::UserMediaCaptureManagerProxy::startProducingData): 105 (WebKit::UserMediaCaptureManagerProxy::stopProducingData): 106 (WebKit::UserMediaCaptureManagerProxy::end): 107 (WebKit::UserMediaCaptureManagerProxy::capabilities): 108 (WebKit::UserMediaCaptureManagerProxy::setMuted): 109 (WebKit::UserMediaCaptureManagerProxy::applyConstraints): 110 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: 111 (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID): 112 (WebKit::VideoFullscreenManagerProxy::setHasVideo): 113 (WebKit::VideoFullscreenManagerProxy::setVideoDimensions): 114 (WebKit::VideoFullscreenManagerProxy::enterFullscreen): 115 (WebKit::VideoFullscreenManagerProxy::exitFullscreen): 116 (WebKit::VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode): 117 (WebKit::VideoFullscreenManagerProxy::setInlineRect): 118 (WebKit::VideoFullscreenManagerProxy::setHasVideoContentLayer): 119 (WebKit::VideoFullscreenManagerProxy::cleanupFullscreen): 120 (WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline): 121 (WebKit::VideoFullscreenManagerProxy::preparedToExitFullscreen): 122 * UIProcess/ios/EditableImageController.mm: 123 (WebKit::EditableImageController::didCreateEditableImage): 124 (WebKit::EditableImageController::didDestroyEditableImage): 125 (WebKit::EditableImageController::associateWithAttachment): 126 127 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242378 268f45cc-cd09-0410-ab3c-d52691b4dbfc 128 129 2019-03-04 Brent Fulgham <bfulgham@apple.com> 130 131 Check contextIDs when handling WebContent messages 132 https://bugs.webkit.org/show_bug.cgi?id=195289 133 <rdar://problem/48475870> 134 135 Reviewed by Alex Christensen. 136 137 The WebContent process is untrusted because it handles arbitrary markup and javascript from untrusted sources. 138 We should handle its messages with suspicion, and make sure the arguments are valid and usable before honoring them. 139 140 This patch hardens the message passing layer by performing MESSAGE_CHECK in places that had been overlooked. 141 142 * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: 143 (WebKit::PlaybackSessionManagerProxy::setUpPlaybackControlsManagerWithID): 144 (WebKit::PlaybackSessionManagerProxy::currentTimeChanged): 145 (WebKit::PlaybackSessionManagerProxy::bufferedTimeChanged): 146 (WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged): 147 (WebKit::PlaybackSessionManagerProxy::canPlayFastReverseChanged): 148 (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged): 149 (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged): 150 (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionIndexChanged): 151 (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged): 152 (WebKit::PlaybackSessionManagerProxy::externalPlaybackPropertiesChanged): 153 (WebKit::PlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged): 154 (WebKit::PlaybackSessionManagerProxy::mutedChanged): 155 (WebKit::PlaybackSessionManagerProxy::volumeChanged): 156 (WebKit::PlaybackSessionManagerProxy::durationChanged): 157 (WebKit::PlaybackSessionManagerProxy::playbackStartedTimeChanged): 158 (WebKit::PlaybackSessionManagerProxy::rateChanged): 159 (WebKit::PlaybackSessionManagerProxy::pictureInPictureSupportedChanged): 160 (WebKit::PlaybackSessionManagerProxy::pictureInPictureActiveChanged): 161 (WebKit::PlaybackSessionManagerProxy::handleControlledElementIDResponse const): 162 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: 163 (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): 164 (WebKit::UserMediaCaptureManagerProxy::startProducingData): 165 (WebKit::UserMediaCaptureManagerProxy::stopProducingData): 166 (WebKit::UserMediaCaptureManagerProxy::end): 167 (WebKit::UserMediaCaptureManagerProxy::capabilities): 168 (WebKit::UserMediaCaptureManagerProxy::setMuted): 169 (WebKit::UserMediaCaptureManagerProxy::applyConstraints): 170 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: 171 (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID): 172 (WebKit::VideoFullscreenManagerProxy::setHasVideo): 173 (WebKit::VideoFullscreenManagerProxy::setVideoDimensions): 174 (WebKit::VideoFullscreenManagerProxy::enterFullscreen): 175 (WebKit::VideoFullscreenManagerProxy::exitFullscreen): 176 (WebKit::VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode): 177 (WebKit::VideoFullscreenManagerProxy::setInlineRect): 178 (WebKit::VideoFullscreenManagerProxy::setHasVideoContentLayer): 179 (WebKit::VideoFullscreenManagerProxy::cleanupFullscreen): 180 (WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline): 181 (WebKit::VideoFullscreenManagerProxy::preparedToExitFullscreen): 182 * UIProcess/ios/EditableImageController.mm: 183 (WebKit::EditableImageController::didCreateEditableImage): 184 (WebKit::EditableImageController::didDestroyEditableImage): 185 (WebKit::EditableImageController::associateWithAttachment): 186 1 187 2019-03-12 Kocsen Chung <kocsen_chung@apple.com> 2 188 -
branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm
r239535 r242844 34 34 #import "WebProcessProxy.h" 35 35 36 #define MESSAGE_CHECK_CONTEXTID(contextID) MESSAGE_CHECK_BASE(m_contextMap.isValidKey(contextId), m_page->process().connection()) 37 36 38 namespace WebKit { 37 39 using namespace WebCore; … … 372 374 void PlaybackSessionManagerProxy::setUpPlaybackControlsManagerWithID(uint64_t contextId) 373 375 { 376 MESSAGE_CHECK_CONTEXTID(contextID); 374 377 if (m_controlsManagerContextId == contextId) 375 378 return; … … 397 400 void PlaybackSessionManagerProxy::currentTimeChanged(uint64_t contextId, double currentTime, double hostTime) 398 401 { 402 MESSAGE_CHECK_CONTEXTID(contextID); 399 403 ensureModel(contextId).currentTimeChanged(currentTime); 400 404 } … … 402 406 void PlaybackSessionManagerProxy::bufferedTimeChanged(uint64_t contextId, double bufferedTime) 403 407 { 408 MESSAGE_CHECK_CONTEXTID(contextID); 404 409 ensureModel(contextId).bufferedTimeChanged(bufferedTime); 405 410 } … … 407 412 void PlaybackSessionManagerProxy::seekableRangesVectorChanged(uint64_t contextId, Vector<std::pair<double, double>> ranges, double lastModifiedTime, double liveUpdateInterval) 408 413 { 414 MESSAGE_CHECK_CONTEXTID(contextID); 409 415 Ref<TimeRanges> timeRanges = TimeRanges::create(); 410 416 for (const auto& range : ranges) { … … 420 426 void PlaybackSessionManagerProxy::canPlayFastReverseChanged(uint64_t contextId, bool value) 421 427 { 428 MESSAGE_CHECK_CONTEXTID(contextID); 422 429 ensureModel(contextId).canPlayFastReverseChanged(value); 423 430 } … … 425 432 void PlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged(uint64_t contextId, Vector<MediaSelectionOption> options, uint64_t selectedIndex) 426 433 { 434 MESSAGE_CHECK_CONTEXTID(contextID); 427 435 ensureModel(contextId).audioMediaSelectionOptionsChanged(options, selectedIndex); 428 436 } … … 430 438 void PlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged(uint64_t contextId, Vector<MediaSelectionOption> options, uint64_t selectedIndex) 431 439 { 440 MESSAGE_CHECK_CONTEXTID(contextID); 432 441 ensureModel(contextId).legibleMediaSelectionOptionsChanged(options, selectedIndex); 433 442 } … … 435 444 void PlaybackSessionManagerProxy::audioMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex) 436 445 { 446 MESSAGE_CHECK_CONTEXTID(contextID); 437 447 ensureModel(contextId).audioMediaSelectionIndexChanged(selectedIndex); 438 448 } … … 440 450 void PlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex) 441 451 { 452 MESSAGE_CHECK_CONTEXTID(contextID); 442 453 ensureModel(contextId).legibleMediaSelectionIndexChanged(selectedIndex); 443 454 } … … 445 456 void PlaybackSessionManagerProxy::externalPlaybackPropertiesChanged(uint64_t contextId, bool enabled, uint32_t targetType, String localizedDeviceName) 446 457 { 458 MESSAGE_CHECK_CONTEXTID(contextID); 447 459 PlaybackSessionModel::ExternalPlaybackTargetType type = static_cast<PlaybackSessionModel::ExternalPlaybackTargetType>(targetType); 448 460 ASSERT(type == PlaybackSessionModel::TargetTypeAirPlay || type == PlaybackSessionModel::TargetTypeTVOut || type == PlaybackSessionModel::TargetTypeNone); … … 453 465 void PlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged(uint64_t contextId, bool disabled) 454 466 { 467 MESSAGE_CHECK_CONTEXTID(contextID); 455 468 ensureModel(contextId).wirelessVideoPlaybackDisabledChanged(disabled); 456 469 } … … 458 471 void PlaybackSessionManagerProxy::mutedChanged(uint64_t contextId, bool muted) 459 472 { 473 MESSAGE_CHECK_CONTEXTID(contextID); 460 474 ensureModel(contextId).mutedChanged(muted); 461 475 } … … 463 477 void PlaybackSessionManagerProxy::volumeChanged(uint64_t contextId, double volume) 464 478 { 479 MESSAGE_CHECK_CONTEXTID(contextID); 465 480 ensureModel(contextId).volumeChanged(volume); 466 481 } … … 468 483 void PlaybackSessionManagerProxy::durationChanged(uint64_t contextId, double duration) 469 484 { 485 MESSAGE_CHECK_CONTEXTID(contextID); 470 486 ensureModel(contextId).durationChanged(duration); 471 487 } … … 473 489 void PlaybackSessionManagerProxy::playbackStartedTimeChanged(uint64_t contextId, double playbackStartedTime) 474 490 { 491 MESSAGE_CHECK_CONTEXTID(contextID); 475 492 ensureModel(contextId).playbackStartedTimeChanged(playbackStartedTime); 476 493 } … … 478 495 void PlaybackSessionManagerProxy::rateChanged(uint64_t contextId, bool isPlaying, double rate) 479 496 { 497 MESSAGE_CHECK_CONTEXTID(contextID); 480 498 ensureModel(contextId).rateChanged(isPlaying, rate); 481 499 } … … 483 501 void PlaybackSessionManagerProxy::pictureInPictureSupportedChanged(uint64_t contextId, bool supported) 484 502 { 503 MESSAGE_CHECK_CONTEXTID(contextID); 485 504 ensureModel(contextId).pictureInPictureSupportedChanged(supported); 486 505 } … … 488 507 void PlaybackSessionManagerProxy::pictureInPictureActiveChanged(uint64_t contextId, bool active) 489 508 { 509 MESSAGE_CHECK_CONTEXTID(contextID); 490 510 ensureModel(contextId).pictureInPictureActiveChanged(active); 491 511 } … … 493 513 void PlaybackSessionManagerProxy::handleControlledElementIDResponse(uint64_t contextId, String identifier) const 494 514 { 515 MESSAGE_CHECK_CONTEXTID(contextID); 495 516 #if PLATFORM(MAC) 496 517 if (contextId == m_controlsManagerContextId) … … 608 629 } // namespace WebKit 609 630 631 #undef MESSAGE_CHECK_CONTEXTID 632 610 633 #endif // PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) -
branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp
r239163 r242844 40 40 #include <wtf/UniqueRef.h> 41 41 42 #define MESSAGE_CHECK_CONTEXTID(id) MESSAGE_CHECK_BASE(m_proxies.isValidKey(id), m_process.connection()) 43 42 44 namespace WebKit { 43 45 using namespace WebCore; … … 140 142 void UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints(uint64_t id, const CaptureDevice& device, String&& hashSalt, const MediaConstraints& constraints, bool& succeeded, String& invalidConstraints, WebCore::RealtimeMediaSourceSettings& settings) 141 143 { 144 MESSAGE_CHECK_CONTEXTID(id); 145 142 146 CaptureSourceOrError sourceOrError; 143 147 switch (device.type()) { … … 171 175 void UserMediaCaptureManagerProxy::startProducingData(uint64_t id) 172 176 { 177 MESSAGE_CHECK_CONTEXTID(id); 173 178 auto iter = m_proxies.find(id); 174 179 if (iter != m_proxies.end()) … … 178 183 void UserMediaCaptureManagerProxy::stopProducingData(uint64_t id) 179 184 { 185 MESSAGE_CHECK_CONTEXTID(id); 180 186 auto iter = m_proxies.find(id); 181 187 if (iter != m_proxies.end()) … … 185 191 void UserMediaCaptureManagerProxy::capabilities(uint64_t id, WebCore::RealtimeMediaSourceCapabilities& capabilities) 186 192 { 193 MESSAGE_CHECK_CONTEXTID(id); 187 194 auto iter = m_proxies.find(id); 188 195 if (iter != m_proxies.end()) … … 192 199 void UserMediaCaptureManagerProxy::setMuted(uint64_t id, bool muted) 193 200 { 201 MESSAGE_CHECK_CONTEXTID(id); 194 202 auto iter = m_proxies.find(id); 195 203 if (iter != m_proxies.end()) … … 199 207 void UserMediaCaptureManagerProxy::applyConstraints(uint64_t id, const WebCore::MediaConstraints& constraints) 200 208 { 209 MESSAGE_CHECK_CONTEXTID(id); 201 210 auto iter = m_proxies.find(id); 202 211 if (iter == m_proxies.end()) … … 213 222 } 214 223 224 #undef MESSAGE_CHECK_CONTEXTID 225 215 226 #endif -
branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm
r239535 r242844 122 122 #endif 123 123 124 #define MESSAGE_CHECK_CONTEXTID(contextID) MESSAGE_CHECK_BASE(m_contextMap.isValidKey(contextId), m_page->process().connection()) 125 124 126 namespace WebKit { 125 127 using namespace WebCore; … … 469 471 void VideoFullscreenManagerProxy::setupFullscreenWithID(uint64_t contextId, uint32_t videoLayerID, const WebCore::IntRect& initialRect, float hostingDeviceScaleFactor, HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode, bool allowsPictureInPicture, bool standby) 470 472 { 473 MESSAGE_CHECK_CONTEXTID(contextId); 474 471 475 ASSERT(videoLayerID); 472 476 RefPtr<VideoFullscreenModelContext> model; … … 505 509 void VideoFullscreenManagerProxy::setHasVideo(uint64_t contextId, bool hasVideo) 506 510 { 511 MESSAGE_CHECK_CONTEXTID(contextId); 507 512 ensureInterface(contextId).hasVideoChanged(hasVideo); 508 513 } … … 510 515 void VideoFullscreenManagerProxy::setVideoDimensions(uint64_t contextId, const FloatSize& videoDimensions) 511 516 { 517 MESSAGE_CHECK_CONTEXTID(contextId); 512 518 ensureInterface(contextId).videoDimensionsChanged(videoDimensions); 513 519 } … … 515 521 void VideoFullscreenManagerProxy::enterFullscreen(uint64_t contextId) 516 522 { 523 MESSAGE_CHECK_CONTEXTID(contextId); 524 517 525 auto& interface = ensureInterface(contextId); 518 526 interface.enterFullscreen(); … … 532 540 void VideoFullscreenManagerProxy::exitFullscreen(uint64_t contextId, WebCore::IntRect finalRect) 533 541 { 542 MESSAGE_CHECK_CONTEXTID(contextId); 543 534 544 #if PLATFORM(IOS_FAMILY) 535 545 ensureInterface(contextId).exitFullscreen(finalRect); … … 544 554 void VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode targetMode) 545 555 { 556 MESSAGE_CHECK_CONTEXTID(contextId); 546 557 ensureInterface(contextId).exitFullscreenWithoutAnimationToMode(targetMode); 547 558 } … … 552 563 void VideoFullscreenManagerProxy::setInlineRect(uint64_t contextId, const WebCore::IntRect& inlineRect, bool visible) 553 564 { 565 MESSAGE_CHECK_CONTEXTID(contextId); 554 566 ensureInterface(contextId).setInlineRect(inlineRect, visible); 555 567 } … … 557 569 void VideoFullscreenManagerProxy::setHasVideoContentLayer(uint64_t contextId, bool value) 558 570 { 571 MESSAGE_CHECK_CONTEXTID(contextId); 559 572 ensureInterface(contextId).setHasVideoContentLayer(value); 560 573 } … … 576 589 void VideoFullscreenManagerProxy::cleanupFullscreen(uint64_t contextId) 577 590 { 591 MESSAGE_CHECK_CONTEXTID(contextId); 578 592 ensureInterface(contextId).cleanupFullscreen(); 579 593 } … … 581 595 void VideoFullscreenManagerProxy::preparedToReturnToInline(uint64_t contextId, bool visible, WebCore::IntRect inlineRect) 582 596 { 597 MESSAGE_CHECK_CONTEXTID(contextId); 583 598 m_page->fullscreenMayReturnToInline(); 584 599 … … 594 609 void VideoFullscreenManagerProxy::preparedToExitFullscreen(uint64_t contextId) 595 610 { 611 MESSAGE_CHECK_CONTEXTID(contextId); 596 612 ensureInterface(contextId).preparedToExitFullscreen(); 597 613 } … … 694 710 } // namespace WebKit 695 711 712 #undef MESSAGE_CHECK_CONTEXTID 713 696 714 #endif // PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) -
branches/safari-607-branch/Source/WebKit/UIProcess/ios/EditableImageController.mm
r239628 r242844 39 39 #import <wtf/RetainPtr.h> 40 40 41 #define MESSAGE_CHECK_VIEWID(embeddedViewID) MESSAGE_CHECK_BASE(m_editableImages.isValidKey(embeddedViewID), connection()) 42 41 43 namespace WebKit { 42 44 … … 74 76 void EditableImageController::didCreateEditableImage(WebCore::GraphicsLayer::EmbeddedViewID embeddedViewID) 75 77 { 78 MESSAGE_CHECK_VIEWID(embeddedViewID); 76 79 ensureEditableImage(embeddedViewID); 77 80 } … … 79 82 void EditableImageController::didDestroyEditableImage(WebCore::GraphicsLayer::EmbeddedViewID embeddedViewID) 80 83 { 84 MESSAGE_CHECK_VIEWID(embeddedViewID); 81 85 m_editableImages.remove(embeddedViewID); 82 86 } … … 84 88 void EditableImageController::associateWithAttachment(WebCore::GraphicsLayer::EmbeddedViewID embeddedViewID, const String& attachmentID) 85 89 { 90 MESSAGE_CHECK_VIEWID(embeddedViewID); 86 91 if (!m_webPageProxy) 87 92 return; … … 151 156 } // namespace WebKit 152 157 158 #undef MESSAGE_CHECK_VIEWID 159 153 160 #endif // HAVE(PENCILKIT)
Note:
See TracChangeset
for help on using the changeset viewer.