Diff
Modified: trunk/Source/WebKit/ChangeLog (238886 => 238887)
--- trunk/Source/WebKit/ChangeLog 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/ChangeLog 2018-12-05 06:52:17 UTC (rev 238887)
@@ -1,3 +1,41 @@
+2018-12-04 Fujii Hironori <[email protected]>
+
+ Remove using namespace WebCore and WebKit under WebKit/Shared/API
+ https://bugs.webkit.org/show_bug.cgi?id=192352
+
+ Reviewed by Alex Christensen.
+
+ Removed using namespace statements, and use namespace prefix
+ instead.
+
+ * Shared/API/APIURLRequest.cpp:
+ * Shared/API/APIURLResponse.cpp:
+ * Shared/API/c/WKArray.cpp:
+ * Shared/API/c/WKCertificateInfo.cpp:
+ * Shared/API/c/WKConnectionRef.cpp:
+ * Shared/API/c/WKContextMenuItem.cpp:
+ * Shared/API/c/WKData.cpp:
+ * Shared/API/c/WKDictionary.cpp:
+ * Shared/API/c/WKErrorRef.cpp:
+ * Shared/API/c/WKGeometry.cpp:
+ * Shared/API/c/WKImage.cpp:
+ * Shared/API/c/WKMutableArray.cpp:
+ * Shared/API/c/WKMutableDictionary.cpp:
+ * Shared/API/c/WKNumber.cpp:
+ * Shared/API/c/WKPluginInformation.cpp:
+ * Shared/API/c/WKRenderLayer.cpp:
+ * Shared/API/c/WKRenderObject.cpp:
+ * Shared/API/c/WKSecurityOriginRef.cpp:
+ * Shared/API/c/WKSerializedScriptValue.cpp:
+ * Shared/API/c/WKString.cpp:
+ * Shared/API/c/WKType.cpp:
+ * Shared/API/c/WKURL.cpp:
+ * Shared/API/c/WKURLRequest.cpp:
+ * Shared/API/c/WKURLResponse.cpp:
+ * Shared/API/c/WKUserContentURLPattern.cpp:
+ * Shared/API/c/cairo/WKImageCairo.cpp:
+ * Shared/API/c/curl/WKCertificateInfoCurl.cpp:
+
2018-12-04 Alex Christensen <[email protected]>
Remove source application identifiers from NetworkProcessCreationParameters
Modified: trunk/Source/WebKit/Shared/API/APIURLRequest.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/APIURLRequest.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/APIURLRequest.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,11 +29,10 @@
#include "WebCoreArgumentCoders.h"
#include "WebProcessPool.h"
+namespace API {
using namespace WebCore;
using namespace WebKit;
-namespace API {
-
URLRequest::URLRequest(const ResourceRequest& request)
: m_request(request)
{
Modified: trunk/Source/WebKit/Shared/API/APIURLResponse.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/APIURLResponse.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/APIURLResponse.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -28,10 +28,9 @@
#include "WebCoreArgumentCoders.h"
+namespace API {
using namespace WebCore;
-namespace API {
-
URLResponse::URLResponse(const WebCore::ResourceResponse& response)
: m_response(response)
{
Modified: trunk/Source/WebKit/Shared/API/c/WKArray.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKArray.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKArray.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,11 +29,9 @@
#include "APIArray.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKArrayGetTypeID()
{
- return toAPI(API::Array::APIType);
+ return WebKit::toAPI(API::Array::APIType);
}
WKArrayRef WKArrayCreate(WKTypeRef* values, size_t numberOfValues)
@@ -42,9 +40,9 @@
elements.reserveInitialCapacity(numberOfValues);
for (size_t i = 0; i < numberOfValues; ++i)
- elements.uncheckedAppend(toImpl(values[i]));
+ elements.uncheckedAppend(WebKit::toImpl(values[i]));
- return toAPI(&API::Array::create(WTFMove(elements)).leakRef());
+ return WebKit::toAPI(&API::Array::create(WTFMove(elements)).leakRef());
}
WKArrayRef WKArrayCreateAdoptingValues(WKTypeRef* values, size_t numberOfValues)
@@ -53,17 +51,17 @@
elements.reserveInitialCapacity(numberOfValues);
for (size_t i = 0; i < numberOfValues; ++i)
- elements.uncheckedAppend(adoptRef(toImpl(values[i])));
+ elements.uncheckedAppend(adoptRef(WebKit::toImpl(values[i])));
- return toAPI(&API::Array::create(WTFMove(elements)).leakRef());
+ return WebKit::toAPI(&API::Array::create(WTFMove(elements)).leakRef());
}
WKTypeRef WKArrayGetItemAtIndex(WKArrayRef arrayRef, size_t index)
{
- return toAPI(toImpl(arrayRef)->at(index));
+ return WebKit::toAPI(WebKit::toImpl(arrayRef)->at(index));
}
size_t WKArrayGetSize(WKArrayRef arrayRef)
{
- return toImpl(arrayRef)->size();
+ return WebKit::toImpl(arrayRef)->size();
}
Modified: trunk/Source/WebKit/Shared/API/c/WKCertificateInfo.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKCertificateInfo.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKCertificateInfo.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,9 +29,7 @@
#include "WebCertificateInfo.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKCertificateInfoGetTypeID()
{
- return toAPI(WebCertificateInfo::APIType);
+ return WebKit::toAPI(WebKit::WebCertificateInfo::APIType);
}
Modified: trunk/Source/WebKit/Shared/API/c/WKConnectionRef.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKConnectionRef.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKConnectionRef.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,20 +29,18 @@
#include "WKAPICast.h"
#include "WebConnection.h"
-using namespace WebKit;
-
WKTypeID WKConnectionGetTypeID()
{
- return toAPI(WebConnection::APIType);
+ return WebKit::toAPI(WebKit::WebConnection::APIType);
}
void WKConnectionSetConnectionClient(WKConnectionRef connectionRef, const WKConnectionClientBase* wkClient)
{
- toImpl(connectionRef)->initializeConnectionClient(wkClient);
+ WebKit::toImpl(connectionRef)->initializeConnectionClient(wkClient);
}
void WKConnectionPostMessage(WKConnectionRef connectionRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef)
{
- toImpl(connectionRef)->postMessage(toImpl(messageNameRef)->string(), toImpl(messageBodyRef));
+ WebKit::toImpl(connectionRef)->postMessage(WebKit::toImpl(messageNameRef)->string(), WebKit::toImpl(messageBodyRef));
}
Modified: trunk/Source/WebKit/Shared/API/c/WKContextMenuItem.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKContextMenuItem.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKContextMenuItem.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -32,15 +32,12 @@
#include "WKAPICast.h"
#include "WKContextMenuItemTypes.h"
-using namespace WebCore;
-using namespace WebKit;
-
WKTypeID WKContextMenuItemGetTypeID()
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(WebContextMenuItem::APIType);
+ return WebKit::toAPI(WebKit::WebContextMenuItem::APIType);
#else
- return toAPI(API::Object::Type::Null);
+ return WebKit::toAPI(API::Object::Type::Null);
#endif
}
@@ -47,7 +44,7 @@
WKContextMenuItemRef WKContextMenuItemCreateAsAction(WKContextMenuItemTag tag, WKStringRef title, bool enabled)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(&WebContextMenuItem::create(WebContextMenuItemData(ActionType, toImpl(tag), toImpl(title)->string(), enabled, false)).leakRef());
+ return WebKit::toAPI(&WebKit::WebContextMenuItem::create(WebKit::WebContextMenuItemData(WebCore::ActionType, WebKit::toImpl(tag), WebKit::toImpl(title)->string(), enabled, false)).leakRef());
#else
UNUSED_PARAM(tag);
UNUSED_PARAM(title);
@@ -59,7 +56,7 @@
WKContextMenuItemRef WKContextMenuItemCreateAsCheckableAction(WKContextMenuItemTag tag, WKStringRef title, bool enabled, bool checked)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(&WebContextMenuItem::create(WebContextMenuItemData(CheckableActionType, toImpl(tag), toImpl(title)->string(), enabled, checked)).leakRef());
+ return WebKit::toAPI(&WebKit::WebContextMenuItem::create(WebKit::WebContextMenuItemData(WebCore::CheckableActionType, WebKit::toImpl(tag), WebKit::toImpl(title)->string(), enabled, checked)).leakRef());
#else
UNUSED_PARAM(tag);
UNUSED_PARAM(title);
@@ -72,7 +69,7 @@
WKContextMenuItemRef WKContextMenuItemCreateAsSubmenu(WKStringRef title, bool enabled, WKArrayRef submenuItems)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(&WebContextMenuItem::create(toImpl(title)->string(), enabled, toImpl(submenuItems)).leakRef());
+ return WebKit::toAPI(&WebKit::WebContextMenuItem::create(WebKit::toImpl(title)->string(), enabled, WebKit::toImpl(submenuItems)).leakRef());
#else
UNUSED_PARAM(title);
UNUSED_PARAM(enabled);
@@ -84,7 +81,7 @@
WKContextMenuItemRef WKContextMenuItemSeparatorItem()
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(WebContextMenuItem::separatorItem());
+ return WebKit::toAPI(WebKit::WebContextMenuItem::separatorItem());
#else
return nullptr;
#endif
@@ -93,10 +90,10 @@
WKContextMenuItemTag WKContextMenuItemGetTag(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(toImpl(itemRef)->data().action());
+ return WebKit::toAPI(WebKit::toImpl(itemRef)->data().action());
#else
UNUSED_PARAM(itemRef);
- return toAPI(ContextMenuItemTagNoAction);
+ return WebKit::toAPI(WebCore::ContextMenuItemTagNoAction);
#endif
}
@@ -103,10 +100,10 @@
WKContextMenuItemType WKContextMenuItemGetType(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(toImpl(itemRef)->data().type());
+ return WebKit::toAPI(WebKit::toImpl(itemRef)->data().type());
#else
UNUSED_PARAM(itemRef);
- return toAPI(ActionType);
+ return WebKit::toAPI(WebCore::ActionType);
#endif
}
@@ -113,7 +110,7 @@
WKStringRef WKContextMenuItemCopyTitle(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toCopiedAPI(toImpl(itemRef)->data().title().impl());
+ return WebKit::toCopiedAPI(WebKit::toImpl(itemRef)->data().title().impl());
#else
UNUSED_PARAM(itemRef);
return 0;
@@ -123,7 +120,7 @@
bool WKContextMenuItemGetEnabled(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toImpl(itemRef)->data().enabled();
+ return WebKit::toImpl(itemRef)->data().enabled();
#else
UNUSED_PARAM(itemRef);
return false;
@@ -133,7 +130,7 @@
bool WKContextMenuItemGetChecked(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toImpl(itemRef)->data().checked();
+ return WebKit::toImpl(itemRef)->data().checked();
#else
UNUSED_PARAM(itemRef);
return false;
@@ -143,7 +140,7 @@
WKArrayRef WKContextMenuCopySubmenuItems(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(&toImpl(itemRef)->submenuItemsAsAPIArray().leakRef());
+ return WebKit::toAPI(&WebKit::toImpl(itemRef)->submenuItemsAsAPIArray().leakRef());
#else
UNUSED_PARAM(itemRef);
return 0;
@@ -153,7 +150,7 @@
WKTypeRef WKContextMenuItemGetUserData(WKContextMenuItemRef itemRef)
{
#if ENABLE(CONTEXT_MENUS)
- return toAPI(toImpl(itemRef)->userData());
+ return WebKit::toAPI(WebKit::toImpl(itemRef)->userData());
#else
UNUSED_PARAM(itemRef);
return 0;
@@ -163,7 +160,7 @@
void WKContextMenuItemSetUserData(WKContextMenuItemRef itemRef, WKTypeRef userDataRef)
{
#if ENABLE(CONTEXT_MENUS)
- toImpl(itemRef)->setUserData(toImpl(userDataRef));
+ WebKit::toImpl(itemRef)->setUserData(WebKit::toImpl(userDataRef));
#else
UNUSED_PARAM(itemRef);
UNUSED_PARAM(userDataRef);
Modified: trunk/Source/WebKit/Shared/API/c/WKData.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKData.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKData.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,24 +29,22 @@
#include "APIData.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKDataGetTypeID()
{
- return toAPI(API::Data::APIType);
+ return WebKit::toAPI(API::Data::APIType);
}
WKDataRef WKDataCreate(const unsigned char* bytes, size_t size)
{
- return toAPI(&API::Data::create(bytes, size).leakRef());
+ return WebKit::toAPI(&API::Data::create(bytes, size).leakRef());
}
const unsigned char* WKDataGetBytes(WKDataRef dataRef)
{
- return toImpl(dataRef)->bytes();
+ return WebKit::toImpl(dataRef)->bytes();
}
size_t WKDataGetSize(WKDataRef dataRef)
{
- return toImpl(dataRef)->size();
+ return WebKit::toImpl(dataRef)->size();
}
Modified: trunk/Source/WebKit/Shared/API/c/WKDictionary.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKDictionary.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKDictionary.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -30,11 +30,9 @@
#include "APIDictionary.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKDictionaryGetTypeID()
{
- return toAPI(API::Dictionary::APIType);
+ return WebKit::toAPI(API::Dictionary::APIType);
}
WK_EXPORT WKDictionaryRef WKDictionaryCreate(const WKStringRef* keys, const WKTypeRef* values, size_t numberOfValues)
@@ -41,22 +39,22 @@
{
API::Dictionary::MapType map;
for (size_t i = 0; i < numberOfValues; ++i)
- map.add(toImpl(keys[i])->string(), toImpl(values[i]));
+ map.add(WebKit::toImpl(keys[i])->string(), WebKit::toImpl(values[i]));
- return toAPI(&API::Dictionary::create(WTFMove(map)).leakRef());
+ return WebKit::toAPI(&API::Dictionary::create(WTFMove(map)).leakRef());
}
WKTypeRef WKDictionaryGetItemForKey(WKDictionaryRef dictionaryRef, WKStringRef key)
{
- return toAPI(toImpl(dictionaryRef)->get(toImpl(key)->string()));
+ return WebKit::toAPI(WebKit::toImpl(dictionaryRef)->get(WebKit::toImpl(key)->string()));
}
size_t WKDictionaryGetSize(WKDictionaryRef dictionaryRef)
{
- return toImpl(dictionaryRef)->size();
+ return WebKit::toImpl(dictionaryRef)->size();
}
WKArrayRef WKDictionaryCopyKeys(WKDictionaryRef dictionaryRef)
{
- return toAPI(&toImpl(dictionaryRef)->keys().leakRef());
+ return WebKit::toAPI(&WebKit::toImpl(dictionaryRef)->keys().leakRef());
}
Modified: trunk/Source/WebKit/Shared/API/c/WKErrorRef.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKErrorRef.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKErrorRef.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,26 +29,24 @@
#include "APIError.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKErrorGetTypeID()
{
- return toAPI(API::Error::APIType);
+ return WebKit::toAPI(API::Error::APIType);
}
WKStringRef WKErrorCopyWKErrorDomain()
{
- return toCopiedAPI(API::Error::webKitErrorDomain());
+ return WebKit::toCopiedAPI(API::Error::webKitErrorDomain());
}
WKStringRef WKErrorCopyDomain(WKErrorRef errorRef)
{
- return toCopiedAPI(toImpl(errorRef)->domain());
+ return WebKit::toCopiedAPI(WebKit::toImpl(errorRef)->domain());
}
int WKErrorGetErrorCode(WKErrorRef errorRef)
{
- auto errorCode = toImpl(errorRef)->errorCode();
+ auto errorCode = WebKit::toImpl(errorRef)->errorCode();
switch (errorCode) {
case API::Error::Policy::CannotShowMIMEType:
return kWKErrorCodeCannotShowMIMEType;
@@ -83,10 +81,10 @@
WKURLRef WKErrorCopyFailingURL(WKErrorRef errorRef)
{
- return toCopiedURLAPI(toImpl(errorRef)->failingURL());
+ return WebKit::toCopiedURLAPI(WebKit::toImpl(errorRef)->failingURL());
}
WKStringRef WKErrorCopyLocalizedDescription(WKErrorRef errorRef)
{
- return toCopiedAPI(toImpl(errorRef)->localizedDescription());
+ return WebKit::toCopiedAPI(WebKit::toImpl(errorRef)->localizedDescription());
}
Modified: trunk/Source/WebKit/Shared/API/c/WKGeometry.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKGeometry.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKGeometry.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,50 +29,48 @@
#include "APIGeometry.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKSizeGetTypeID(void)
{
- return toAPI(API::Size::APIType);
+ return WebKit::toAPI(API::Size::APIType);
}
WKTypeID WKPointGetTypeID(void)
{
- return toAPI(API::Point::APIType);
+ return WebKit::toAPI(API::Point::APIType);
}
WKTypeID WKRectGetTypeID(void)
{
- return toAPI(API::Rect::APIType);
+ return WebKit::toAPI(API::Rect::APIType);
}
WKPointRef WKPointCreate(WKPoint point)
{
- return toAPI(&API::Point::create(point).leakRef());
+ return WebKit::toAPI(&API::Point::create(point).leakRef());
}
WKSizeRef WKSizeCreate(WKSize size)
{
- return toAPI(&API::Size::create(size).leakRef());
+ return WebKit::toAPI(&API::Size::create(size).leakRef());
}
WKRectRef WKRectCreate(WKRect rect)
{
- return toAPI(&API::Rect::create(rect).leakRef());
+ return WebKit::toAPI(&API::Rect::create(rect).leakRef());
}
WKSize WKSizeGetValue(WKSizeRef size)
{
- return toImpl(size)->size();
+ return WebKit::toImpl(size)->size();
}
WKPoint WKPointGetValue(WKPointRef point)
{
- return toImpl(point)->point();
+ return WebKit::toImpl(point)->point();
}
WKRect WKRectGetValue(WKRectRef rect)
{
- return toImpl(rect)->rect();
+ return WebKit::toImpl(rect)->rect();
}
Modified: trunk/Source/WebKit/Shared/API/c/WKImage.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKImage.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKImage.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,20 +29,18 @@
#include "WKSharedAPICast.h"
#include "WebImage.h"
-using namespace WebKit;
-
WKTypeID WKImageGetTypeID(void)
{
- return toAPI(WebImage::APIType);
+ return WebKit::toAPI(WebKit::WebImage::APIType);
}
WKImageRef WKImageCreate(WKSize size, WKImageOptions options)
{
- auto webImage = WebImage::create(toIntSize(size), toImageOptions(options));
+ auto webImage = WebKit::WebImage::create(WebKit::toIntSize(size), WebKit::toImageOptions(options));
return toAPI(webImage.leakRef());
}
WKSize WKImageGetSize(WKImageRef imageRef)
{
- return toAPI(toImpl(imageRef)->size());
+ return WebKit::toAPI(WebKit::toImpl(imageRef)->size());
}
Modified: trunk/Source/WebKit/Shared/API/c/WKMutableArray.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKMutableArray.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKMutableArray.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,20 +29,18 @@
#include "APIArray.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKMutableArrayRef WKMutableArrayCreate()
{
- return const_cast<WKMutableArrayRef>(toAPI(&API::Array::create().leakRef()));
+ return const_cast<WKMutableArrayRef>(WebKit::toAPI(&API::Array::create().leakRef()));
}
void WKArrayAppendItem(WKMutableArrayRef arrayRef, WKTypeRef itemRef)
{
- toImpl(arrayRef)->elements().append(toImpl(itemRef));
+ WebKit::toImpl(arrayRef)->elements().append(WebKit::toImpl(itemRef));
}
void WKArrayRemoveItemAtIndex(WKMutableArrayRef arrayRef, size_t index)
{
- toImpl(arrayRef)->elements().remove(index);
+ WebKit::toImpl(arrayRef)->elements().remove(index);
}
Modified: trunk/Source/WebKit/Shared/API/c/WKMutableDictionary.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKMutableDictionary.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKMutableDictionary.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,15 +29,13 @@
#include "APIDictionary.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKMutableDictionaryRef WKMutableDictionaryCreate()
{
- return const_cast<WKMutableDictionaryRef>(toAPI(&API::Dictionary::create().leakRef()));
+ return const_cast<WKMutableDictionaryRef>(WebKit::toAPI(&API::Dictionary::create().leakRef()));
}
bool WKDictionarySetItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef, WKTypeRef itemRef)
{
- return toImpl(dictionaryRef)->set(toImpl(keyRef)->string(), toImpl(itemRef));
+ return WebKit::toImpl(dictionaryRef)->set(WebKit::toImpl(keyRef)->string(), WebKit::toImpl(itemRef));
}
Modified: trunk/Source/WebKit/Shared/API/c/WKNumber.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKNumber.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKNumber.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,52 +29,50 @@
#include "APINumber.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKBooleanGetTypeID()
{
- return toAPI(API::Boolean::APIType);
+ return WebKit::toAPI(API::Boolean::APIType);
}
WKBooleanRef WKBooleanCreate(bool value)
{
auto booleanObject = API::Boolean::create(value);
- return toAPI(&booleanObject.leakRef());
+ return WebKit::toAPI(&booleanObject.leakRef());
}
bool WKBooleanGetValue(WKBooleanRef booleanRef)
{
- return toImpl(booleanRef)->value();
+ return WebKit::toImpl(booleanRef)->value();
}
WKTypeID WKDoubleGetTypeID()
{
- return toAPI(API::Double::APIType);
+ return WebKit::toAPI(API::Double::APIType);
}
WKDoubleRef WKDoubleCreate(double value)
{
auto doubleObject = API::Double::create(value);
- return toAPI(&doubleObject.leakRef());
+ return WebKit::toAPI(&doubleObject.leakRef());
}
double WKDoubleGetValue(WKDoubleRef doubleRef)
{
- return toImpl(doubleRef)->value();
+ return WebKit::toImpl(doubleRef)->value();
}
WKTypeID WKUInt64GetTypeID()
{
- return toAPI(API::UInt64::APIType);
+ return WebKit::toAPI(API::UInt64::APIType);
}
WKUInt64Ref WKUInt64Create(uint64_t value)
{
auto uint64Object = API::UInt64::create(value);
- return toAPI(&uint64Object.leakRef());
+ return WebKit::toAPI(&uint64Object.leakRef());
}
uint64_t WKUInt64GetValue(WKUInt64Ref uint64Ref)
{
- return toImpl(uint64Ref)->value();
+ return WebKit::toImpl(uint64Ref)->value();
}
Modified: trunk/Source/WebKit/Shared/API/c/WKPluginInformation.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKPluginInformation.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKPluginInformation.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -30,13 +30,11 @@
#include "PluginInformation.h"
#include "WKSharedAPICast.h"
-using namespace WebKit;
-
WKStringRef WKPluginInformationBundleIdentifierKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationBundleIdentifierKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationBundleIdentifierKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -45,8 +43,8 @@
WKStringRef WKPluginInformationBundleVersionKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationBundleVersionKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationBundleVersionKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -55,8 +53,8 @@
WKStringRef WKPluginInformationBundleShortVersionKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationBundleShortVersionKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationBundleShortVersionKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -65,8 +63,8 @@
WKStringRef WKPluginInformationPathKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationPathKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationPathKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -75,8 +73,8 @@
WKStringRef WKPluginInformationDisplayNameKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationDisplayNameKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationDisplayNameKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -85,8 +83,8 @@
WKStringRef WKPluginInformationDefaultLoadPolicyKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationDefaultLoadPolicyKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationDefaultLoadPolicyKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -95,8 +93,8 @@
WKStringRef WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -105,8 +103,8 @@
WKStringRef WKPluginInformationHasSandboxProfileKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationHasSandboxProfileKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationHasSandboxProfileKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -115,8 +113,8 @@
WKStringRef WKPluginInformationFrameURLKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationFrameURLKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationFrameURLKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -125,8 +123,8 @@
WKStringRef WKPluginInformationMIMETypeKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationMIMETypeKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationMIMETypeKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -135,8 +133,8 @@
WKStringRef WKPluginInformationPageURLKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationPageURLKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationPageURLKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -145,8 +143,8 @@
WKStringRef WKPluginInformationPluginspageAttributeURLKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationPluginspageAttributeURLKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationPluginspageAttributeURLKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -155,8 +153,8 @@
WKStringRef WKPluginInformationPluginURLKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(pluginInformationPluginURLKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::pluginInformationPluginURLKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
@@ -165,8 +163,8 @@
WKStringRef WKPlugInInformationReplacementObscuredKey()
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- static API::String& key = API::String::create(plugInInformationReplacementObscuredKey()).leakRef();
- return toAPI(&key);
+ static API::String& key = API::String::create(WebKit::plugInInformationReplacementObscuredKey()).leakRef();
+ return WebKit::toAPI(&key);
#else
return 0;
#endif
Modified: trunk/Source/WebKit/Shared/API/c/WKRenderLayer.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKRenderLayer.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKRenderLayer.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -30,29 +30,26 @@
#include "WKAPICast.h"
#include "WebRenderLayer.h"
-using namespace WebCore;
-using namespace WebKit;
-
WKTypeID WKRenderLayerGetTypeID()
{
- return toAPI(WebRenderLayer::APIType);
+ return WebKit::toAPI(WebKit::WebRenderLayer::APIType);
}
WKRenderObjectRef WKRenderLayerGetRenderer(WKRenderLayerRef renderLayerRef)
{
- return toAPI(toImpl(renderLayerRef)->renderer());
+ return toAPI(WebKit::toImpl(renderLayerRef)->renderer());
}
WKStringRef WKRenderLayerCopyRendererName(WKRenderLayerRef renderLayerRef)
{
- return toCopiedAPI(toImpl(renderLayerRef)->renderer()->name());
+ return WebKit::toCopiedAPI(WebKit::toImpl(renderLayerRef)->renderer()->name());
}
WKStringRef WKRenderLayerCopyElementTagName(WKRenderLayerRef renderLayerRef)
{
- WebRenderLayer* renderLayer = toImpl(renderLayerRef);
+ WebKit::WebRenderLayer* renderLayer = WebKit::toImpl(renderLayerRef);
if (!renderLayer->renderer()->elementTagName().isNull())
- return toCopiedAPI(renderLayer->renderer()->elementTagName());
+ return WebKit::toCopiedAPI(renderLayer->renderer()->elementTagName());
return nullptr;
}
@@ -59,9 +56,9 @@
WKStringRef WKRenderLayerCopyElementID(WKRenderLayerRef renderLayerRef)
{
- WebRenderLayer* renderLayer = toImpl(renderLayerRef);
+ WebKit::WebRenderLayer* renderLayer = WebKit::toImpl(renderLayerRef);
if (!renderLayer->renderer()->elementID().isNull())
- return toCopiedAPI(renderLayer->renderer()->elementID());
+ return WebKit::toCopiedAPI(renderLayer->renderer()->elementID());
return nullptr;
}
@@ -68,42 +65,42 @@
WKArrayRef WKRenderLayerGetElementClassNames(WKRenderLayerRef renderLayerRef)
{
- return toAPI(toImpl(renderLayerRef)->renderer()->elementClassNames());
+ return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->renderer()->elementClassNames());
}
WKRect WKRenderLayerGetAbsoluteBounds(WKRenderLayerRef renderLayerRef)
{
- IntRect bounds = toImpl(renderLayerRef)->absoluteBoundingBox();
+ WebCore::IntRect bounds = WebKit::toImpl(renderLayerRef)->absoluteBoundingBox();
return WKRectMake(bounds.x(), bounds.y(), bounds.width(), bounds.height());
}
bool WKRenderLayerIsClipping(WKRenderLayerRef renderLayerRef)
{
- return toImpl(renderLayerRef)->isClipping();
+ return WebKit::toImpl(renderLayerRef)->isClipping();
}
bool WKRenderLayerIsClipped(WKRenderLayerRef renderLayerRef)
{
- return toImpl(renderLayerRef)->isClipped();
+ return WebKit::toImpl(renderLayerRef)->isClipped();
}
bool WKRenderLayerIsReflection(WKRenderLayerRef renderLayerRef)
{
- return toImpl(renderLayerRef)->isReflection();
+ return WebKit::toImpl(renderLayerRef)->isReflection();
}
WKCompositingLayerType WKRenderLayerGetCompositingLayerType(WKRenderLayerRef renderLayerRef)
{
- switch (toImpl(renderLayerRef)->compositingLayerType()) {
- case WebRenderLayer::None:
+ switch (WebKit::toImpl(renderLayerRef)->compositingLayerType()) {
+ case WebKit::WebRenderLayer::None:
return kWKCompositingLayerTypeNone;
- case WebRenderLayer::Normal:
+ case WebKit::WebRenderLayer::Normal:
return kWKCompositingLayerTypeNormal;
- case WebRenderLayer::Tiled:
+ case WebKit::WebRenderLayer::Tiled:
return kWKCompositingLayerTypeTiled;
- case WebRenderLayer::Media:
+ case WebKit::WebRenderLayer::Media:
return kWKCompositingLayerTypeMedia;
- case WebRenderLayer::Container:
+ case WebKit::WebRenderLayer::Container:
return kWKCompositingLayerTypeContainer;
}
@@ -113,25 +110,25 @@
WK_EXPORT double WKRenderLayerGetBackingStoreMemoryEstimate(WKRenderLayerRef renderLayerRef)
{
- return toImpl(renderLayerRef)->backingStoreMemoryEstimate();
+ return WebKit::toImpl(renderLayerRef)->backingStoreMemoryEstimate();
}
WKArrayRef WKRenderLayerGetNegativeZOrderList(WKRenderLayerRef renderLayerRef)
{
- return toAPI(toImpl(renderLayerRef)->negativeZOrderList());
+ return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->negativeZOrderList());
}
WKArrayRef WKRenderLayerGetNormalFlowList(WKRenderLayerRef renderLayerRef)
{
- return toAPI(toImpl(renderLayerRef)->normalFlowList());
+ return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->normalFlowList());
}
WKArrayRef WKRenderLayerGetPositiveZOrderList(WKRenderLayerRef renderLayerRef)
{
- return toAPI(toImpl(renderLayerRef)->positiveZOrderList());
+ return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->positiveZOrderList());
}
WKRenderLayerRef WKRenderLayerGetFrameContentsLayer(WKRenderLayerRef renderLayerRef)
{
- return toAPI(toImpl(renderLayerRef)->frameContentsLayer());
+ return toAPI(WebKit::toImpl(renderLayerRef)->frameContentsLayer());
}
Modified: trunk/Source/WebKit/Shared/API/c/WKRenderObject.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKRenderObject.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKRenderObject.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -30,24 +30,21 @@
#include "WKAPICast.h"
#include "WebRenderObject.h"
-using namespace WebCore;
-using namespace WebKit;
-
WKTypeID WKRenderObjectGetTypeID()
{
- return toAPI(WebRenderObject::APIType);
+ return WebKit::toAPI(WebKit::WebRenderObject::APIType);
}
WKStringRef WKRenderObjectCopyName(WKRenderObjectRef renderObjectRef)
{
- return toCopiedAPI(toImpl(renderObjectRef)->name());
+ return WebKit::toCopiedAPI(WebKit::toImpl(renderObjectRef)->name());
}
WKStringRef WKRenderObjectCopyTextSnippet(WKRenderObjectRef renderObjectRef)
{
- WebRenderObject* renderObject = toImpl(renderObjectRef);
+ WebKit::WebRenderObject* renderObject = WebKit::toImpl(renderObjectRef);
if (!renderObject->textSnippet().isNull())
- return toCopiedAPI(renderObject->textSnippet());
+ return WebKit::toCopiedAPI(renderObject->textSnippet());
return nullptr;
}
@@ -54,14 +51,14 @@
unsigned WKRenderObjectGetTextLength(WKRenderObjectRef renderObjectRef)
{
- return toImpl(renderObjectRef)->textLength();
+ return WebKit::toImpl(renderObjectRef)->textLength();
}
WKStringRef WKRenderObjectCopyElementTagName(WKRenderObjectRef renderObjectRef)
{
- WebRenderObject* renderObject = toImpl(renderObjectRef);
+ WebKit::WebRenderObject* renderObject = WebKit::toImpl(renderObjectRef);
if (!renderObject->elementTagName().isNull())
- return toCopiedAPI(renderObject->elementTagName());
+ return WebKit::toCopiedAPI(renderObject->elementTagName());
return nullptr;
}
@@ -68,9 +65,9 @@
WKStringRef WKRenderObjectCopyElementID(WKRenderObjectRef renderObjectRef)
{
- WebRenderObject* renderObject = toImpl(renderObjectRef);
+ WebKit::WebRenderObject* renderObject = WebKit::toImpl(renderObjectRef);
if (!renderObject->elementID().isNull())
- return toCopiedAPI(renderObject->elementID());
+ return WebKit::toCopiedAPI(renderObject->elementID());
return nullptr;
}
@@ -77,22 +74,22 @@
WKArrayRef WKRenderObjectGetElementClassNames(WKRenderObjectRef renderObjectRef)
{
- return toAPI(toImpl(renderObjectRef)->elementClassNames());
+ return WebKit::toAPI(WebKit::toImpl(renderObjectRef)->elementClassNames());
}
WKPoint WKRenderObjectGetAbsolutePosition(WKRenderObjectRef renderObjectRef)
{
- IntPoint absolutePosition = toImpl(renderObjectRef)->absolutePosition();
+ WebCore::IntPoint absolutePosition = WebKit::toImpl(renderObjectRef)->absolutePosition();
return WKPointMake(absolutePosition.x(), absolutePosition.y());
}
WKRect WKRenderObjectGetFrameRect(WKRenderObjectRef renderObjectRef)
{
- IntRect frameRect = toImpl(renderObjectRef)->frameRect();
+ WebCore::IntRect frameRect = WebKit::toImpl(renderObjectRef)->frameRect();
return WKRectMake(frameRect.x(), frameRect.y(), frameRect.width(), frameRect.height());
}
WKArrayRef WKRenderObjectGetChildren(WKRenderObjectRef renderObjectRef)
{
- return toAPI(toImpl(renderObjectRef)->children());
+ return WebKit::toAPI(WebKit::toImpl(renderObjectRef)->children());
}
Modified: trunk/Source/WebKit/Shared/API/c/WKSecurityOriginRef.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKSecurityOriginRef.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKSecurityOriginRef.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -30,53 +30,51 @@
#include "WKAPICast.h"
#include <WebCore/SecurityOriginData.h>
-using namespace WebKit;
-
WKTypeID WKSecurityOriginGetTypeID()
{
- return toAPI(API::SecurityOrigin::APIType);
+ return WebKit::toAPI(API::SecurityOrigin::APIType);
}
WKSecurityOriginRef WKSecurityOriginCreateFromString(WKStringRef string)
{
- return toAPI(&API::SecurityOrigin::create(WebCore::SecurityOrigin::createFromString(toImpl(string)->string())).leakRef());
+ return WebKit::toAPI(&API::SecurityOrigin::create(WebCore::SecurityOrigin::createFromString(WebKit::toImpl(string)->string())).leakRef());
}
WKSecurityOriginRef WKSecurityOriginCreateFromDatabaseIdentifier(WKStringRef identifier)
{
- auto origin = WebCore::SecurityOriginData::fromDatabaseIdentifier(toImpl(identifier)->string());
+ auto origin = WebCore::SecurityOriginData::fromDatabaseIdentifier(WebKit::toImpl(identifier)->string());
if (!origin)
return nullptr;
- return toAPI(&API::SecurityOrigin::create(origin.value().securityOrigin()).leakRef());
+ return WebKit::toAPI(&API::SecurityOrigin::create(origin.value().securityOrigin()).leakRef());
}
WKSecurityOriginRef WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port)
{
- auto securityOrigin = API::SecurityOrigin::create(toImpl(protocol)->string(), toImpl(host)->string(), port);
- return toAPI(&securityOrigin.leakRef());
+ auto securityOrigin = API::SecurityOrigin::create(WebKit::toImpl(protocol)->string(), WebKit::toImpl(host)->string(), port);
+ return WebKit::toAPI(&securityOrigin.leakRef());
}
WKStringRef WKSecurityOriginCopyDatabaseIdentifier(WKSecurityOriginRef securityOrigin)
{
- return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().data().databaseIdentifier());
+ return WebKit::toCopiedAPI(WebKit::toImpl(securityOrigin)->securityOrigin().data().databaseIdentifier());
}
WKStringRef WKSecurityOriginCopyToString(WKSecurityOriginRef securityOrigin)
{
- return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().toString());
+ return WebKit::toCopiedAPI(WebKit::toImpl(securityOrigin)->securityOrigin().toString());
}
WKStringRef WKSecurityOriginCopyProtocol(WKSecurityOriginRef securityOrigin)
{
- return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().protocol());
+ return WebKit::toCopiedAPI(WebKit::toImpl(securityOrigin)->securityOrigin().protocol());
}
WKStringRef WKSecurityOriginCopyHost(WKSecurityOriginRef securityOrigin)
{
- return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().host());
+ return WebKit::toCopiedAPI(WebKit::toImpl(securityOrigin)->securityOrigin().host());
}
unsigned short WKSecurityOriginGetPort(WKSecurityOriginRef securityOrigin)
{
- return toImpl(securityOrigin)->securityOrigin().port().value_or(0);
+ return WebKit::toImpl(securityOrigin)->securityOrigin().port().value_or(0);
}
Modified: trunk/Source/WebKit/Shared/API/c/WKSerializedScriptValue.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKSerializedScriptValue.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKSerializedScriptValue.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,20 +29,18 @@
#include "APISerializedScriptValue.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKSerializedScriptValueGetTypeID()
{
- return toAPI(API::SerializedScriptValue::APIType);
+ return WebKit::toAPI(API::SerializedScriptValue::APIType);
}
WKSerializedScriptValueRef WKSerializedScriptValueCreate(JSContextRef context, JSValueRef value, JSValueRef* exception)
{
auto serializedValue = API::SerializedScriptValue::create(context, value, exception);
- return toAPI(serializedValue.leakRef());
+ return WebKit::toAPI(serializedValue.leakRef());
}
JSValueRef WKSerializedScriptValueDeserialize(WKSerializedScriptValueRef scriptValueRef, JSContextRef contextRef, JSValueRef* exception)
{
- return toImpl(scriptValueRef)->deserialize(contextRef, exception);
+ return WebKit::toImpl(scriptValueRef)->deserialize(contextRef, exception);
}
Modified: trunk/Source/WebKit/Shared/API/c/WKString.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKString.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKString.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -31,26 +31,24 @@
#include <_javascript_Core/InitializeThreading.h>
#include <_javascript_Core/OpaqueJSString.h>
-using namespace WebKit;
-
WKTypeID WKStringGetTypeID()
{
- return toAPI(API::String::APIType);
+ return WebKit::toAPI(API::String::APIType);
}
WKStringRef WKStringCreateWithUTF8CString(const char* string)
{
- return toAPI(&API::String::create(WTF::String::fromUTF8(string)).leakRef());
+ return WebKit::toAPI(&API::String::create(WTF::String::fromUTF8(string)).leakRef());
}
bool WKStringIsEmpty(WKStringRef stringRef)
{
- return toImpl(stringRef)->stringView().isEmpty();
+ return WebKit::toImpl(stringRef)->stringView().isEmpty();
}
size_t WKStringGetLength(WKStringRef stringRef)
{
- return toImpl(stringRef)->stringView().length();
+ return WebKit::toImpl(stringRef)->stringView().length();
}
size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
@@ -58,7 +56,7 @@
static_assert(sizeof(WKChar) == sizeof(UChar), "Size of WKChar must match size of UChar");
unsigned unsignedBufferLength = std::min<size_t>(bufferLength, std::numeric_limits<unsigned>::max());
- auto substring = toImpl(stringRef)->stringView().substring(0, unsignedBufferLength);
+ auto substring = WebKit::toImpl(stringRef)->stringView().substring(0, unsignedBufferLength);
substring.getCharactersWithUpconvert(reinterpret_cast<UChar*>(buffer));
return substring.length();
@@ -66,7 +64,7 @@
size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
{
- return toImpl(stringRef)->stringView().length() * 3 + 1;
+ return WebKit::toImpl(stringRef)->stringView().length() * 3 + 1;
}
enum StrictType { NonStrict = false, Strict = true };
@@ -77,7 +75,7 @@
if (!bufferSize)
return 0;
- auto stringView = toImpl(stringRef)->stringView();
+ auto stringView = WebKit::toImpl(stringRef)->stringView();
char* p = buffer;
WTF::Unicode::ConversionResult result;
@@ -109,7 +107,7 @@
bool WKStringIsEqual(WKStringRef aRef, WKStringRef bRef)
{
- return toImpl(aRef)->stringView() == toImpl(bRef)->stringView();
+ return WebKit::toImpl(aRef)->stringView() == WebKit::toImpl(bRef)->stringView();
}
bool WKStringIsEqualToUTF8CString(WKStringRef aRef, const char* b)
@@ -116,7 +114,7 @@
{
// FIXME: Should we add a fast path that avoids memory allocation when the string is all ASCII?
// FIXME: We can do even the general case more efficiently if we write a function in StringView that understands UTF-8 C strings.
- return toImpl(aRef)->stringView() == WTF::String::fromUTF8(b);
+ return WebKit::toImpl(aRef)->stringView() == WTF::String::fromUTF8(b);
}
bool WKStringIsEqualToUTF8CStringIgnoringCase(WKStringRef aRef, const char* b)
@@ -123,7 +121,7 @@
{
// FIXME: Should we add a fast path that avoids memory allocation when the string is all ASCII?
// FIXME: We can do even the general case more efficiently if we write a function in StringView that understands UTF-8 C strings.
- return equalIgnoringASCIICase(toImpl(aRef)->stringView(), WTF::String::fromUTF8(b));
+ return equalIgnoringASCIICase(WebKit::toImpl(aRef)->stringView(), WTF::String::fromUTF8(b));
}
WKStringRef WKStringCreateWithJSString(JSStringRef jsStringRef)
@@ -130,11 +128,11 @@
{
auto apiString = jsStringRef ? API::String::create(jsStringRef->string()) : API::String::createNull();
- return toAPI(&apiString.leakRef());
+ return WebKit::toAPI(&apiString.leakRef());
}
JSStringRef WKStringCopyJSString(WKStringRef stringRef)
{
JSC::initializeThreading();
- return OpaqueJSString::tryCreate(toImpl(stringRef)->string()).leakRef();
+ return OpaqueJSString::tryCreate(WebKit::toImpl(stringRef)->string()).leakRef();
}
Modified: trunk/Source/WebKit/Shared/API/c/WKType.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKType.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKType.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -29,16 +29,14 @@
#include "APIObject.h"
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKGetTypeID(WKTypeRef typeRef)
{
- return toAPI(toImpl(typeRef)->type());
+ return WebKit::toAPI(WebKit::toImpl(typeRef)->type());
}
WKTypeRef WKRetain(WKTypeRef typeRef)
{
- toImpl(typeRef)->ref();
+ WebKit::toImpl(typeRef)->ref();
return typeRef;
}
@@ -45,5 +43,5 @@
void WKRelease(WKTypeRef typeRef)
{
- toImpl(typeRef)->deref();
+ WebKit::toImpl(typeRef)->deref();
}
Modified: trunk/Source/WebKit/Shared/API/c/WKURL.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKURL.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKURL.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -28,49 +28,47 @@
#include "WKAPICast.h"
-using namespace WebKit;
-
WKTypeID WKURLGetTypeID()
{
- return toAPI(API::URL::APIType);
+ return WebKit::toAPI(API::URL::APIType);
}
WKURLRef WKURLCreateWithUTF8CString(const char* string)
{
- return toAPI(&API::URL::create(String::fromUTF8(string)).leakRef());
+ return WebKit::toAPI(&API::URL::create(String::fromUTF8(string)).leakRef());
}
WKURLRef WKURLCreateWithBaseURL(WKURLRef baseURL, const char* relative)
{
- return toAPI(&API::URL::create(toImpl(baseURL), String::fromUTF8(relative)).leakRef());
+ return WebKit::toAPI(&API::URL::create(WebKit::toImpl(baseURL), String::fromUTF8(relative)).leakRef());
}
WKStringRef WKURLCopyString(WKURLRef url)
{
- return toCopiedAPI(toImpl(url)->string());
+ return WebKit::toCopiedAPI(WebKit::toImpl(url)->string());
}
bool WKURLIsEqual(WKURLRef a, WKURLRef b)
{
- return API::URL::equals(*toImpl(a), *toImpl(b));
+ return API::URL::equals(*WebKit::toImpl(a), *WebKit::toImpl(b));
}
WKStringRef WKURLCopyHostName(WKURLRef url)
{
- return toCopiedAPI(toImpl(url)->host());
+ return WebKit::toCopiedAPI(WebKit::toImpl(url)->host());
}
WKStringRef WKURLCopyScheme(WKURLRef url)
{
- return toCopiedAPI(toImpl(url)->protocol());
+ return WebKit::toCopiedAPI(WebKit::toImpl(url)->protocol());
}
WK_EXPORT WKStringRef WKURLCopyPath(WKURLRef url)
{
- return toCopiedAPI(toImpl(url)->path());
+ return WebKit::toCopiedAPI(WebKit::toImpl(url)->path());
}
WKStringRef WKURLCopyLastPathComponent(WKURLRef url)
{
- return toCopiedAPI(toImpl(url)->lastPathComponent());
+ return WebKit::toCopiedAPI(WebKit::toImpl(url)->lastPathComponent());
}
Modified: trunk/Source/WebKit/Shared/API/c/WKURLRequest.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKURLRequest.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKURLRequest.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -31,39 +31,36 @@
#include "WKData.h"
#include <wtf/URL.h>
-using namespace WebCore;
-using namespace WebKit;
-
WKTypeID WKURLRequestGetTypeID()
{
- return toAPI(API::URLRequest::APIType);
+ return WebKit::toAPI(API::URLRequest::APIType);
}
WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef url)
{
- return toAPI(&API::URLRequest::create(URL(URL(), toImpl(url)->string())).leakRef());
+ return WebKit::toAPI(&API::URLRequest::create(URL(URL(), WebKit::toImpl(url)->string())).leakRef());
}
WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
{
- return toCopiedURLAPI(toImpl(requestRef)->resourceRequest().url());
+ return WebKit::toCopiedURLAPI(WebKit::toImpl(requestRef)->resourceRequest().url());
}
WKURLRef WKURLRequestCopyFirstPartyForCookies(WKURLRequestRef requestRef)
{
- return toCopiedURLAPI(toImpl(requestRef)->resourceRequest().firstPartyForCookies());
+ return WebKit::toCopiedURLAPI(WebKit::toImpl(requestRef)->resourceRequest().firstPartyForCookies());
}
WKStringRef WKURLRequestCopyHTTPMethod(WKURLRequestRef requestRef)
{
- return toCopiedAPI(toImpl(requestRef)->resourceRequest().httpMethod());
+ return WebKit::toCopiedAPI(WebKit::toImpl(requestRef)->resourceRequest().httpMethod());
}
WKURLRequestRef WKURLRequestCopySettingHTTPBody(WKURLRequestRef requestRef, WKDataRef body)
{
- WebCore::ResourceRequest requestCopy(toImpl(requestRef)->resourceRequest());
- requestCopy.setHTTPBody(FormData::create(WKDataGetBytes(body), WKDataGetSize(body)));
- return toAPI(&API::URLRequest::create(requestCopy).leakRef());
+ WebCore::ResourceRequest requestCopy(WebKit::toImpl(requestRef)->resourceRequest());
+ requestCopy.setHTTPBody(WebCore::FormData::create(WKDataGetBytes(body), WKDataGetSize(body)));
+ return WebKit::toAPI(&API::URLRequest::create(requestCopy).leakRef());
}
void WKURLRequestSetDefaultTimeoutInterval(double timeoutInterval)
Modified: trunk/Source/WebKit/Shared/API/c/WKURLResponse.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKURLResponse.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKURLResponse.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -30,39 +30,37 @@
#include "WKAPICast.h"
#include <wtf/URL.h>
-using namespace WebKit;
-
WKTypeID WKURLResponseGetTypeID()
{
- return toAPI(API::URLResponse::APIType);
+ return WebKit::toAPI(API::URLResponse::APIType);
}
WKURLRef WKURLResponseCopyURL(WKURLResponseRef responseRef)
{
- return toCopiedURLAPI(toImpl(responseRef)->resourceResponse().url());
+ return WebKit::toCopiedURLAPI(WebKit::toImpl(responseRef)->resourceResponse().url());
}
WKStringRef WKURLResponseCopyMIMEType(WKURLResponseRef responseRef)
{
- return toCopiedAPI(toImpl(responseRef)->resourceResponse().mimeType());
+ return WebKit::toCopiedAPI(WebKit::toImpl(responseRef)->resourceResponse().mimeType());
}
int32_t WKURLResponseHTTPStatusCode(WKURLResponseRef responseRef)
{
- return toImpl(responseRef)->resourceResponse().httpStatusCode();
+ return WebKit::toImpl(responseRef)->resourceResponse().httpStatusCode();
}
WKStringRef WKURLResponseCopySuggestedFilename(WKURLResponseRef responseRef)
{
- return toCopiedAPI(toImpl(responseRef)->resourceResponse().suggestedFilename());
+ return WebKit::toCopiedAPI(WebKit::toImpl(responseRef)->resourceResponse().suggestedFilename());
}
bool WKURLResponseIsAttachment(WKURLResponseRef responseRef)
{
- return toImpl(responseRef)->resourceResponse().isAttachment();
+ return WebKit::toImpl(responseRef)->resourceResponse().isAttachment();
}
uint32_t WKURLResponseGetExpectedContentLength(WKURLResponseRef responseRef)
{
- return toImpl(responseRef)->resourceResponse().expectedContentLength();
+ return WebKit::toImpl(responseRef)->resourceResponse().expectedContentLength();
}
Modified: trunk/Source/WebKit/Shared/API/c/WKUserContentURLPattern.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/WKUserContentURLPattern.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/WKUserContentURLPattern.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -30,39 +30,37 @@
#include "WKAPICast.h"
#include "WKString.h"
-using namespace WebKit;
-
WKTypeID WKUserContentURLPatternGetTypeID()
{
- return toAPI(API::UserContentURLPattern::APIType);
+ return WebKit::toAPI(API::UserContentURLPattern::APIType);
}
WKUserContentURLPatternRef WKUserContentURLPatternCreate(WKStringRef patternRef)
{
- return toAPI(&API::UserContentURLPattern::create(toImpl(patternRef)->string()).leakRef());
+ return WebKit::toAPI(&API::UserContentURLPattern::create(WebKit::toImpl(patternRef)->string()).leakRef());
}
WKStringRef WKUserContentURLPatternCopyHost(WKUserContentURLPatternRef urlPatternRef)
{
- return toCopiedAPI(toImpl(urlPatternRef)->host());
+ return WebKit::toCopiedAPI(WebKit::toImpl(urlPatternRef)->host());
}
WKStringRef WKUserContentURLPatternCopyScheme(WKUserContentURLPatternRef urlPatternRef)
{
- return toCopiedAPI(toImpl(urlPatternRef)->scheme());
+ return WebKit::toCopiedAPI(WebKit::toImpl(urlPatternRef)->scheme());
}
bool WKUserContentURLPatternIsValid(WKUserContentURLPatternRef urlPatternRef)
{
- return toImpl(urlPatternRef)->isValid();
+ return WebKit::toImpl(urlPatternRef)->isValid();
}
bool WKUserContentURLPatternMatchesURL(WKUserContentURLPatternRef urlPatternRef, WKURLRef urlRef)
{
- return toImpl(urlPatternRef)->matchesURL(toWTFString(urlRef));
+ return WebKit::toImpl(urlPatternRef)->matchesURL(WebKit::toWTFString(urlRef));
}
bool WKUserContentURLPatternMatchesSubdomains(WKUserContentURLPatternRef urlPatternRef)
{
- return toImpl(urlPatternRef)->matchesSubdomains();
+ return WebKit::toImpl(urlPatternRef)->matchesSubdomains();
}
Modified: trunk/Source/WebKit/Shared/API/c/cairo/WKImageCairo.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/cairo/WKImageCairo.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/cairo/WKImageCairo.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -34,19 +34,16 @@
#include <WebCore/PlatformContextCairo.h>
#include <cairo.h>
-using namespace WebKit;
-using namespace WebCore;
-
cairo_surface_t* WKImageCreateCairoSurface(WKImageRef imageRef)
{
// We cannot pass a RefPtr through the API here, so we just leak the reference.
- return toImpl(imageRef)->bitmap().createCairoSurface().leakRef();
+ return WebKit::toImpl(imageRef)->bitmap().createCairoSurface().leakRef();
}
WKImageRef WKImageCreateFromCairoSurface(cairo_surface_t* surface, WKImageOptions options)
{
- IntSize imageSize(cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface));
- auto webImage = WebImage::create(imageSize, toImageOptions(options));
+ WebCore::IntSize imageSize(cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface));
+ auto webImage = WebKit::WebImage::create(imageSize, WebKit::toImageOptions(options));
auto graphicsContext = webImage->bitmap().createGraphicsContext();
cairo_t* cr = graphicsContext->platformContext()->cr();
Modified: trunk/Source/WebKit/Shared/API/c/curl/WKCertificateInfoCurl.cpp (238886 => 238887)
--- trunk/Source/WebKit/Shared/API/c/curl/WKCertificateInfoCurl.cpp 2018-12-05 05:51:20 UTC (rev 238886)
+++ trunk/Source/WebKit/Shared/API/c/curl/WKCertificateInfoCurl.cpp 2018-12-05 06:52:17 UTC (rev 238887)
@@ -34,8 +34,6 @@
#include <WebCore/CertificateInfo.h>
-using namespace WebKit;
-
using Certificate = Vector<uint8_t>;
using CertificateChain = Vector<Certificate>;
@@ -55,19 +53,19 @@
int WKCertificateInfoGetVerificationError(WKCertificateInfoRef certificateInfoRef)
{
- return toImpl(certificateInfoRef)->certificateInfo().verificationError();
+ return WebKit::toImpl(certificateInfoRef)->certificateInfo().verificationError();
}
size_t WKCertificateInfoGetCertificateChainSize(WKCertificateInfoRef certificateInfoRef)
{
- return toImpl(certificateInfoRef)->certificateInfo().certificateChain().size();
+ return WebKit::toImpl(certificateInfoRef)->certificateInfo().certificateChain().size();
}
WKDataRef WKCertificateInfoCopyCertificateAtIndex(WKCertificateInfoRef certificateInfoRef, size_t index)
{
- if (toImpl(certificateInfoRef)->certificateInfo().certificateChain().size() <= index)
+ if (WebKit::toImpl(certificateInfoRef)->certificateInfo().certificateChain().size() <= index)
return WebKit::toAPI(&API::Data::create(nullptr, 0).leakRef());
- const auto& certificate = toImpl(certificateInfoRef)->certificateInfo().certificateChain().at(index);
+ const auto& certificate = WebKit::toImpl(certificateInfoRef)->certificateInfo().certificateChain().at(index);
return WebKit::toAPI(&API::Data::create(reinterpret_cast<const unsigned char*>(certificate.data()), certificate.size()).leakRef());
}