- Revision
- 238546
- Author
- [email protected]
- Date
- 2018-11-27 00:59:00 -0800 (Tue, 27 Nov 2018)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (238545 => 238546)
--- trunk/Source/WebKit/ChangeLog 2018-11-27 04:17:11 UTC (rev 238545)
+++ trunk/Source/WebKit/ChangeLog 2018-11-27 08:59:00 UTC (rev 238546)
@@ -1,3 +1,35 @@
+2018-11-27 Fujii Hironori <[email protected]>
+
+ 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:
+
2018-11-26 Wenson Hsieh <[email protected]>
[Cocoa] No way for clients to tell whether the content view is in the responder chain when the web view is
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp (238545 => 238546)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp 2018-11-27 04:17:11 UTC (rev 238545)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp 2018-11-27 08:59:00 UTC (rev 238546)
@@ -48,7 +48,6 @@
#include <WebCore/ResourceLoadObserver.h>
#include <WebCore/ServiceWorkerThreadProxy.h>
-using namespace WebCore;
using namespace WebKit;
WKTypeID WKBundleGetTypeID()
@@ -250,13 +249,13 @@
void WKBundleClearAllDatabases(WKBundleRef)
{
- DatabaseTracker::singleton().deleteAllDatabasesImmediately();
+ WebCore::DatabaseTracker::singleton().deleteAllDatabasesImmediately();
}
void WKBundleSetDatabaseQuota(WKBundleRef bundleRef, uint64_t quota)
{
// Historically, we've used the following (somewhat nonsensical) string for the databaseIdentifier of local files.
- DatabaseTracker::singleton().setQuota(*SecurityOriginData::fromDatabaseIdentifier("file__0"), quota);
+ WebCore::DatabaseTracker::singleton().setQuota(*SecurityOriginData::fromDatabaseIdentifier("file__0"), quota);
}
void WKBundleReleaseMemory(WKBundleRef)
@@ -321,12 +320,12 @@
void WKBundleClearResourceLoadStatistics(WKBundleRef)
{
- ResourceLoadObserver::shared().clearState();
+ WebCore::ResourceLoadObserver::shared().clearState();
}
void WKBundleResourceLoadStatisticsNotifyObserver(WKBundleRef)
{
- ResourceLoadObserver::shared().notifyObserver();
+ WebCore::ResourceLoadObserver::shared().notifyObserver();
}
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp (238545 => 238546)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp 2018-11-27 04:17:11 UTC (rev 238545)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp 2018-11-27 08:59:00 UTC (rev 238546)
@@ -45,7 +45,6 @@
#include <WebCore/FrameView.h>
#include <WebCore/Page.h>
-using namespace WebCore;
using namespace WebKit;
WKTypeID WKBundleFrameGetTypeID()
@@ -75,16 +74,16 @@
WKFrameLoadState WKBundleFrameGetFrameLoadState(WKBundleFrameRef frameRef)
{
- Frame* coreFrame = toImpl(frameRef)->coreFrame();
+ WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
if (!coreFrame)
return kWKFrameLoadStateFinished;
switch (coreFrame->loader().state()) {
- case FrameStateProvisional:
+ case WebCore::FrameStateProvisional:
return kWKFrameLoadStateProvisional;
- case FrameStateCommittedPage:
+ case WebCore::FrameStateCommittedPage:
return kWKFrameLoadStateCommitted;
- case FrameStateComplete:
+ case WebCore::FrameStateComplete:
return kWKFrameLoadStateFinished;
}
@@ -149,7 +148,7 @@
void WKBundleFrameClearOpener(WKBundleFrameRef frameRef)
{
- Frame* coreFrame = toImpl(frameRef)->coreFrame();
+ WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
if (coreFrame)
coreFrame->loader().setOpener(0);
}
@@ -261,7 +260,7 @@
bool WKBundleFrameCallShouldCloseOnWebView(WKBundleFrameRef frameRef)
{
- Frame* coreFrame = toImpl(frameRef)->coreFrame();
+ WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
if (!coreFrame)
return true;
@@ -275,7 +274,7 @@
WKSecurityOriginRef WKBundleFrameCopySecurityOrigin(WKBundleFrameRef frameRef)
{
- Frame* coreFrame = toImpl(frameRef)->coreFrame();
+ WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
if (!coreFrame)
return 0;
@@ -284,7 +283,7 @@
void WKBundleFrameFocus(WKBundleFrameRef frameRef)
{
- Frame* coreFrame = toImpl(frameRef)->coreFrame();
+ WebCore::Frame* coreFrame = toImpl(frameRef)->coreFrame();
if (!coreFrame)
return;
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp (238545 => 238546)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp 2018-11-27 04:17:11 UTC (rev 238545)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp 2018-11-27 08:59:00 UTC (rev 238546)
@@ -30,7 +30,6 @@
#include "WKBundleAPICast.h"
#include "WebInspector.h"
-using namespace WebCore;
using namespace WebKit;
WKTypeID WKBundleInspectorGetTypeID()
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp (238545 => 238546)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp 2018-11-27 04:17:11 UTC (rev 238545)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp 2018-11-27 08:59:00 UTC (rev 238546)
@@ -53,7 +53,6 @@
}
-using namespace WebCore;
using namespace WebKit;
class PageOverlayClientImpl : API::Client<WKBundlePageOverlayClientBase>, public WebPageOverlay::Client {
@@ -86,7 +85,7 @@
m_client.didMoveToPage(toAPI(&pageOverlay), toAPI(page), m_client.base.clientInfo);
}
- void drawRect(WebPageOverlay& pageOverlay, GraphicsContext& graphicsContext, const IntRect& dirtyRect) override
+ void drawRect(WebPageOverlay& pageOverlay, WebCore::GraphicsContext& graphicsContext, const WebCore::IntRect& dirtyRect) override
{
if (!m_client.drawRect)
return;
@@ -94,23 +93,23 @@
m_client.drawRect(toAPI(&pageOverlay), graphicsContext.platformContext(), toAPI(dirtyRect), m_client.base.clientInfo);
}
- bool mouseEvent(WebPageOverlay& pageOverlay, const PlatformMouseEvent& event) override
+ bool mouseEvent(WebPageOverlay& pageOverlay, const WebCore::PlatformMouseEvent& event) override
{
switch (event.type()) {
- case PlatformMouseEvent::Type::MousePressed: {
+ case WebCore::PlatformMouseEvent::Type::MousePressed: {
if (!m_client.mouseDown)
return false;
return m_client.mouseDown(toAPI(&pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
}
- case PlatformMouseEvent::Type::MouseReleased: {
+ case WebCore::PlatformMouseEvent::Type::MouseReleased: {
if (!m_client.mouseUp)
return false;
return m_client.mouseUp(toAPI(&pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
}
- case PlatformMouseEvent::Type::MouseMoved: {
- if (event.button() == MouseButton::NoButton) {
+ case WebCore::PlatformMouseEvent::Type::MouseMoved: {
+ if (event.button() == WebCore::MouseButton::NoButton) {
if (!m_client.mouseMoved)
return false;