Changeset 238546 in webkit


Ignore:
Timestamp:
Nov 27, 2018 12:59:00 AM (5 years ago)
Author:
Fujii Hironori
Message:

Remove "using namespace WebCore" under Source/WebKit/WebProcess/InjectedBundle/API
https://bugs.webkit.org/show_bug.cgi?id=191995

Reviewed by Alex Christensen.

The statement "using namespace WebCore" should be placed inside
namespace WebKit for unified source builds. But, source files
defining WebKit API can't be enclosed by namespace WebKit { }
becuase they are defined in the global scope.

"using namespace WebCore" in global scope and unified source
builds may cause build breaks (Bug 191853).

Remove "using namespace WebCore" in the global scope. Use
"WebCore::" prefix instead.

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleClearAllDatabases):
(WKBundleSetDatabaseQuota):
(WKBundleClearResourceLoadStatistics):
(WKBundleResourceLoadStatisticsNotifyObserver):

  • WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:

(WKBundleFrameGetFrameLoadState):
(WKBundleFrameClearOpener):
(WKBundleFrameCallShouldCloseOnWebView):
(WKBundleFrameCopySecurityOrigin):
(WKBundleFrameFocus):

  • WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
  • WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
Location:
trunk/Source/WebKit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r238544 r238546  
     12018-11-27  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Remove "using namespace WebCore" under Source/WebKit/WebProcess/InjectedBundle/API
     4        https://bugs.webkit.org/show_bug.cgi?id=191995
     5
     6        Reviewed by Alex Christensen.
     7
     8        The statement "using namespace WebCore" should be placed inside
     9        namespace WebKit for unified source builds. But, source files
     10        defining WebKit API can't be enclosed by namespace WebKit { }
     11        becuase they are defined in the global scope.
     12
     13        "using namespace WebCore" in global scope and unified source
     14        builds may cause build breaks (Bug 191853).
     15
     16        Remove "using namespace WebCore" in the global scope. Use
     17        "WebCore::" prefix instead.
     18
     19        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     20        (WKBundleClearAllDatabases):
     21        (WKBundleSetDatabaseQuota):
     22        (WKBundleClearResourceLoadStatistics):
     23        (WKBundleResourceLoadStatisticsNotifyObserver):
     24        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
     25        (WKBundleFrameGetFrameLoadState):
     26        (WKBundleFrameClearOpener):
     27        (WKBundleFrameCallShouldCloseOnWebView):
     28        (WKBundleFrameCopySecurityOrigin):
     29        (WKBundleFrameFocus):
     30        * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
     31        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
     32
    1332018-11-26  Wenson Hsieh  <wenson_hsieh@apple.com>
    234
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r235851 r238546  
    4949#include <WebCore/ServiceWorkerThreadProxy.h>
    5050
    51 using namespace WebCore;
    5251using namespace WebKit;
    5352
     
    251250void WKBundleClearAllDatabases(WKBundleRef)
    252251{
    253     DatabaseTracker::singleton().deleteAllDatabasesImmediately();
     252    WebCore::DatabaseTracker::singleton().deleteAllDatabasesImmediately();
    254253}
    255254
     
    257256{
    258257    // Historically, we've used the following (somewhat nonsensical) string for the databaseIdentifier of local files.
    259     DatabaseTracker::singleton().setQuota(*SecurityOriginData::fromDatabaseIdentifier("file__0"), quota);
     258    WebCore::DatabaseTracker::singleton().setQuota(*SecurityOriginData::fromDatabaseIdentifier("file__0"), quota);
    260259}
    261260
     
    322321void WKBundleClearResourceLoadStatistics(WKBundleRef)
    323322{
    324     ResourceLoadObserver::shared().clearState();
     323    WebCore::ResourceLoadObserver::shared().clearState();
    325324}
    326325
    327326void WKBundleResourceLoadStatisticsNotifyObserver(WKBundleRef)
    328327{
    329     ResourceLoadObserver::shared().notifyObserver();
     328    WebCore::ResourceLoadObserver::shared().notifyObserver();
    330329}
    331330
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp

    r236930 r238546  
    4646#include <WebCore/Page.h>
    4747
    48 using namespace WebCore;
    4948using namespace WebKit;
    5049
     
    7675WKFrameLoadState WKBundleFrameGetFrameLoadState(WKBundleFrameRef frameRef)
    7776{
    78     Frame* coreFrame = toImpl(frameRef)->coreFrame();
     77    WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
    7978    if (!coreFrame)
    8079        return kWKFrameLoadStateFinished;
    8180
    8281    switch (coreFrame->loader().state()) {
    83     case FrameStateProvisional:
     82    case WebCore::FrameStateProvisional:
    8483        return kWKFrameLoadStateProvisional;
    85     case FrameStateCommittedPage:
     84    case WebCore::FrameStateCommittedPage:
    8685        return kWKFrameLoadStateCommitted;
    87     case FrameStateComplete:
     86    case WebCore::FrameStateComplete:
    8887        return kWKFrameLoadStateFinished;
    8988    }
     
    150149void WKBundleFrameClearOpener(WKBundleFrameRef frameRef)
    151150{
    152     Frame* coreFrame = toImpl(frameRef)->coreFrame();
     151    WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
    153152    if (coreFrame)
    154153        coreFrame->loader().setOpener(0);
     
    262261bool WKBundleFrameCallShouldCloseOnWebView(WKBundleFrameRef frameRef)
    263262{
    264     Frame* coreFrame = toImpl(frameRef)->coreFrame();
     263    WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
    265264    if (!coreFrame)
    266265        return true;
     
    276275WKSecurityOriginRef WKBundleFrameCopySecurityOrigin(WKBundleFrameRef frameRef)
    277276{
    278     Frame* coreFrame = toImpl(frameRef)->coreFrame();
     277    WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
    279278    if (!coreFrame)
    280279        return 0;
     
    285284void WKBundleFrameFocus(WKBundleFrameRef frameRef)
    286285{
    287     Frame* coreFrame = toImpl(frameRef)->coreFrame();
     286    WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
    288287    if (!coreFrame)
    289288        return;
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp

    r201101 r238546  
    3131#include "WebInspector.h"
    3232
    33 using namespace WebCore;
    3433using namespace WebKit;
    3534
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp

    r231387 r238546  
    5454}
    5555
    56 using namespace WebCore;
    5756using namespace WebKit;
    5857
     
    8786    }
    8887
    89     void drawRect(WebPageOverlay& pageOverlay, GraphicsContext& graphicsContext, const IntRect& dirtyRect) override
     88    void drawRect(WebPageOverlay& pageOverlay, WebCore::GraphicsContext& graphicsContext, const WebCore::IntRect& dirtyRect) override
    9089    {
    9190        if (!m_client.drawRect)
     
    9594    }
    9695   
    97     bool mouseEvent(WebPageOverlay& pageOverlay, const PlatformMouseEvent& event) override
     96    bool mouseEvent(WebPageOverlay& pageOverlay, const WebCore::PlatformMouseEvent& event) override
    9897    {
    9998        switch (event.type()) {
    100         case PlatformMouseEvent::Type::MousePressed: {
     99        case WebCore::PlatformMouseEvent::Type::MousePressed: {
    101100            if (!m_client.mouseDown)
    102101                return false;
     
    104103            return m_client.mouseDown(toAPI(&pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
    105104        }
    106         case PlatformMouseEvent::Type::MouseReleased: {
     105        case WebCore::PlatformMouseEvent::Type::MouseReleased: {
    107106            if (!m_client.mouseUp)
    108107                return false;
     
    110109            return m_client.mouseUp(toAPI(&pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
    111110        }
    112         case PlatformMouseEvent::Type::MouseMoved: {
    113             if (event.button() == MouseButton::NoButton) {
     111        case WebCore::PlatformMouseEvent::Type::MouseMoved: {
     112            if (event.button() == WebCore::MouseButton::NoButton) {
    114113                if (!m_client.mouseMoved)
    115114                    return false;
Note: See TracChangeset for help on using the changeset viewer.