Changeset 240355 in webkit


Ignore:
Timestamp:
Jan 23, 2019 1:03:32 PM (5 years ago)
Author:
Conrad Shultz
Message:

Unreviewed; Revert "Clean up USE(WEB_THREAD)"

This reverts commit 24ba8bb9e1dad8679b492d9a2d47da619be85789.
https://bugs.webkit.org/show_bug.cgi?id=193698

Location:
trunk/Source
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp

    r240353 r240355  
    9898static void userCaptionPreferencesChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void *, CFDictionaryRef)
    9999{
    100 #if !USE(WEB_THREAD)
     100#if !PLATFORM(IOS_FAMILY)
    101101    static_cast<CaptionUserPreferencesMediaAF*>(observer)->captionPreferencesChanged();
    102102#else
  • trunk/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp

    r240353 r240355  
    4747static void applicationDidBecomeActive(CFNotificationCenterRef, void*, CFStringRef, const void*, CFDictionaryRef)
    4848{
    49 #if USE(WEB_THREAD)
    5049    WebThreadRun(^{
    5150        restartSharedTimer();
    5251    });
    53 #else
    54     restartSharedTimer();
    55 #endif
    5652}
    5753#endif
  • trunk/Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm

    r240353 r240355  
    145145{
    146146    dispatch_async(dispatch_get_main_queue(), ^{
    147 #if USE(WEB_THREAD)
     147#if PLATFORM(IOS_FAMILY)
    148148        WebThreadRun(block);
    149149#else
  • trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm

    r240353 r240355  
    8686    UNUSED_PARAM(change);
    8787    UNUSED_PARAM(context);
    88 #if USE(WEB_THREAD)
     88#if PLATFORM(IOS_FAMILY)
    8989    WebThreadRun(^{
    9090        if (_parent && [keyPath isEqual:@"bounds"] && object == _parent->platformLayer())
  • trunk/Source/WebCore/platform/ios/LegacyTileCache.mm

    r240353 r240355  
    278278
    279279    LegacyTileCacheTombstone *tombstone = m_tombstone.get();
    280 #if USE(WEB_THREAD)
    281280    WebThreadRun(^{
    282 #endif
    283281        if ([tombstone isDead])
    284282            return;
    285283        m_hasPendingLayoutTiles = false;
    286284        doLayoutTiles();
    287 #if USE(WEB_THREAD)
    288285    });
    289 #endif
    290286}
    291287
     
    721717
    722718    LegacyTileCacheTombstone *tombstone = m_tombstone.get();
    723 #if USE(WEB_THREAD)
    724719    WebThreadRun(^{
    725 #endif
    726720        if ([tombstone isDead])
    727721            return;
    728722        m_hasPendingUpdateTilingMode = false;
    729723        updateTilingMode();
    730 #if USE(WEB_THREAD)
    731724    });
    732 #endif
    733725}
    734726
  • trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm

    r240353 r240355  
    221221- (void)sendAccelerometerData:(CMAccelerometerData *)newAcceleration
    222222{
    223 #if USE(WEB_THREAD)
    224223    WebThreadRun(^{
    225 #endif
    226224        CMAcceleration accel = newAcceleration.acceleration;
    227225
    228226        for (auto& client : copyToVector(m_deviceMotionClients))
    229227            client->motionChanged(0, 0, 0, accel.x * kGravity, accel.y * kGravity, accel.z * kGravity, 0, 0, 0);
    230 #if USE(WEB_THREAD)
    231228    });
    232 #endif
    233229}
    234230
    235231- (void)sendMotionData:(CMDeviceMotion *)newMotion withHeading:(CLHeading *)newHeading
    236232{
    237 #if USE(WEB_THREAD)
    238233    WebThreadRun(^{
    239 #endif
    240234        // Acceleration is user + gravity
    241235        CMAcceleration userAccel = newMotion.userAcceleration;
     
    328322        for (size_t i = 0; i < orientationClients.size(); ++i)
    329323            orientationClients[i]->orientationChanged(alpha, beta, gamma, heading, headingAccuracy);
    330 #if USE(WEB_THREAD)
    331324    });
     325}
     326
     327@end
     328
    332329#endif
    333 }
    334 
    335 @end
    336 
    337 #endif
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm

    r240353 r240355  
    222222{
    223223#if PLATFORM(IOS_FAMILY)
    224 #if USE(WEB_THREAD)
    225224    ASSERT(isUIThread());
    226225    WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {
    227 #endif
    228226        IntRect clientRect = elementRectInWindow(m_videoElement.get());
    229227        dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this, clientRect] {
    230228            m_interface->setInlineRect(clientRect, clientRect != IntRect(0, 0, 0, 0));
    231229        });
    232 #if USE(WEB_THREAD)
    233     });
    234 #endif
     230    });
    235231#else
    236232    ASSERT_NOT_REACHED();
     
    241237{
    242238#if PLATFORM(IOS_FAMILY)
    243 #if USE(WEB_THREAD)
    244239    ASSERT(isUIThread());
    245240    WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
    246 #endif
    247241        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
    248242        m_fullscreenModel->setVideoFullscreenLayer(videoFullscreenLayer.get(), [protectedThis = WTFMove(protectedThis), this] () mutable {
     
    251245            });
    252246        });
    253 #if USE(WEB_THREAD)
    254     });
    255 #endif
     247    });
    256248#else
    257249    ASSERT_NOT_REACHED();
     
    262254{
    263255#if PLATFORM(IOS_FAMILY)
    264 #if USE(WEB_THREAD)
    265256    ASSERT(isUIThread());
    266257    WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
    267 #endif
    268258        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
    269259        m_fullscreenModel->setVideoFullscreenLayer(nil, [protectedThis = WTFMove(protectedThis), this] () mutable {
     
    272262            });
    273263        });
    274 #if USE(WEB_THREAD)
    275     });
    276 #endif
     264    });
    277265#else
    278266    ASSERT_NOT_REACHED();
     
    282270void VideoFullscreenControllerContext::didSetupFullscreen()
    283271{
    284 #if USE(WEB_THREAD)
    285     ASSERT(isUIThread());
    286 #endif
     272    ASSERT(isUIThread());
    287273#if PLATFORM(IOS_FAMILY)
    288274    dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this] {
     
    290276    });
    291277#else
    292 #if USE(WEB_THREAD)
    293278    WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
    294 #endif
    295279        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
    296280        m_fullscreenModel->setVideoFullscreenLayer(videoFullscreenLayer.get(), [protectedThis = WTFMove(protectedThis), this] () mutable {
     
    299283            });
    300284        });
    301 #if USE(WEB_THREAD)
    302285    });
    303286#endif
    304 #endif
    305287}
    306288
     
    308290{
    309291#if PLATFORM(WATCHOS)
    310 #if USE(WEB_THREAD)
    311292    ASSERT(isUIThread());
    312293    WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {
    313 #endif
    314294        m_fullscreenModel->willExitFullscreen();
    315 #if USE(WEB_THREAD)
    316     });
    317 #endif
     295    });
    318296#endif
    319297}
     
    327305    });
    328306#else
    329 #if USE(WEB_THREAD)
    330307    WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {
    331 #endif
    332308        m_fullscreenModel->setVideoFullscreenLayer(nil, [protectedThis = WTFMove(protectedThis), this] () mutable {
    333309            dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] {
     
    335311            });
    336312        });
    337 #if USE(WEB_THREAD)
    338313    });
    339314#endif
    340 #endif
    341315}
    342316
    343317void VideoFullscreenControllerContext::didCleanupFullscreen()
    344318{
    345 #if USE(WEB_THREAD)
    346     ASSERT(isUIThread());
    347 #endif
     319    ASSERT(isUIThread());
    348320    m_interface->setVideoFullscreenModel(nullptr);
    349321    m_interface->setVideoFullscreenChangeObserver(nullptr);
     
    351323    m_videoFullscreenView = nil;
    352324
    353 #if USE(WEB_THREAD)
    354325    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    355 #endif
    356326        m_fullscreenModel->setVideoFullscreenLayer(nil);
    357327        m_fullscreenModel->setVideoElement(nullptr);
     
    363333
    364334        [m_controller didFinishFullscreen:this];
    365 #if USE(WEB_THREAD)
    366     });
    367 #endif
     335    });
    368336}
    369337
    370338void VideoFullscreenControllerContext::fullscreenMayReturnToInline()
    371339{
    372 #if USE(WEB_THREAD)
    373340    ASSERT(isUIThread());
    374341    WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {
    375 #endif
    376342        IntRect clientRect = elementRectInWindow(m_videoElement.get());
    377343        dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this, clientRect] {
    378344            m_interface->preparedToReturnToInline(true, clientRect);
    379345        });
    380 #if USE(WEB_THREAD)
    381     });
    382 #endif
     346    });
    383347}
    384348
     
    592556void VideoFullscreenControllerContext::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode, bool finishedWithMedia)
    593557{
    594 #if USE(WEB_THREAD)
    595558    ASSERT(isUIThread());
    596559    WebThreadRun([protectedThis = makeRefPtr(this), this, mode, finishedWithMedia] {
    597 #endif
    598560        if (m_fullscreenModel)
    599561            m_fullscreenModel->requestFullscreenMode(mode, finishedWithMedia);
    600 #if USE(WEB_THREAD)
    601     });
    602 #endif
     562    });
    603563}
    604564
    605565void VideoFullscreenControllerContext::setVideoLayerFrame(FloatRect frame)
    606566{
    607 #if USE(WEB_THREAD)
    608     ASSERT(isUIThread());
    609 #endif
     567    ASSERT(isUIThread());
    610568    RetainPtr<CALayer> videoFullscreenLayer = [m_videoFullscreenView layer];
    611569    [videoFullscreenLayer setSublayerTransform:[videoFullscreenLayer transform]];
    612570
    613571    dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, frame, videoFullscreenLayer = WTFMove(videoFullscreenLayer)] () mutable {
    614 #if USE(WEB_THREAD)
    615572        WebThreadRun([protectedThis = WTFMove(protectedThis), this, frame, videoFullscreenLayer = WTFMove(videoFullscreenLayer)] {
    616 #endif
    617573            [CATransaction begin];
    618574            [CATransaction setDisableActions:YES];
     
    624580                m_fullscreenModel->setVideoLayerFrame(frame);
    625581            [CATransaction commit];
    626 #if USE(WEB_THREAD)
    627         });
    628 #endif
     582        });
    629583    });
    630584}
     
    632586void VideoFullscreenControllerContext::setVideoLayerGravity(MediaPlayerEnums::VideoGravity videoGravity)
    633587{
    634 #if USE(WEB_THREAD)
    635588    ASSERT(isUIThread());
    636589    WebThreadRun([protectedThis = makeRefPtr(this), this, videoGravity] {
    637 #endif
    638590        if (m_fullscreenModel)
    639591            m_fullscreenModel->setVideoLayerGravity(videoGravity);
    640 #if USE(WEB_THREAD)
    641     });
    642 #endif
     592    });
    643593}
    644594
    645595void VideoFullscreenControllerContext::fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode mode)
    646596{
    647 #if USE(WEB_THREAD)
    648597    ASSERT(isUIThread());
    649598    WebThreadRun([protectedThis = makeRefPtr(this), this, mode] {
    650 #endif
    651599        if (m_fullscreenModel)
    652600            m_fullscreenModel->fullscreenModeChanged(mode);
    653 #if USE(WEB_THREAD)
    654     });
    655 #endif
     601    });
    656602}
    657603
     
    743689void VideoFullscreenControllerContext::play()
    744690{
    745 #if USE(WEB_THREAD)
    746691    ASSERT(isUIThread());
    747692    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    748 #endif
    749693        if (m_playbackModel)
    750694            m_playbackModel->play();
    751 #if USE(WEB_THREAD)
    752     });
    753 #endif
     695    });
    754696}
    755697
    756698void VideoFullscreenControllerContext::pause()
    757699{
    758 #if USE(WEB_THREAD)
    759700    ASSERT(isUIThread());
    760701    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    761 #endif
    762702        if (m_playbackModel)
    763703            m_playbackModel->pause();
    764 #if USE(WEB_THREAD)
    765     });
    766 #endif
     704    });
    767705}
    768706
    769707void VideoFullscreenControllerContext::togglePlayState()
    770708{
    771 #if USE(WEB_THREAD)
    772709    ASSERT(isUIThread());
    773710    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    774 #endif
    775711        if (m_playbackModel)
    776712            m_playbackModel->togglePlayState();
    777 #if USE(WEB_THREAD)
    778     });
    779 #endif
     713    });
    780714}
    781715
    782716void VideoFullscreenControllerContext::toggleMuted()
    783717{
    784 #if USE(WEB_THREAD)
    785718    ASSERT(isUIThread());
    786719    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    787 #endif
    788720        if (m_playbackModel)
    789721            m_playbackModel->toggleMuted();
    790 #if USE(WEB_THREAD)
    791     });
    792 #endif
     722    });
    793723}
    794724
    795725void VideoFullscreenControllerContext::setMuted(bool muted)
    796726{
    797 #if USE(WEB_THREAD)
    798727    ASSERT(isUIThread());
    799728    WebThreadRun([protectedThis = makeRefPtr(this), this, muted] {
    800 #endif
    801729        if (m_playbackModel)
    802730            m_playbackModel->setMuted(muted);
    803 #if USE(WEB_THREAD)
    804     });
    805 #endif
     731    });
    806732}
    807733
    808734void VideoFullscreenControllerContext::setVolume(double volume)
    809735{
    810 #if USE(WEB_THREAD)
    811736    ASSERT(isUIThread());
    812737    WebThreadRun([protectedThis = makeRefPtr(this), this, volume] {
    813 #endif
    814738        if (m_playbackModel)
    815739            m_playbackModel->setVolume(volume);
    816 #if USE(WEB_THREAD)
    817     });
    818 #endif
     740    });
    819741}
    820742
    821743void VideoFullscreenControllerContext::setPlayingOnSecondScreen(bool value)
    822744{
    823 #if USE(WEB_THREAD)
    824745    ASSERT(isUIThread());
    825746    WebThreadRun([protectedThis = makeRefPtr(this), this, value] {
    826 #endif
    827747        if (m_playbackModel)
    828748            m_playbackModel->setPlayingOnSecondScreen(value);
    829 #if USE(WEB_THREAD)
    830     });
    831 #endif
     749    });
    832750}
    833751
    834752void VideoFullscreenControllerContext::beginScrubbing()
    835753{
    836 #if USE(WEB_THREAD)
    837754    ASSERT(isUIThread());
    838755    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    839 #endif
    840756        if (m_playbackModel)
    841757            m_playbackModel->beginScrubbing();
    842 #if USE(WEB_THREAD)
    843     });
    844 #endif
     758    });
    845759}
    846760
    847761void VideoFullscreenControllerContext::endScrubbing()
    848762{
    849 #if USE(WEB_THREAD)
    850763    ASSERT(isUIThread());
    851764    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    852 #endif
    853765        if (m_playbackModel)
    854766            m_playbackModel->endScrubbing();
    855 #if USE(WEB_THREAD)
    856     });
    857 #endif
     767    });
    858768}
    859769
    860770void VideoFullscreenControllerContext::seekToTime(double time, double toleranceBefore, double toleranceAfter)
    861771{
    862 #if USE(WEB_THREAD)
    863772    ASSERT(isUIThread());
    864773    WebThreadRun([protectedThis = makeRefPtr(this), this, time, toleranceBefore, toleranceAfter] {
    865 #endif
    866774        if (m_playbackModel)
    867775            m_playbackModel->seekToTime(time, toleranceBefore, toleranceAfter);
    868 #if USE(WEB_THREAD)
    869     });
    870 #endif
     776    });
    871777}
    872778
    873779void VideoFullscreenControllerContext::fastSeek(double time)
    874780{
    875 #if USE(WEB_THREAD)
    876781    ASSERT(isUIThread());
    877782    WebThreadRun([protectedThis = makeRefPtr(this), this, time] {
    878 #endif
    879783        if (m_playbackModel)
    880784            m_playbackModel->fastSeek(time);
    881 #if USE(WEB_THREAD)
    882     });
    883 #endif
     785    });
    884786}
    885787
    886788void VideoFullscreenControllerContext::beginScanningForward()
    887789{
    888 #if USE(WEB_THREAD)
    889790    ASSERT(isUIThread());
    890791    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    891 #endif
    892792        if (m_playbackModel)
    893793            m_playbackModel->beginScanningForward();
    894 #if USE(WEB_THREAD)
    895     });
    896 #endif
     794    });
    897795}
    898796
    899797void VideoFullscreenControllerContext::beginScanningBackward()
    900798{
    901 #if USE(WEB_THREAD)
    902799    ASSERT(isUIThread());
    903800    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    904 #endif
    905801        if (m_playbackModel)
    906802            m_playbackModel->beginScanningBackward();
    907 #if USE(WEB_THREAD)
    908     });
    909 #endif
     803    });
    910804}
    911805
    912806void VideoFullscreenControllerContext::endScanning()
    913807{
    914 #if USE(WEB_THREAD)
    915808    ASSERT(isUIThread());
    916809    WebThreadRun([protectedThis = makeRefPtr(this), this] {
    917 #endif
    918810        if (m_playbackModel)
    919811            m_playbackModel->endScanning();
    920 #if USE(WEB_THREAD)
    921     });
    922 #endif
     812    });
    923813}
    924814
    925815void VideoFullscreenControllerContext::selectAudioMediaOption(uint64_t index)
    926816{
    927 #if USE(WEB_THREAD)
    928817    ASSERT(isUIThread());
    929818    WebThreadRun([protectedThis = makeRefPtr(this), this, index] {
    930 #endif
    931819        if (m_playbackModel)
    932820            m_playbackModel->selectAudioMediaOption(index);
    933 #if USE(WEB_THREAD)
    934     });
    935 #endif
     821    });
    936822}
    937823
    938824void VideoFullscreenControllerContext::selectLegibleMediaOption(uint64_t index)
    939825{
    940 #if USE(WEB_THREAD)
    941826    ASSERT(isUIThread());
    942827    WebThreadRun([protectedThis = makeRefPtr(this), this, index] {
    943 #endif
    944828        if (m_playbackModel)
    945829            m_playbackModel->selectLegibleMediaOption(index);
    946 #if USE(WEB_THREAD)
    947     });
    948 #endif
     830    });
    949831}
    950832
    951833double VideoFullscreenControllerContext::duration() const
    952834{
    953 #if USE(WEB_THREAD)
    954     ASSERT(isUIThread());
    955 #endif
     835    ASSERT(isUIThread());
    956836    return m_playbackModel ? m_playbackModel->duration() : 0;
    957837}
     
    959839double VideoFullscreenControllerContext::currentTime() const
    960840{
    961 #if USE(WEB_THREAD)
    962     ASSERT(isUIThread());
    963 #endif
     841    ASSERT(isUIThread());
    964842    return m_playbackModel ? m_playbackModel->currentTime() : 0;
    965843}
     
    967845double VideoFullscreenControllerContext::bufferedTime() const
    968846{
    969 #if USE(WEB_THREAD)
    970     ASSERT(isUIThread());
    971 #endif
     847    ASSERT(isUIThread());
    972848    return m_playbackModel ? m_playbackModel->bufferedTime() : 0;
    973849}
     
    975851bool VideoFullscreenControllerContext::isPlaying() const
    976852{
    977 #if USE(WEB_THREAD)
    978     ASSERT(isUIThread());
    979 #endif
     853    ASSERT(isUIThread());
    980854    return m_playbackModel ? m_playbackModel->isPlaying() : false;
    981855}
     
    983857float VideoFullscreenControllerContext::playbackRate() const
    984858{
    985 #if USE(WEB_THREAD)
    986     ASSERT(isUIThread());
    987 #endif
     859    ASSERT(isUIThread());
    988860    return m_playbackModel ? m_playbackModel->playbackRate() : 0;
    989861}
     
    991863Ref<TimeRanges> VideoFullscreenControllerContext::seekableRanges() const
    992864{
    993 #if USE(WEB_THREAD)
    994     ASSERT(isUIThread());
    995 #endif
     865    ASSERT(isUIThread());
    996866    return m_playbackModel ? m_playbackModel->seekableRanges() : TimeRanges::create();
    997867}
     
    999869double VideoFullscreenControllerContext::seekableTimeRangesLastModifiedTime() const
    1000870{
    1001 #if USE(WEB_THREAD)
    1002     ASSERT(isUIThread());
    1003 #endif
     871    ASSERT(isUIThread());
    1004872    return m_playbackModel ? m_playbackModel->seekableTimeRangesLastModifiedTime() : 0;
    1005873}
     
    1007875double VideoFullscreenControllerContext::liveUpdateInterval() const
    1008876{
    1009 #if USE(WEB_THREAD)
    1010     ASSERT(isUIThread());
    1011 #endif
     877    ASSERT(isUIThread());
    1012878    return m_playbackModel ? m_playbackModel->liveUpdateInterval() : 0;
    1013879}
     
    1015881bool VideoFullscreenControllerContext::canPlayFastReverse() const
    1016882{
    1017 #if USE(WEB_THREAD)
    1018     ASSERT(isUIThread());
    1019 #endif
     883    ASSERT(isUIThread());
    1020884    return m_playbackModel ? m_playbackModel->canPlayFastReverse() : false;
    1021885}
     
    1023887Vector<MediaSelectionOption> VideoFullscreenControllerContext::audioMediaSelectionOptions() const
    1024888{
    1025 #if USE(WEB_THREAD)
    1026     ASSERT(isUIThread());
    1027 #endif
     889    ASSERT(isUIThread());
    1028890    if (m_playbackModel)
    1029891        return m_playbackModel->audioMediaSelectionOptions();
     
    1033895uint64_t VideoFullscreenControllerContext::audioMediaSelectedIndex() const
    1034896{
    1035 #if USE(WEB_THREAD)
    1036     ASSERT(isUIThread());
    1037 #endif
     897    ASSERT(isUIThread());
    1038898    return m_playbackModel ? m_playbackModel->audioMediaSelectedIndex() : -1;
    1039899}
     
    1041901Vector<MediaSelectionOption> VideoFullscreenControllerContext::legibleMediaSelectionOptions() const
    1042902{
    1043 #if USE(WEB_THREAD)
    1044     ASSERT(isUIThread());
    1045 #endif
     903    ASSERT(isUIThread());
    1046904    if (m_playbackModel)
    1047905        return m_playbackModel->legibleMediaSelectionOptions();
     
    1051909uint64_t VideoFullscreenControllerContext::legibleMediaSelectedIndex() const
    1052910{
    1053 #if USE(WEB_THREAD)
    1054     ASSERT(isUIThread());
    1055 #endif
     911    ASSERT(isUIThread());
    1056912    return m_playbackModel ? m_playbackModel->legibleMediaSelectedIndex() : -1;
    1057913}
     
    1059915bool VideoFullscreenControllerContext::externalPlaybackEnabled() const
    1060916{
    1061 #if USE(WEB_THREAD)
    1062     ASSERT(isUIThread());
    1063 #endif
     917    ASSERT(isUIThread());
    1064918    return m_playbackModel ? m_playbackModel->externalPlaybackEnabled() : false;
    1065919}
     
    1067921PlaybackSessionModel::ExternalPlaybackTargetType VideoFullscreenControllerContext::externalPlaybackTargetType() const
    1068922{
    1069 #if USE(WEB_THREAD)
    1070     ASSERT(isUIThread());
    1071 #endif
     923    ASSERT(isUIThread());
    1072924    return m_playbackModel ? m_playbackModel->externalPlaybackTargetType() : TargetTypeNone;
    1073925}
     
    1075927String VideoFullscreenControllerContext::externalPlaybackLocalizedDeviceName() const
    1076928{
    1077 #if USE(WEB_THREAD)
    1078     ASSERT(isUIThread());
    1079 #endif
     929    ASSERT(isUIThread());
    1080930    return m_playbackModel ? m_playbackModel->externalPlaybackLocalizedDeviceName() : String();
    1081931}
     
    1083933bool VideoFullscreenControllerContext::wirelessVideoPlaybackDisabled() const
    1084934{
    1085 #if USE(WEB_THREAD)
    1086     ASSERT(isUIThread());
    1087 #endif
     935    ASSERT(isUIThread());
    1088936    return m_playbackModel ? m_playbackModel->wirelessVideoPlaybackDisabled() : true;
    1089937}
     
    1093941void VideoFullscreenControllerContext::setUpFullscreen(HTMLVideoElement& videoElement, UIView *view, HTMLMediaElementEnums::VideoFullscreenMode mode)
    1094942{
    1095 #if USE(WEB_THREAD)
    1096943    ASSERT(isMainThread());
    1097 #endif
    1098944    RetainPtr<UIView> viewRef = view;
    1099945    m_videoElement = &videoElement;
     
    1113959
    1114960    dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, videoElementClientRect, viewRef, mode, allowsPictureInPicture] {
    1115 #if USE(WEB_THREAD)
    1116961        ASSERT(isUIThread());
    1117 #endif
    1118962
    1119963        Ref<PlaybackSessionInterfaceAVKit> sessionInterface = PlaybackSessionInterfaceAVKit::create(*this);
     
    1131975void VideoFullscreenControllerContext::exitFullscreen()
    1132976{
    1133 #if USE(WEB_THREAD)
    1134977    ASSERT(WebThreadIsCurrent() || isMainThread());
    1135 #endif
    1136978    IntRect clientRect = elementRectInWindow(m_videoElement.get());
    1137979    dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, clientRect] {
    1138 #if USE(WEB_THREAD)
    1139980        ASSERT(isUIThread());
    1140 #endif
    1141981        m_interface->exitFullscreen(clientRect);
    1142982    });
     
    1145985void VideoFullscreenControllerContext::requestHideAndExitFullscreen()
    1146986{
    1147 #if USE(WEB_THREAD)
    1148     ASSERT(isUIThread());
    1149 #endif
     987    ASSERT(isUIThread());
    1150988    m_interface->requestHideAndExitFullscreen();
    1151989}
     
    11761014- (void)enterFullscreen:(UIView *)view mode:(HTMLMediaElementEnums::VideoFullscreenMode)mode
    11771015{
    1178 #if USE(WEB_THREAD)
    11791016    ASSERT(isMainThread());
    1180 #endif
    11811017    _context = VideoFullscreenControllerContext::create();
    11821018    _context->setController(self);
     
    11861022- (void)exitFullscreen
    11871023{
    1188 #if USE(WEB_THREAD)
    11891024    ASSERT(WebThreadIsCurrent() || isMainThread());
    1190 #endif
    11911025    _context->exitFullscreen();
    11921026}
     
    11941028- (void)requestHideAndExitFullscreen
    11951029{
    1196 #if USE(WEB_THREAD)
    1197     ASSERT(isUIThread());
    1198 #endif
     1030    ASSERT(isUIThread());
    11991031    if (_context)
    12001032        _context->requestHideAndExitFullscreen();
  • trunk/Source/WebCore/platform/ios/wak/WAKWindow.mm

    r240353 r240355  
    200200    _visible = visible;
    201201
    202 #if USE(WEB_THREAD)
    203202    WebThreadRun(^{
    204203        [[NSNotificationCenter defaultCenter] postNotificationName:WAKWindowVisibilityDidChangeNotification object:self userInfo:nil];
    205204    });
    206 #else
    207     [[NSNotificationCenter defaultCenter] postNotificationName:WAKWindowVisibilityDidChangeNotification object:self userInfo:nil];
    208 #endif
    209205}
    210206
     
    297293    _screenScale = scale;
    298294
    299 #if USE(WEB_THREAD)
    300295    WebThreadRun(^{
    301296        [[NSNotificationCenter defaultCenter] postNotificationName:WAKWindowScreenScaleDidChangeNotification object:self userInfo:nil];
    302297    });
    303 #else
    304     [[NSNotificationCenter defaultCenter] postNotificationName:WAKWindowScreenScaleDidChangeNotification object:self userInfo:nil];
    305 #endif
    306298}
    307299
     
    324316{
    325317    ASSERT(anEvent);
    326 #if USE(WEB_THREAD)
    327318    WebThreadRun(^{
    328319        [self sendEventSynchronously:anEvent];
    329320    });
    330 #else
    331     [self sendEventSynchronously:anEvent];
    332 #endif
    333321}
    334322
     
    371359- (void)sendMouseMoveEvent:(WebEvent *)anEvent contentChange:(WKContentChange *)aContentChange
    372360{
    373 #if USE(WEB_THREAD)
    374361    WebThreadRun(^{
    375 #endif
    376362        [self sendEvent:anEvent];
    377363
    378364        if (aContentChange)
    379365            *aContentChange = WKObservedContentChange();
    380 #if USE(WEB_THREAD)
    381366    });
    382 #endif
    383367}
    384368
  • trunk/Source/WebCore/platform/network/ios/NetworkStateNotifierIOS.mm

    r240353 r240355  
    8585        return;
    8686    m_observer = adoptNS([[WebNetworkStateObserver alloc] initWithBlock:^ {
    87 #if USE(WEB_THREAD)
    8887        WebThreadRun(^ {
    8988            NetworkStateNotifier::singleton().updateStateSoon();
    9089        });
    91 #else
    92         NetworkStateNotifier::singleton().updateStateSoon();
    93 #endif
    9490    }]);
    9591}
  • trunk/Source/WebCore/rendering/RenderThemeIOS.mm

    r240353 r240355  
    281281{
    282282    ASSERT_UNUSED(name, CFEqual(name, PAL::get_UIKit_UIContentSizeCategoryDidChangeNotification()));
    283 #if USE(WEB_THREAD)
    284283    WebThreadRun(^{
    285284        Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
    286285    });
    287 #else
    288     Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
    289 #endif
    290286}
    291287
  • trunk/Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm

    r240353 r240355  
    337337- (void)geolocationAuthorizationGranted
    338338{
    339 #if USE(WEB_THREAD)
    340339    WebThreadRun(^{
    341340        [_provider geolocationAuthorizationGranted];
    342341    });
    343 #else
    344     [_provider geolocationAuthorizationGranted];
    345 #endif
    346342}
    347343
    348344- (void)geolocationAuthorizationDenied
    349345{
    350 #if USE(WEB_THREAD)
    351346    WebThreadRun(^{
    352347        [_provider geolocationAuthorizationDenied];
    353348    });
    354 #else
    355     [_provider geolocationAuthorizationDenied];
    356 #endif
    357349}
    358350
     
    360352{
    361353    RetainPtr<WebGeolocationPosition> webPosition = adoptNS([[WebGeolocationPosition alloc] initWithGeolocationPosition:WTFMove(position)]);
    362 #if USE(WEB_THREAD)
    363354    WebThreadRun(^{
    364355        [_provider positionChanged:webPosition.get()];
    365356    });
    366 #else
    367     [_provider positionChanged:webPosition.get()];
    368 #endif
    369357}
    370358
    371359- (void)errorOccurred:(NSString *)errorMessage
    372360{
    373 #if USE(WEB_THREAD)
    374361    WebThreadRun(^{
    375362        [_provider errorOccurred:errorMessage];
    376363    });
    377 #else
    378     [_provider errorOccurred:errorMessage];
    379 #endif
    380364}
    381365
    382366- (void)resetGeolocation
    383367{
    384 #if USE(WEB_THREAD)
    385368    WebThreadRun(^{
    386369        [_provider resetGeolocation];
    387370    });
    388 #else
    389     [_provider resetGeolocation];
    390 #endif
    391371}
    392372@end
  • trunk/Source/WebKitLegacy/ios/WebCoreSupport/WebFixedPositionContent.mm

    r240353 r240355  
    165165- (void)didFinishScrollingOrZooming
    166166{
    167 #if USE(WEB_THREAD)
    168167    WebThreadRun(^{
    169168        if (Frame* frame = [_private->m_webView _mainCoreFrame])
    170169            frame->viewportOffsetChanged(Frame::CompletedScrollOffset);
    171170    });
    172 #else
    173     if (Frame* frame = [_private->m_webView _mainCoreFrame])
    174         frame->viewportOffsetChanged(Frame::CompletedScrollOffset);
    175 #endif
    176171}
    177172
  • trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm

    r240353 r240355  
    140140    // schedule this method on the WebThread as well so as to pick up all the
    141141    // dead resources left behind after closing the WebViews
    142 #if USE(WEB_THREAD)
    143142    WebThreadRun(^{
    144 #endif
    145143        WebKit::MemoryMeasure measurer("[WebCache emptyInMemoryResources]");
    146144
     
    151149
    152150        WebCore::MemoryCache::singleton().pruneLiveResources(true);
    153 #if USE(WEB_THREAD)
    154151    });
    155 #endif
    156152}
    157153
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r240353 r240355  
    24552455    if (_appLinkURL && _frame) {
    24562456        [LSAppLink openWithURL:_appLinkURL.get() completionHandler:^(BOOL success, NSError *) {
    2457 #if USE(WEB_THREAD)
    24582457            WebThreadRun(^{
    2459 #endif
    24602458                if (success)
    24612459                    [self receivedPolicyDecision:PolicyAction::Ignore];
    24622460                else
    24632461                    [self receivedPolicyDecision:PolicyAction::Use];
    2464 #if USE(WEB_THREAD)
    24652462            });
    2466 #endif
    24672463        }];
    24682464        return;
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebGeolocationClient.mm

    r240353 r240355  
    175175- (void)allow
    176176{
    177 #if USE(WEB_THREAD)
    178177    WebThreadRun(^{
    179178        _geolocation->setIsAllowed(true);
    180179    });
    181 #else
    182     _geolocation->setIsAllowed(true);
    183 #endif
    184180}
    185181
    186182- (void)deny
    187183{
    188 #if USE(WEB_THREAD)
    189184    WebThreadRun(^{
    190185        _geolocation->setIsAllowed(false);
    191186    });
    192 #else
    193     _geolocation->setIsAllowed(false);
    194 #endif
    195187}
    196188
    197189- (void)denyOnlyThisRequest
    198190{
    199 #if USE(WEB_THREAD)
    200191    WebThreadRun(^{
    201 #endif
    202192        // A soft deny does not prevent subsequent request from the Geolocation object.
    203193        [self deny];
    204194        _geolocation->resetIsAllowed();
    205 #if USE(WEB_THREAD)
    206195    });
    207 #endif
    208196}
    209197
  • trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm

    r240353 r240355  
    12971297- (void)deviceOrientationChanged
    12981298{
    1299 #if USE(WEB_THREAD)
    13001299    WebThreadRun(^{
    1301 #endif
    13021300#if ENABLE(ORIENTATION_EVENTS)
    13031301        WebView *webView = getWebView(self);
     
    13061304        if (WebCore::Frame* frame = core(self))
    13071305            frame->orientationChanged();
    1308 #if USE(WEB_THREAD)
    13091306    });
    1310 #endif
    13111307}
    13121308
  • trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm

    r240353 r240355  
    821821{
    822822    ASSERT(observer);
    823 #if USE(WEB_THREAD)
    824823    WebThreadRun(^{
    825 #endif
    826824        WebHTMLView *webView = (__bridge WebHTMLView *)observer;
    827825        if (Frame* coreFrame = core([webView _frame]))
    828826            coreFrame->eventHandler().capsLockStateMayHaveChanged();
    829 #if USE(WEB_THREAD)
    830827    });
    831 #endif
    832828}
    833829#endif
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r240353 r240355  
    17841784+ (void)_releaseMemoryNow
    17851785{
    1786 #if USE(WEB_THREAD)
    17871786    WebThreadRun(^{
    17881787        WebCore::releaseMemory(Critical::Yes, Synchronous::Yes);
    17891788    });
    1790 #else
    1791     WebCore::releaseMemory(Critical::Yes, Synchronous::Yes);
    1792 #endif
    17931789}
    17941790
     
    18021798+ (void)willEnterBackgroundWithCompletionHandler:(void(^)(void))handler
    18031799{
    1804 #if USE(WEB_THREAD)
    18051800    WebThreadRun(^{
    1806 #endif
    18071801        [WebView _releaseMemoryNow];
    18081802        dispatch_async(dispatch_get_main_queue(), handler);
    1809 #if USE(WEB_THREAD)
    18101803    });
    1811 #endif
    18121804}
    18131805
     
    18191811- (void)updateLayoutIgnorePendingStyleSheets
    18201812{
    1821 #if USE(WEB_THREAD)
    18221813    WebThreadRun(^{
    1823 #endif
    18241814        for (Frame* frame = [self _mainCoreFrame]; frame; frame = frame->tree().traverseNext()) {
    18251815            Document *document = frame->document();
     
    18271817                document->updateLayoutIgnorePendingStylesheets();
    18281818        }
    1829 #if USE(WEB_THREAD)
    18301819    });
    1831 #endif
    18321820}
    18331821#endif
     
    21682156- (void)_dispatchUnloadEvent
    21692157{
    2170 #if USE(WEB_THREAD)
    21712158    WebThreadRun(^{
    2172 #endif
    21732159        WebFrame *mainFrame = [self mainFrame];
    21742160        Frame *coreMainFrame = core(mainFrame);
     
    21782164                document->dispatchWindowEvent(Event::create(eventNames().unloadEvent, Event::CanBubble::No, Event::IsCancelable::No));
    21792165        }
    2180 #if USE(WEB_THREAD)
    21812166    });
    2182 #endif
    21832167}
    21842168
     
    23292313    [self _clearDelegates];
    23302314
    2331 #if USE(WEB_THREAD)
    23322315    // Fix for problems such as <rdar://problem/5774587> Crash closing tab in WebCore::Frame::page() from -[WebCoreFrameBridge pauseTimeouts]
    23332316    WebThreadRun(^{
    2334 #endif
    23352317#endif           
    23362318
     
    24382420    }
    24392421#endif
    2440 #if PLATFORM(IOS_FAMILY) && USE(WEB_THREAD)
     2422#if PLATFORM(IOS_FAMILY)
    24412423    // Fix for problems such as <rdar://problem/5774587> Crash closing tab in WebCore::Frame::page() from -[WebCoreFrameBridge pauseTimeouts]
    24422424    });
     
    28112793#if PLATFORM(IOS_FAMILY)
    28122794    } else {
    2813 #if USE(WEB_THREAD)
    28142795        WebThreadRun(^{
    2815 #endif
    28162796            // It is possible that the prefs object has already changed before the invocation could be called
    28172797            // on the web thread. This is not possible on TOT which is why they have a simple ASSERT.
     
    28202800                return;
    28212801            [self _preferencesChanged:preferences];
    2822 #if USE(WEB_THREAD)
    28232802        });
    2824 #endif
    28252803    }
    28262804#endif
     
    43824360    if (!synchronize)
    43834361        return;
    4384 
    4385 #if USE(WEB_THREAD)
    43864362    WebThreadRun(^{
    43874363        [self _synchronizeCustomFixedPositionLayoutRect];
    43884364    });
    4389 #else
    4390     [self _synchronizeCustomFixedPositionLayoutRect];
    4391 #endif
    43924365}
    43934366
     
    64696442        return NO;
    64706443   
    6471 #if USE(WEB_THREAD)
     6444#if PLATFORM(IOS_FAMILY)
    64726445    if (WebThreadIsCurrent() || !WebThreadIsEnabled())
    64736446#endif
    64746447    return _private->page->backForward().goBack();
    6475 #if USE(WEB_THREAD)
     6448#if PLATFORM(IOS_FAMILY)
    64766449    WebThreadRun(^{
    64776450        _private->page->backForward().goBack();
     
    64876460        return NO;
    64886461
    6489 #if USE(WEB_THREAD)
     6462#if PLATFORM(IOS_FAMILY)
    64906463    if (WebThreadIsCurrent() || !WebThreadIsEnabled())
    64916464#endif
    64926465    return _private->page->backForward().goForward();
    6493 #if USE(WEB_THREAD)
     6466#if PLATFORM(IOS_FAMILY)
    64946467    WebThreadRun(^{
    64956468        _private->page->backForward().goForward();
     
    74427415+ (void)_cacheModelChangedNotification:(NSNotification *)notification
    74437416{
    7444 #if USE(WEB_THREAD)
     7417#if PLATFORM(IOS_FAMILY)
    74457418    // This needs to happen on the Web Thread
    74467419    WebThreadRun(^{
     
    74547427    else if (cacheModel < [self _cacheModel])
    74557428        [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
    7456 #if USE(WEB_THREAD)
     7429#if PLATFORM(IOS_FAMILY)
    74577430    });
    74587431#endif
     
    76017574- (IBAction)stopLoading:(id)sender
    76027575{
    7603 #if USE(WEB_THREAD)
     7576#if PLATFORM(IOS_FAMILY)
    76047577    if (WebThreadNotCurrent()) {
    76057578        _private->isStopping = true;
     
    76107583#endif
    76117584    [[self mainFrame] stopLoading];
    7612 #if USE(WEB_THREAD)
     7585#if PLATFORM(IOS_FAMILY)
    76137586    });
    76147587#endif
     
    76187591- (void)stopLoadingAndClear
    76197592{
    7620 #if USE(WEB_THREAD)
    76217593    if (WebThreadNotCurrent() && !WebThreadIsLocked()) {
    76227594        _private->isStopping = true;
     
    76247596    }
    76257597    WebThreadRun(^{
    7626 #endif
    76277598        _private->isStopping = false;
    76287599
     
    76397610        [plainWhiteView setNeedsDisplay:YES];
    76407611        [plainWhiteView release];
    7641 #if USE(WEB_THREAD)
    76427612    });
    7643 #endif
    76447613}
    76457614#endif
     
    76477616- (IBAction)reload:(id)sender
    76487617{
    7649 #if USE(WEB_THREAD)
     7618#if PLATFORM(IOS_FAMILY)
    76507619    WebThreadRun(^{
    76517620#endif           
    76527621    [[self mainFrame] reload];
    7653 #if USE(WEB_THREAD)
     7622#if PLATFORM(IOS_FAMILY)
    76547623    });
    76557624#endif           
     
    1031110280            auto& memoryPressureHandler = MemoryPressureHandler::singleton();
    1031210281            memoryPressureHandler.setLowMemoryHandler([] (Critical critical, Synchronous synchronous) {
    10313 #if USE(WEB_THREAD)
     10282#if PLATFORM(IOS_FAMILY)
    1031410283                WebThreadRun(^{
    1031510284#endif
    1031610285                WebCore::releaseMemory(critical, synchronous);
    10317 #if USE(WEB_THREAD)
     10286#if PLATFORM(IOS_FAMILY)
    1031810287                });
    1031910288#endif
Note: See TracChangeset for help on using the changeset viewer.