Changeset 250556 in webkit


Ignore:
Timestamp:
Oct 1, 2019, 8:59:36 AM (6 years ago)
Author:
achristensen@apple.com
Message:

Fix internal build after r250549
https://bugs.webkit.org/show_bug.cgi?id=202390

Remove some more "using namespace WebCore"

  • History/WebBackForwardList.mm:

(-[WebBackForwardList dictionaryRepresentation]):
(vectorToNSArray):
(-[WebBackForwardList backListWithLimit:]):
(-[WebBackForwardList forwardListWithLimit:]):
(-[WebBackForwardList description]):
(-[WebBackForwardList pageCacheSize]):

  • Misc/WebSharingServicePickerController.mm:

(WebSharingServicePickerClient::pageForSharingServicePicker):
(WebSharingServicePickerClient::screenRectForCurrentSharingServicePickerItem):
(-[WebSharingServicePickerController didShareImageData:confirmDataIsValidTIFFData:]):
(-[WebSharingServicePickerController sharingService:didShareItems:]):

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage getPluginInfoFromPLists]):
(-[WebBasePluginPackage pluginInfo]):

  • Plugins/WebPluginContainerCheck.mm:

(-[WebPluginContainerCheck _continueWithPolicy:]):
(-[WebPluginContainerCheck _isForbiddenFileLoad]):

  • Plugins/WebPluginController.mm:

(initializeAudioSession):
(-[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
(-[WebPluginController superlayerForPluginView:]):
(-[WebPluginController stopOnePlugin:]):
(-[WebPluginController stopOnePluginForPageCache:]):
(-[WebPluginController destroyOnePlugin:]):
(-[WebPluginController startAllPlugins]):
(-[WebPluginController addPlugin:]):
(-[WebPluginController destroyPlugin:]):
(-[WebPluginController destroyAllPlugins]):
(-[WebPluginController processingUserGesture]):
(-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
(-[WebPluginController webPlugInContainerSelectionColor]):

  • Plugins/WebPluginDatabase.mm:

(-[WebPluginDatabase refresh]):
(-[WebPluginDatabase _removePlugin:]):

  • WebCoreSupport/WebApplicationCache.mm:

(+[WebApplicationCache initializeWithBundleIdentifier:]):
(webApplicationCacheStorage):

  • WebCoreSupport/WebApplicationCacheQuotaManager.mm:
Location:
trunk/Source/WebKitLegacy/mac
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r250550 r250556  
     12019-10-01  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix internal build after r250549
     4        https://bugs.webkit.org/show_bug.cgi?id=202390
     5
     6        Remove some more "using namespace WebCore"
     7
     8        * History/WebBackForwardList.mm:
     9        (-[WebBackForwardList dictionaryRepresentation]):
     10        (vectorToNSArray):
     11        (-[WebBackForwardList backListWithLimit:]):
     12        (-[WebBackForwardList forwardListWithLimit:]):
     13        (-[WebBackForwardList description]):
     14        (-[WebBackForwardList pageCacheSize]):
     15        * Misc/WebSharingServicePickerController.mm:
     16        (WebSharingServicePickerClient::pageForSharingServicePicker):
     17        (WebSharingServicePickerClient::screenRectForCurrentSharingServicePickerItem):
     18        (-[WebSharingServicePickerController didShareImageData:confirmDataIsValidTIFFData:]):
     19        (-[WebSharingServicePickerController sharingService:didShareItems:]):
     20        * Plugins/WebBasePluginPackage.mm:
     21        (-[WebBasePluginPackage getPluginInfoFromPLists]):
     22        (-[WebBasePluginPackage pluginInfo]):
     23        * Plugins/WebPluginContainerCheck.mm:
     24        (-[WebPluginContainerCheck _continueWithPolicy:]):
     25        (-[WebPluginContainerCheck _isForbiddenFileLoad]):
     26        * Plugins/WebPluginController.mm:
     27        (initializeAudioSession):
     28        (-[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
     29        (-[WebPluginController superlayerForPluginView:]):
     30        (-[WebPluginController stopOnePlugin:]):
     31        (-[WebPluginController stopOnePluginForPageCache:]):
     32        (-[WebPluginController destroyOnePlugin:]):
     33        (-[WebPluginController startAllPlugins]):
     34        (-[WebPluginController addPlugin:]):
     35        (-[WebPluginController destroyPlugin:]):
     36        (-[WebPluginController destroyAllPlugins]):
     37        (-[WebPluginController processingUserGesture]):
     38        (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
     39        (-[WebPluginController webPlugInContainerSelectionColor]):
     40        * Plugins/WebPluginDatabase.mm:
     41        (-[WebPluginDatabase refresh]):
     42        (-[WebPluginDatabase _removePlugin:]):
     43        * WebCoreSupport/WebApplicationCache.mm:
     44        (+[WebApplicationCache initializeWithBundleIdentifier:]):
     45        (webApplicationCacheStorage):
     46        * WebCoreSupport/WebApplicationCacheQuotaManager.mm:
     47
    1482019-09-30  Alex Christensen  <achristensen@webkit.org>
    249
  • trunk/Source/WebKitLegacy/mac/History/WebBackForwardList.mm

    r237266 r250556  
    5252#import <wtf/StdLibExtras.h>
    5353
    54 using namespace WebCore;
    55 
    5654typedef HashMap<BackForwardList*, WebBackForwardList*> BackForwardListMap;
    5755
     
    167165    NSMutableArray *entriesArray = [[NSMutableArray alloc] initWithCapacity:size];
    168166    for (unsigned i = 0; i < size; ++i)
    169         [entriesArray addObject:[kit(const_cast<HistoryItem*>(historyItems[i].ptr())) dictionaryRepresentationIncludingChildren:NO]];
     167        [entriesArray addObject:[kit(const_cast<WebCore::HistoryItem*>(historyItems[i].ptr())) dictionaryRepresentationIncludingChildren:NO]];
    170168   
    171169    NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
     
    239237}
    240238
    241 static NSArray* vectorToNSArray(Vector<Ref<HistoryItem>>& list)
     239static NSArray* vectorToNSArray(Vector<Ref<WebCore::HistoryItem>>& list)
    242240{
    243241    unsigned size = list.size();
     
    263261- (NSArray *)backListWithLimit:(int)limit
    264262{
    265     Vector<Ref<HistoryItem>> list;
     263    Vector<Ref<WebCore::HistoryItem>> list;
    266264    core(self)->backListWithLimit(limit, list);
    267265    NSArray *result = vectorToNSArray(list);
     
    278276- (NSArray *)forwardListWithLimit:(int)limit
    279277{
    280     Vector<Ref<HistoryItem>> list;
     278    Vector<Ref<WebCore::HistoryItem>> list;
    281279    core(self)->forwardListWithLimit(limit, list);
    282280    NSArray *result = vectorToNSArray(list);
     
    322320        [result appendFormat:@"%2d) ", i];
    323321        int currPos = [result length];
    324         [result appendString:[kit(const_cast<HistoryItem*>(entries[i].ptr())) description]];
     322        [result appendString:[kit(const_cast<WebCore::HistoryItem*>(entries[i].ptr())) description]];
    325323
    326324        // shift all the contents over.  a bit slow, but this is for debugging
     
    343341- (NSUInteger)pageCacheSize
    344342{
    345     return [core(self)->webView() usesPageCache] ? PageCache::singleton().maxSize() : 0;
     343    return [core(self)->webView() usesPageCache] ? WebCore::PageCache::singleton().maxSize() : 0;
    346344}
    347345
  • trunk/Source/WebKitLegacy/mac/Misc/WebSharingServicePickerController.mm

    r248498 r250556  
    4141static NSString *serviceControlsPasteboardName = @"WebKitServiceControlsPasteboard";
    4242
    43 using namespace WebCore;
    44 
    4543WebSharingServicePickerClient::WebSharingServicePickerClient(WebView *webView)
    4644    : m_webView(webView)
     
    5250}
    5351
    54 Page* WebSharingServicePickerClient::pageForSharingServicePicker(WebSharingServicePickerController &)
     52WebCore::Page* WebSharingServicePickerClient::pageForSharingServicePicker(WebSharingServicePickerController &)
    5553{
    5654    return [m_webView page];
     
    6260}
    6361
    64 FloatRect WebSharingServicePickerClient::screenRectForCurrentSharingServicePickerItem(WebSharingServicePickerController &)
    65 {
    66     return FloatRect();
     62WebCore::FloatRect WebSharingServicePickerClient::screenRectForCurrentSharingServicePickerItem(WebSharingServicePickerController &)
     63{
     64    return WebCore::FloatRect();
    6765}
    6866
     
    126124- (void)didShareImageData:(NSData *)data confirmDataIsValidTIFFData:(BOOL)confirmData
    127125{
    128     Page* page = _pickerClient->pageForSharingServicePicker(*self);
     126    auto* page = _pickerClient->pageForSharingServicePicker(*self);
    129127    if (!page)
    130128        return;
     
    144142    [pasteboard setData:data forType:NSPasteboardTypeTIFF];
    145143
    146     if (Node* node = page->contextMenuController().context().hitTestResult().innerNode()) {
    147         if (Frame* frame = node->document().frame())
     144    if (auto* node = page->contextMenuController().context().hitTestResult().innerNode()) {
     145        if (auto* frame = node->document().frame())
    148146            frame->editor().replaceNodeFromPasteboard(node, serviceControlsPasteboardName);
    149147    }
     
    217215    }
    218216    else if ([item isKindOfClass:[NSAttributedString class]]) {
    219         Frame& frame = _pickerClient->pageForSharingServicePicker(*self)->focusController().focusedOrMainFrame();
     217        auto& frame = _pickerClient->pageForSharingServicePicker(*self)->focusController().focusedOrMainFrame();
    220218        frame.editor().replaceSelectionWithAttributedString(item);
    221219    } else
  • trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm

    r238074 r250556  
    5656@end;
    5757
    58 using namespace WebCore;
    59 
    6058@implementation WebBasePluginPackage
    6159
     
    156154            continue;
    157155
    158         MimeClassInfo mimeClassInfo;
     156        WebCore::MimeClassInfo mimeClassInfo;
    159157       
    160158        NSArray *extensions = [[MIMEDictionary objectForKey:WebPluginExtensionsKey] _web_lowercaseStrings];
     
    187185
    188186    pluginInfo.isApplicationPlugin = false;
    189     pluginInfo.clientLoadPolicy = PluginLoadClientPolicyUndefined;
     187    pluginInfo.clientLoadPolicy = WebCore::PluginLoadClientPolicyUndefined;
    190188#if PLATFORM(MAC)
    191189    pluginInfo.bundleIdentifier = self.bundleIdentifier;
     
    217215}
    218216
    219 - (const PluginInfo&)pluginInfo
     217- (const WebCore::PluginInfo&)pluginInfo
    220218{
    221219    return pluginInfo;
  • trunk/Source/WebKitLegacy/mac/Plugins/WebPluginContainerCheck.mm

    r238074 r250556  
    4646#import <wtf/ObjCRuntimeExtras.h>
    4747
    48 using namespace WebCore;
    49 
    5048#if PLATFORM(IOS_FAMILY)
    5149@interface WebPluginController (SecretsIKnow)
     
    8583}
    8684
    87 - (void)_continueWithPolicy:(PolicyAction)policy
     85- (void)_continueWithPolicy:(WebCore::PolicyAction)policy
    8886{
    8987    if (_contextInfo)
    90         wtfObjCMsgSend<void>(_resultObject, _resultSelector, (policy == PolicyAction::Use), _contextInfo);
     88        wtfObjCMsgSend<void>(_resultObject, _resultSelector, (policy == WebCore::PolicyAction::Use), _contextInfo);
    9189    else     
    92         wtfObjCMsgSend<void>(_resultObject, _resultSelector, (policy == PolicyAction::Use));
     90        wtfObjCMsgSend<void>(_resultObject, _resultSelector, (policy == WebCore::PolicyAction::Use));
    9391
    9492    // this will call indirectly call cancel
     
    9896- (BOOL)_isForbiddenFileLoad
    9997{
    100     Frame* coreFrame = core([_controller webFrame]);
     98    auto* coreFrame = core([_controller webFrame]);
    10199    ASSERT(coreFrame);
    102100    if (!coreFrame->document()->securityOrigin().canDisplay([_request URL])) {
    103         [self _continueWithPolicy:PolicyAction::Ignore];
     101        [self _continueWithPolicy:WebCore::PolicyAction::Ignore];
    104102        return YES;
    105103    }
  • trunk/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm

    r244223 r250556  
    7575#endif
    7676
    77 using namespace WebCore;
    78 using namespace HTMLNames;
    79 
    8077@interface NSView (PluginSecrets)
    8178- (void)setContainingWindow:(NSWindow *)w;
     
    115112        return;
    116113
    117     AudioSession::sharedSession().setCategory(AudioSession::MediaPlayback, RouteSharingPolicy::Default);
     114    WebCore::AudioSession::sharedSession().setCategory(WebCore::AudioSession::MediaPlayback, WebCore::RouteSharingPolicy::Default);
    118115}
    119116#endif
     
    134131    {
    135132        WebView *webView = [_documentView _webView];
    136         JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     133        JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    137134        view = [[webView _UIKitDelegateForwarder] webView:webView plugInViewWithArguments:arguments fromPlugInPackage:pluginPackage];
    138135    }
     
    140137    Class viewFactory = [pluginPackage viewFactory];
    141138    if ([viewFactory respondsToSelector:@selector(plugInViewWithArguments:)]) {
    142         JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     139        JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    143140        view = [viewFactory plugInViewWithArguments:arguments];
    144141    } else if ([viewFactory respondsToSelector:@selector(pluginViewWithArguments:)]) {
    145         JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     142        JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    146143        view = [viewFactory pluginViewWithArguments:arguments];
    147144    }
     
    209206- (CALayer *)superlayerForPluginView:(NSView *)view
    210207{
    211     Frame* coreFrame = core([self webFrame]);
    212     FrameView* coreView = coreFrame ? coreFrame->view() : nullptr;
     208    auto* coreFrame = core([self webFrame]);
     209    auto* coreView = coreFrame ? coreFrame->view() : nullptr;
    213210    if (!coreView)
    214211        return nil;
    215212
    216213    // Get a GraphicsLayer;
    217     GraphicsLayer* layerForWidget = coreView->graphicsLayerForPlatformWidget(view);
     214    WebCore::GraphicsLayer* layerForWidget = coreView->graphicsLayerForPlatformWidget(view);
    218215    if (!layerForWidget)
    219216        return nil;
     
    226223{
    227224    if ([view respondsToSelector:@selector(webPlugInStop)]) {
    228         JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     225        JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    229226        [view webPlugInStop];
    230227    } else if ([view respondsToSelector:@selector(pluginStop)]) {
    231         JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     228        JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    232229        [view pluginStop];
    233230    }
     
    238235{
    239236    if ([view respondsToSelector:@selector(webPlugInStopForPageCache)]) {
    240         JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     237        JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    241238        [view webPlugInStopForPageCache];
    242239    } else
     
    248245{
    249246    if ([view respondsToSelector:@selector(webPlugInDestroy)]) {
    250         JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     247        JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    251248        [view webPlugInDestroy];
    252249    } else if ([view respondsToSelector:@selector(pluginDestroy)]) {
    253         JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     250        JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    254251        [view pluginDestroy];
    255252    }
     
    268265        id aView = [_views objectAtIndex:i];
    269266        if ([aView respondsToSelector:@selector(webPlugInStart)]) {
    270             JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     267            JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    271268            [aView webPlugInStart];
    272269        } else if ([aView respondsToSelector:@selector(pluginStart)]) {
    273             JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     270            JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    274271            [aView pluginStart];
    275272        }
     
    347344        LOG(Plugins, "initializing plug-in %@", view);
    348345        if ([view respondsToSelector:@selector(webPlugInInitialize)]) {
    349             JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     346            JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    350347            [view webPlugInInitialize];
    351348        } else if ([view respondsToSelector:@selector(pluginInitialize)]) {
    352             JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     349            JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    353350            [view pluginInitialize];
    354351        }
     
    362359            LOG(Plugins, "starting plug-in %@", view);
    363360            if ([view respondsToSelector:@selector(webPlugInStart)]) {
    364                 JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     361                JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    365362                [view webPlugInStart];
    366363            } else if ([view respondsToSelector:@selector(pluginStart)]) {
    367                 JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     364                JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    368365                [view pluginStart];
    369366            }
    370367           
    371368            if ([view respondsToSelector:@selector(setContainingWindow:)]) {
    372                 JSC::JSLock::DropAllLocks dropAllLocks(commonVM());
     369                JSC::JSLock::DropAllLocks dropAllLocks(WebCore::commonVM());
    373370                [view setContainingWindow:[_documentView window]];
    374371            }
     
    385382
    386383#if ENABLE(NETSCAPE_PLUGIN_API)
    387         if (Frame* frame = core([self webFrame]))
     384        if (auto* frame = core([self webFrame]))
    388385            frame->script().cleanupScriptObjectsForPlugin(self);
    389386#endif
     
    433430       
    434431#if ENABLE(NETSCAPE_PLUGIN_API)
    435         if (Frame* frame = core([self webFrame]))
     432        if (auto* frame = core([self webFrame]))
    436433            frame->script().cleanupScriptObjectsForPlugin(self);
    437434#endif
     
    457454- (BOOL)processingUserGesture
    458455{
    459     return UserGestureIndicator::processingUserGesture();
     456    return WebCore::UserGestureIndicator::processingUserGesture();
    460457}
    461458#endif
     
    500497            return;
    501498        }
    502         FrameLoadRequest frameLoadRequest { *core(frame), request, ShouldOpenExternalURLsPolicy::ShouldNotAllow };
     499        WebCore::FrameLoadRequest frameLoadRequest { *core(frame), request, WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow };
    503500        frameLoadRequest.setFrameName(target);
    504501        frameLoadRequest.setShouldCheckNewWindowPolicy(true);
     
    540537{
    541538    bool primary = true;
    542     if (Frame* frame = core([self webFrame]))
     539    if (auto* frame = core([self webFrame]))
    543540        primary = frame->selection().isFocusedAndActive();
    544541    return primary ? [NSColor selectedTextBackgroundColor] : [NSColor secondarySelectedControlColor];
  • trunk/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm

    r237266 r250556  
    5050#endif
    5151
    52 using namespace WebCore;
    53 
    5452static void checkCandidate(WebBasePluginPackage **currentPlugin, WebBasePluginPackage **candidatePlugin);
    5553
     
    293291        pluginEnumerator = [plugins objectEnumerator];
    294292        while ((plugin = [pluginEnumerator nextObject])) {
    295             const PluginInfo& pluginInfo = [plugin pluginInfo];
     293            const auto& pluginInfo = [plugin pluginInfo];
    296294            for (size_t i = 0; i < pluginInfo.mimes.size(); ++i)
    297295                [MIMETypes addObject:pluginInfo.mimes[i].type];
     
    441439
    442440    // Unregister plug-in's MIME type registrations
    443     const PluginInfo& pluginInfo = [plugin pluginInfo];
     441    const auto& pluginInfo = [plugin pluginInfo];
    444442    for (size_t i = 0; i < pluginInfo.mimes.size(); ++i) {
    445443        NSString *MIMEType = pluginInfo.mimes[i].type;
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebApplicationCache.mm

    r237266 r250556  
    3939#endif
    4040
    41 using namespace WebCore;
    42 
    4341@implementation WebApplicationCache
    4442
     
    5553        return;
    5654
    57     SQLiteDatabaseTracker::setClient(&WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient());
     55    WebCore::SQLiteDatabaseTracker::setClient(&WebCore::WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient());
    5856
    5957    ASSERT(!overrideBundleIdentifier);
     
    140138WebCore::ApplicationCacheStorage& webApplicationCacheStorage()
    141139{
    142     static ApplicationCacheStorage& storage = ApplicationCacheStorage::create(applicationCachePath(), "ApplicationCache").leakRef();
     140    static WebCore::ApplicationCacheStorage& storage = WebCore::ApplicationCacheStorage::create(applicationCachePath(), "ApplicationCache").leakRef();
    143141
    144142    return storage;
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm

    r211033 r250556  
    2929#import "WebSecurityOriginInternal.h"
    3030#import <WebCore/ApplicationCacheStorage.h>
    31 
    32 using namespace WebCore;
    3331
    3432@implementation WebApplicationCacheQuotaManager
Note: See TracChangeset for help on using the changeset viewer.