Diff
Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp (240354 => 240355)
--- trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp 2019-01-23 21:03:32 UTC (rev 240355)
@@ -97,7 +97,7 @@
#if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
static void userCaptionPreferencesChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void *, CFDictionaryRef)
{
-#if !USE(WEB_THREAD)
+#if !PLATFORM(IOS_FAMILY)
static_cast<CaptionUserPreferencesMediaAF*>(observer)->captionPreferencesChanged();
#else
WebThreadRun(^{
Modified: trunk/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp (240354 => 240355)
--- trunk/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp 2019-01-23 21:03:32 UTC (rev 240355)
@@ -46,13 +46,9 @@
#if PLATFORM(IOS_FAMILY)
static void applicationDidBecomeActive(CFNotificationCenterRef, void*, CFStringRef, const void*, CFDictionaryRef)
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
restartSharedTimer();
});
-#else
- restartSharedTimer();
-#endif
}
#endif
Modified: trunk/Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm (240354 => 240355)
--- trunk/Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -144,7 +144,7 @@
static inline void dispatchToMainThread(void (^block)())
{
dispatch_async(dispatch_get_main_queue(), ^{
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
WebThreadRun(block);
#else
block();
Modified: trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm (240354 => 240355)
--- trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -85,7 +85,7 @@
{
UNUSED_PARAM(change);
UNUSED_PARAM(context);
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
WebThreadRun(^{
if (_parent && [keyPath isEqual:@"bounds"] && object == _parent->platformLayer())
_parent->client().textTrackRepresentationBoundsChanged(_parent->bounds());
Modified: trunk/Source/WebCore/platform/ios/LegacyTileCache.mm (240354 => 240355)
--- trunk/Source/WebCore/platform/ios/LegacyTileCache.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/platform/ios/LegacyTileCache.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -277,16 +277,12 @@
m_hasPendingLayoutTiles = true;
LegacyTileCacheTombstone *tombstone = m_tombstone.get();
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
if ([tombstone isDead])
return;
m_hasPendingLayoutTiles = false;
doLayoutTiles();
-#if USE(WEB_THREAD)
});
-#endif
}
void LegacyTileCache::layoutTilesNow()
@@ -720,16 +716,12 @@
m_hasPendingUpdateTilingMode = true;
LegacyTileCacheTombstone *tombstone = m_tombstone.get();
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
if ([tombstone isDead])
return;
m_hasPendingUpdateTilingMode = false;
updateTilingMode();
-#if USE(WEB_THREAD)
});
-#endif
}
void LegacyTileCache::setTilingDirection(TilingDirection tilingDirection)
Modified: trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm (240354 => 240355)
--- trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -220,23 +220,17 @@
- (void)sendAccelerometerData:(CMAccelerometerData *)newAcceleration
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
CMAcceleration accel = newAcceleration.acceleration;
for (auto& client : copyToVector(m_deviceMotionClients))
client->motionChanged(0, 0, 0, accel.x * kGravity, accel.y * kGravity, accel.z * kGravity, 0, 0, 0);
-#if USE(WEB_THREAD)
});
-#endif
}
- (void)sendMotionData:(CMDeviceMotion *)newMotion withHeading:(CLHeading *)newHeading
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
// Acceleration is user + gravity
CMAcceleration userAccel = newMotion.userAcceleration;
CMAcceleration gravity = newMotion.gravity;
@@ -327,9 +321,7 @@
for (size_t i = 0; i < orientationClients.size(); ++i)
orientationClients[i]->orientationChanged(alpha, beta, gamma, heading, headingAccuracy);
-#if USE(WEB_THREAD)
});
-#endif
}
@end
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (240354 => 240355)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -221,17 +221,13 @@
void VideoFullscreenControllerContext::requestUpdateInlineRect()
{
#if PLATFORM(IOS_FAMILY)
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {
-#endif
IntRect clientRect = elementRectInWindow(m_videoElement.get());
dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this, clientRect] {
m_interface->setInlineRect(clientRect, clientRect != IntRect(0, 0, 0, 0));
});
-#if USE(WEB_THREAD)
});
-#endif
#else
ASSERT_NOT_REACHED();
#endif
@@ -240,10 +236,8 @@
void VideoFullscreenControllerContext::requestVideoContentLayer()
{
#if PLATFORM(IOS_FAMILY)
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
-#endif
[videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
m_fullscreenModel->setVideoFullscreenLayer(videoFullscreenLayer.get(), [protectedThis = WTFMove(protectedThis), this] () mutable {
dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] {
@@ -250,9 +244,7 @@
m_interface->setHasVideoContentLayer(true);
});
});
-#if USE(WEB_THREAD)
});
-#endif
#else
ASSERT_NOT_REACHED();
#endif
@@ -261,10 +253,8 @@
void VideoFullscreenControllerContext::returnVideoContentLayer()
{
#if PLATFORM(IOS_FAMILY)
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
-#endif
[videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
m_fullscreenModel->setVideoFullscreenLayer(nil, [protectedThis = WTFMove(protectedThis), this] () mutable {
dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] {
@@ -271,9 +261,7 @@
m_interface->setHasVideoContentLayer(false);
});
});
-#if USE(WEB_THREAD)
});
-#endif
#else
ASSERT_NOT_REACHED();
#endif
@@ -281,17 +269,13 @@
void VideoFullscreenControllerContext::didSetupFullscreen()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
#if PLATFORM(IOS_FAMILY)
dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this] {
m_interface->enterFullscreen();
});
#else
-#if USE(WEB_THREAD)
WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
-#endif
[videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
m_fullscreenModel->setVideoFullscreenLayer(videoFullscreenLayer.get(), [protectedThis = WTFMove(protectedThis), this] () mutable {
dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] {
@@ -298,24 +282,18 @@
m_interface->enterFullscreen();
});
});
-#if USE(WEB_THREAD)
});
#endif
-#endif
}
void VideoFullscreenControllerContext::willExitFullscreen()
{
#if PLATFORM(WATCHOS)
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {
-#endif
m_fullscreenModel->willExitFullscreen();
-#if USE(WEB_THREAD)
});
#endif
-#endif
}
void VideoFullscreenControllerContext::didExitFullscreen()
@@ -326,33 +304,25 @@
m_interface->cleanupFullscreen();
});
#else
-#if USE(WEB_THREAD)
WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {
-#endif
m_fullscreenModel->setVideoFullscreenLayer(nil, [protectedThis = WTFMove(protectedThis), this] () mutable {
dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] {
m_interface->cleanupFullscreen();
});
});
-#if USE(WEB_THREAD)
});
#endif
-#endif
}
void VideoFullscreenControllerContext::didCleanupFullscreen()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
m_interface->setVideoFullscreenModel(nullptr);
m_interface->setVideoFullscreenChangeObserver(nullptr);
m_interface = nullptr;
m_videoFullscreenView = nil;
-#if USE(WEB_THREAD)
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
m_fullscreenModel->setVideoFullscreenLayer(nil);
m_fullscreenModel->setVideoElement(nullptr);
m_playbackModel->setMediaElement(nullptr);
@@ -362,24 +332,18 @@
m_videoElement = nullptr;
[m_controller didFinishFullscreen:this];
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::fullscreenMayReturnToInline()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {
-#endif
IntRect clientRect = elementRectInWindow(m_videoElement.get());
dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this, clientRect] {
m_interface->preparedToReturnToInline(true, clientRect);
});
-#if USE(WEB_THREAD)
});
-#endif
}
#pragma mark PlaybackSessionModelClient
@@ -591,29 +555,21 @@
void VideoFullscreenControllerContext::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode, bool finishedWithMedia)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, mode, finishedWithMedia] {
-#endif
if (m_fullscreenModel)
m_fullscreenModel->requestFullscreenMode(mode, finishedWithMedia);
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::setVideoLayerFrame(FloatRect frame)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
RetainPtr<CALayer> videoFullscreenLayer = [m_videoFullscreenView layer];
[videoFullscreenLayer setSublayerTransform:[videoFullscreenLayer transform]];
dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, frame, videoFullscreenLayer = WTFMove(videoFullscreenLayer)] () mutable {
-#if USE(WEB_THREAD)
WebThreadRun([protectedThis = WTFMove(protectedThis), this, frame, videoFullscreenLayer = WTFMove(videoFullscreenLayer)] {
-#endif
[CATransaction begin];
[CATransaction setDisableActions:YES];
[CATransaction setAnimationDuration:0];
@@ -623,36 +579,26 @@
if (m_fullscreenModel)
m_fullscreenModel->setVideoLayerFrame(frame);
[CATransaction commit];
-#if USE(WEB_THREAD)
});
-#endif
});
}
void VideoFullscreenControllerContext::setVideoLayerGravity(MediaPlayerEnums::VideoGravity videoGravity)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, videoGravity] {
-#endif
if (m_fullscreenModel)
m_fullscreenModel->setVideoLayerGravity(videoGravity);
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode mode)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, mode] {
-#endif
if (m_fullscreenModel)
m_fullscreenModel->fullscreenModeChanged(mode);
-#if USE(WEB_THREAD)
});
-#endif
}
bool VideoFullscreenControllerContext::hasVideo() const
@@ -742,289 +688,205 @@
void VideoFullscreenControllerContext::play()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->play();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::pause()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->pause();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::togglePlayState()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->togglePlayState();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::toggleMuted()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->toggleMuted();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::setMuted(bool muted)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, muted] {
-#endif
if (m_playbackModel)
m_playbackModel->setMuted(muted);
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::setVolume(double volume)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, volume] {
-#endif
if (m_playbackModel)
m_playbackModel->setVolume(volume);
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::setPlayingOnSecondScreen(bool value)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, value] {
-#endif
if (m_playbackModel)
m_playbackModel->setPlayingOnSecondScreen(value);
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::beginScrubbing()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->beginScrubbing();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::endScrubbing()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->endScrubbing();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::seekToTime(double time, double toleranceBefore, double toleranceAfter)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, time, toleranceBefore, toleranceAfter] {
-#endif
if (m_playbackModel)
m_playbackModel->seekToTime(time, toleranceBefore, toleranceAfter);
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::fastSeek(double time)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, time] {
-#endif
if (m_playbackModel)
m_playbackModel->fastSeek(time);
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::beginScanningForward()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->beginScanningForward();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::beginScanningBackward()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->beginScanningBackward();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::endScanning()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this] {
-#endif
if (m_playbackModel)
m_playbackModel->endScanning();
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::selectAudioMediaOption(uint64_t index)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, index] {
-#endif
if (m_playbackModel)
m_playbackModel->selectAudioMediaOption(index);
-#if USE(WEB_THREAD)
});
-#endif
}
void VideoFullscreenControllerContext::selectLegibleMediaOption(uint64_t index)
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
WebThreadRun([protectedThis = makeRefPtr(this), this, index] {
-#endif
if (m_playbackModel)
m_playbackModel->selectLegibleMediaOption(index);
-#if USE(WEB_THREAD)
});
-#endif
}
double VideoFullscreenControllerContext::duration() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->duration() : 0;
}
double VideoFullscreenControllerContext::currentTime() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->currentTime() : 0;
}
double VideoFullscreenControllerContext::bufferedTime() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->bufferedTime() : 0;
}
bool VideoFullscreenControllerContext::isPlaying() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->isPlaying() : false;
}
float VideoFullscreenControllerContext::playbackRate() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->playbackRate() : 0;
}
Ref<TimeRanges> VideoFullscreenControllerContext::seekableRanges() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->seekableRanges() : TimeRanges::create();
}
double VideoFullscreenControllerContext::seekableTimeRangesLastModifiedTime() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->seekableTimeRangesLastModifiedTime() : 0;
}
double VideoFullscreenControllerContext::liveUpdateInterval() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->liveUpdateInterval() : 0;
}
bool VideoFullscreenControllerContext::canPlayFastReverse() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->canPlayFastReverse() : false;
}
Vector<MediaSelectionOption> VideoFullscreenControllerContext::audioMediaSelectionOptions() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
if (m_playbackModel)
return m_playbackModel->audioMediaSelectionOptions();
return { };
@@ -1032,17 +894,13 @@
uint64_t VideoFullscreenControllerContext::audioMediaSelectedIndex() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->audioMediaSelectedIndex() : -1;
}
Vector<MediaSelectionOption> VideoFullscreenControllerContext::legibleMediaSelectionOptions() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
if (m_playbackModel)
return m_playbackModel->legibleMediaSelectionOptions();
return { };
@@ -1050,41 +908,31 @@
uint64_t VideoFullscreenControllerContext::legibleMediaSelectedIndex() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->legibleMediaSelectedIndex() : -1;
}
bool VideoFullscreenControllerContext::externalPlaybackEnabled() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->externalPlaybackEnabled() : false;
}
PlaybackSessionModel::ExternalPlaybackTargetType VideoFullscreenControllerContext::externalPlaybackTargetType() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->externalPlaybackTargetType() : TargetTypeNone;
}
String VideoFullscreenControllerContext::externalPlaybackLocalizedDeviceName() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->externalPlaybackLocalizedDeviceName() : String();
}
bool VideoFullscreenControllerContext::wirelessVideoPlaybackDisabled() const
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
return m_playbackModel ? m_playbackModel->wirelessVideoPlaybackDisabled() : true;
}
@@ -1092,9 +940,7 @@
void VideoFullscreenControllerContext::setUpFullscreen(HTMLVideoElement& videoElement, UIView *view, HTMLMediaElementEnums::VideoFullscreenMode mode)
{
-#if USE(WEB_THREAD)
ASSERT(isMainThread());
-#endif
RetainPtr<UIView> viewRef = view;
m_videoElement = &videoElement;
m_playbackModel = PlaybackSessionModelMediaElement::create();
@@ -1112,9 +958,7 @@
m_fullscreenModel->setVideoLayerFrame(videoLayerFrame);
dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, videoElementClientRect, viewRef, mode, allowsPictureInPicture] {
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
Ref<PlaybackSessionInterfaceAVKit> sessionInterface = PlaybackSessionInterfaceAVKit::create(*this);
m_interface = VideoFullscreenInterfaceAVKit::create(sessionInterface.get());
@@ -1130,14 +974,10 @@
void VideoFullscreenControllerContext::exitFullscreen()
{
-#if USE(WEB_THREAD)
ASSERT(WebThreadIsCurrent() || isMainThread());
-#endif
IntRect clientRect = elementRectInWindow(m_videoElement.get());
dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, clientRect] {
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
m_interface->exitFullscreen(clientRect);
});
}
@@ -1144,9 +984,7 @@
void VideoFullscreenControllerContext::requestHideAndExitFullscreen()
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
m_interface->requestHideAndExitFullscreen();
}
@@ -1175,9 +1013,7 @@
- (void)enterFullscreen:(UIView *)view mode:(HTMLMediaElementEnums::VideoFullscreenMode)mode
{
-#if USE(WEB_THREAD)
ASSERT(isMainThread());
-#endif
_context = VideoFullscreenControllerContext::create();
_context->setController(self);
_context->setUpFullscreen(*_videoElement.get(), view, mode);
@@ -1185,17 +1021,13 @@
- (void)exitFullscreen
{
-#if USE(WEB_THREAD)
ASSERT(WebThreadIsCurrent() || isMainThread());
-#endif
_context->exitFullscreen();
}
- (void)requestHideAndExitFullscreen
{
-#if USE(WEB_THREAD)
ASSERT(isUIThread());
-#endif
if (_context)
_context->requestHideAndExitFullscreen();
}
Modified: trunk/Source/WebCore/platform/ios/wak/WAKWindow.mm (240354 => 240355)
--- trunk/Source/WebCore/platform/ios/wak/WAKWindow.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/platform/ios/wak/WAKWindow.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -199,13 +199,9 @@
_visible = visible;
-#if USE(WEB_THREAD)
WebThreadRun(^{
[[NSNotificationCenter defaultCenter] postNotificationName:WAKWindowVisibilityDidChangeNotification object:self userInfo:nil];
});
-#else
- [[NSNotificationCenter defaultCenter] postNotificationName:WAKWindowVisibilityDidChangeNotification object:self userInfo:nil];
-#endif
}
- (NSSelectionDirection)keyViewSelectionDirection
@@ -296,13 +292,9 @@
{
_screenScale = scale;
-#if USE(WEB_THREAD)
WebThreadRun(^{
[[NSNotificationCenter defaultCenter] postNotificationName:WAKWindowScreenScaleDidChangeNotification object:self userInfo:nil];
});
-#else
- [[NSNotificationCenter defaultCenter] postNotificationName:WAKWindowScreenScaleDidChangeNotification object:self userInfo:nil];
-#endif
}
- (CGFloat)screenScale
@@ -323,13 +315,9 @@
- (void)sendEvent:(WebEvent *)anEvent
{
ASSERT(anEvent);
-#if USE(WEB_THREAD)
WebThreadRun(^{
[self sendEventSynchronously:anEvent];
});
-#else
- [self sendEventSynchronously:anEvent];
-#endif
}
- (void)sendEventSynchronously:(WebEvent *)anEvent
@@ -370,16 +358,12 @@
- (void)sendMouseMoveEvent:(WebEvent *)anEvent contentChange:(WKContentChange *)aContentChange
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
[self sendEvent:anEvent];
if (aContentChange)
*aContentChange = WKObservedContentChange();
-#if USE(WEB_THREAD)
});
-#endif
}
- (void)setExposedScrollViewRect:(CGRect)exposedScrollViewRect
Modified: trunk/Source/WebCore/platform/network/ios/NetworkStateNotifierIOS.mm (240354 => 240355)
--- trunk/Source/WebCore/platform/network/ios/NetworkStateNotifierIOS.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/platform/network/ios/NetworkStateNotifierIOS.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -84,13 +84,9 @@
if (DeprecatedGlobalSettings::shouldOptOutOfNetworkStateObservation())
return;
m_observer = adoptNS([[WebNetworkStateObserver alloc] initWithBlock:^ {
-#if USE(WEB_THREAD)
WebThreadRun(^ {
NetworkStateNotifier::singleton().updateStateSoon();
});
-#else
- NetworkStateNotifier::singleton().updateStateSoon();
-#endif
}]);
}
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (240354 => 240355)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -280,13 +280,9 @@
static void contentSizeCategoryDidChange(CFNotificationCenterRef, void*, CFStringRef name, const void*, CFDictionaryRef)
{
ASSERT_UNUSED(name, CFEqual(name, PAL::get_UIKit_UIContentSizeCategoryDidChangeNotification()));
-#if USE(WEB_THREAD)
WebThreadRun(^{
Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
});
-#else
- Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
-#endif
}
RenderThemeIOS::RenderThemeIOS()
Modified: trunk/Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm (240354 => 240355)
--- trunk/Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -336,58 +336,38 @@
- (void)geolocationAuthorizationGranted
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
[_provider geolocationAuthorizationGranted];
});
-#else
- [_provider geolocationAuthorizationGranted];
-#endif
}
- (void)geolocationAuthorizationDenied
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
[_provider geolocationAuthorizationDenied];
});
-#else
- [_provider geolocationAuthorizationDenied];
-#endif
}
- (void)positionChanged:(WebCore::GeolocationPosition&&)position
{
RetainPtr<WebGeolocationPosition> webPosition = adoptNS([[WebGeolocationPosition alloc] initWithGeolocationPosition:WTFMove(position)]);
-#if USE(WEB_THREAD)
WebThreadRun(^{
[_provider positionChanged:webPosition.get()];
});
-#else
- [_provider positionChanged:webPosition.get()];
-#endif
}
- (void)errorOccurred:(NSString *)errorMessage
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
[_provider errorOccurred:errorMessage];
});
-#else
- [_provider errorOccurred:errorMessage];
-#endif
}
- (void)resetGeolocation
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
[_provider resetGeolocation];
});
-#else
- [_provider resetGeolocation];
-#endif
}
@end
Modified: trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm (240354 => 240355)
--- trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -164,15 +164,10 @@
// FIXME: share code with 'sendScrollEvent'?
- (void)didFinishScrollingOrZooming
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
if (Frame* frame = [_private->m_webView _mainCoreFrame])
frame->viewportOffsetChanged(Frame::CompletedScrollOffset);
});
-#else
- if (Frame* frame = [_private->m_webView _mainCoreFrame])
- frame->viewportOffsetChanged(Frame::CompletedScrollOffset);
-#endif
}
- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(const WTF::HashMap<CALayer*, CALayer*>&)stickyContainers
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm (240354 => 240355)
--- trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -139,9 +139,7 @@
// _close]. [WebView _close] schedules its work on the WebThread. So we
// schedule this method on the WebThread as well so as to pick up all the
// dead resources left behind after closing the WebViews
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
WebKit::MemoryMeasure measurer("[WebCache emptyInMemoryResources]");
// Toggling the cache model like this forces the cache to evict all its in-memory resources.
@@ -150,9 +148,7 @@
[WebView _setCacheModel:cacheModel];
WebCore::MemoryCache::singleton().pruneLiveResources(true);
-#if USE(WEB_THREAD)
});
-#endif
}
+ (void)sizeOfDeadResources:(int *)resources
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (240354 => 240355)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -2454,16 +2454,12 @@
#if HAVE(APP_LINKS)
if (_appLinkURL && _frame) {
[LSAppLink openWithURL:_appLinkURL.get() completionHandler:^(BOOL success, NSError *) {
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
if (success)
[self receivedPolicyDecision:PolicyAction::Ignore];
else
[self receivedPolicyDecision:PolicyAction::Use];
-#if USE(WEB_THREAD)
});
-#endif
}];
return;
}
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebGeolocationClient.mm (240354 => 240355)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebGeolocationClient.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebGeolocationClient.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -174,37 +174,25 @@
- (void)allow
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
_geolocation->setIsAllowed(true);
});
-#else
- _geolocation->setIsAllowed(true);
-#endif
}
- (void)deny
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
_geolocation->setIsAllowed(false);
});
-#else
- _geolocation->setIsAllowed(false);
-#endif
}
- (void)denyOnlyThisRequest
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
// A soft deny does not prevent subsequent request from the Geolocation object.
[self deny];
_geolocation->resetIsAllowed();
-#if USE(WEB_THREAD)
});
-#endif
}
- (BOOL)shouldClearCache
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm (240354 => 240355)
--- trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -1296,9 +1296,7 @@
- (void)deviceOrientationChanged
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
#if ENABLE(ORIENTATION_EVENTS)
WebView *webView = getWebView(self);
[webView _setDeviceOrientation:[[webView _UIKitDelegateForwarder] deviceOrientation]];
@@ -1305,9 +1303,7 @@
#endif
if (WebCore::Frame* frame = core(self))
frame->orientationChanged();
-#if USE(WEB_THREAD)
});
-#endif
}
- (void)setNeedsLayout
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (240354 => 240355)
--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -820,15 +820,11 @@
static void hardwareKeyboardAvailabilityChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef)
{
ASSERT(observer);
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
WebHTMLView *webView = (__bridge WebHTMLView *)observer;
if (Frame* coreFrame = core([webView _frame]))
coreFrame->eventHandler().capsLockStateMayHaveChanged();
-#if USE(WEB_THREAD)
});
-#endif
}
#endif
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (240354 => 240355)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2019-01-23 20:54:30 UTC (rev 240354)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2019-01-23 21:03:32 UTC (rev 240355)
@@ -1783,13 +1783,9 @@
+ (void)_releaseMemoryNow
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
WebCore::releaseMemory(Critical::Yes, Synchronous::Yes);
});
-#else
- WebCore::releaseMemory(Critical::Yes, Synchronous::Yes);
-#endif
}
- (void)_replaceCurrentHistoryItem:(WebHistoryItem *)item
@@ -1801,14 +1797,10 @@
+ (void)willEnterBackgroundWithCompletionHandler:(void(^)(void))handler
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
[WebView _releaseMemoryNow];
dispatch_async(dispatch_get_main_queue(), handler);
-#if USE(WEB_THREAD)
});
-#endif
}
+ (BOOL)isCharacterSmartReplaceExempt:(unichar)character isPreviousCharacter:(BOOL)b
@@ -1818,17 +1810,13 @@
- (void)updateLayoutIgnorePendingStyleSheets
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
for (Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext()) {
Document *document = frame->document();
if (document)
document->updateLayoutIgnorePendingStylesheets();
}
-#if USE(WEB_THREAD)
});
-#endif
}
#endif
@@ -2167,9 +2155,7 @@
- (void)_dispatchUnloadEvent
{
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
WebFrame *mainFrame = [self mainFrame];
Frame *coreMainFrame = core(mainFrame);
if (coreMainFrame) {
@@ -2177,9 +2163,7 @@
if (document)
document->dispatchWindowEvent(Event::create(eventNames().unloadEvent, Event::CanBubble::No, Event::IsCancelable::No));
}
-#if USE(WEB_THREAD)
});
-#endif
}
- (DOMCSSStyleDeclaration *)styleAtSelectionStart
@@ -2328,10 +2312,8 @@
[self _clearDelegates];
-#if USE(WEB_THREAD)
// Fix for problems such as <rdar://problem/5774587> Crash closing tab in WebCore::Frame::page() from -[WebCoreFrameBridge pauseTimeouts]
WebThreadRun(^{
-#endif
#endif
if (!_private || _private->closed)
@@ -2437,7 +2419,7 @@
[WebCache setDisabled:YES];
}
#endif
-#if PLATFORM(IOS_FAMILY) && USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
// Fix for problems such as <rdar://problem/5774587> Crash closing tab in WebCore::Frame::page() from -[WebCoreFrameBridge pauseTimeouts]
});
#endif
@@ -2810,9 +2792,7 @@
#if PLATFORM(IOS_FAMILY)
} else {
-#if USE(WEB_THREAD)
WebThreadRun(^{
-#endif
// It is possible that the prefs object has already changed before the invocation could be called
// on the web thread. This is not possible on TOT which is why they have a simple ASSERT.
WebPreferences *preferences = (WebPreferences *)[notification object];
@@ -2819,9 +2799,7 @@
if (preferences != [self preferences])
return;
[self _preferencesChanged:preferences];
-#if USE(WEB_THREAD)
});
-#endif
}
#endif
}
@@ -4381,14 +4359,9 @@
}
if (!synchronize)
return;
-
-#if USE(WEB_THREAD)
WebThreadRun(^{
[self _synchronizeCustomFixedPositionLayoutRect];
});
-#else
- [self _synchronizeCustomFixedPositionLayoutRect];
-#endif
}
- (void)_setCustomFixedPositionLayoutRect:(CGRect)rect
@@ -6468,11 +6441,11 @@
if (!_private->page)
return NO;
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
if (WebThreadIsCurrent() || !WebThreadIsEnabled())
#endif
return _private->page->backForward().goBack();
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
WebThreadRun(^{
_private->page->backForward().goBack();
});
@@ -6486,11 +6459,11 @@
if (!_private->page)
return NO;
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
if (WebThreadIsCurrent() || !WebThreadIsEnabled())
#endif
return _private->page->backForward().goForward();
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
WebThreadRun(^{
_private->page->backForward().goForward();
});
@@ -7441,7 +7414,7 @@
+ (void)_cacheModelChangedNotification:(NSNotification *)notification
{
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
// This needs to happen on the Web Thread
WebThreadRun(^{
#endif
@@ -7453,7 +7426,7 @@
[self _setCacheModel:cacheModel];
else if (cacheModel < [self _cacheModel])
[self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
});
#endif
}
@@ -7600,7 +7573,7 @@
- (IBAction)stopLoading:(id)sender
{
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
if (WebThreadNotCurrent()) {
_private->isStopping = true;
WebThreadSetShouldYield();
@@ -7609,7 +7582,7 @@
_private->isStopping = false;
#endif
[[self mainFrame] stopLoading];
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
});
#endif
}
@@ -7617,13 +7590,11 @@
#if PLATFORM(IOS_FAMILY)
- (void)stopLoadingAndClear
{
-#if USE(WEB_THREAD)
if (WebThreadNotCurrent() && !WebThreadIsLocked()) {
_private->isStopping = true;
WebThreadSetShouldYield();
}
WebThreadRun(^{
-#endif
_private->isStopping = false;
WebFrame *frame = [self mainFrame];
@@ -7638,19 +7609,17 @@
[mainFrameView _setDocumentView:plainWhiteView];
[plainWhiteView setNeedsDisplay:YES];
[plainWhiteView release];
-#if USE(WEB_THREAD)
});
-#endif
}
#endif
- (IBAction)reload:(id)sender
{
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
WebThreadRun(^{
#endif
[[self mainFrame] reload];
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
});
#endif
}
@@ -10310,11 +10279,11 @@
std::call_once(onceFlag, [] {
auto& memoryPressureHandler = MemoryPressureHandler::singleton();
memoryPressureHandler.setLowMemoryHandler([] (Critical critical, Synchronous synchronous) {
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
WebThreadRun(^{
#endif
WebCore::releaseMemory(critical, synchronous);
-#if USE(WEB_THREAD)
+#if PLATFORM(IOS_FAMILY)
});
#endif
});