Changeset 160395 in webkit


Ignore:
Timestamp:
Dec 10, 2013 4:19:07 PM (10 years ago)
Author:
andersca@apple.com
Message:

Move number and geometry classes into the API namespace
https://bugs.webkit.org/show_bug.cgi?id=125549

Reviewed by Geoffrey Garen.

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(-[WKRemoteObjectEncoder encodeBool:forKey:]):
(-[WKRemoteObjectEncoder encodeInt64:forKey:]):
(-[WKRemoteObjectEncoder encodeDouble:forKey:]):
(-[WKRemoteObjectDecoder decodeBoolForKey:]):
(-[WKRemoteObjectDecoder decodeInt64ForKey:]):
(-[WKRemoteObjectDecoder decodeDoubleForKey:]):

  • Shared/API/c/WKGeometry.cpp:

(WKSizeGetTypeID):
(WKPointGetTypeID):
(WKRectGetTypeID):
(WKPointCreate):
(WKSizeCreate):
(WKRectCreate):

  • Shared/API/c/WKNumber.cpp:

(WKBooleanGetTypeID):
(WKBooleanCreate):
(WKDoubleGetTypeID):
(WKDoubleCreate):
(WKUInt64GetTypeID):
(WKUInt64Create):

  • Shared/API/c/WKSharedAPICast.h:
  • Shared/APIGeometry.cpp:

(API::Point::encode):
(API::Point::decode):
(API::Size::encode):
(API::Size::decode):
(API::Rect::encode):
(API::Rect::decode):

  • Shared/APIGeometry.h:

(API::Size::create):
(API::Size::Size):
(API::Point::create):
(API::Point::Point):
(API::Rect::create):
(API::Rect::Rect):

  • Shared/APINumber.h:

(API::Number::create):
(API::Number::decode):
(API::Number::Number):

  • Shared/APIObject.h:
  • Shared/Plugins/Netscape/PluginInformation.cpp:

(WebKit::getPluginModuleInformation):
(WebKit::createPluginInformationDictionary):

  • Shared/Plugins/Netscape/mac/PluginInformationMac.mm:

(WebKit::getPlatformPluginModuleInformation):

  • Shared/UserData.cpp:

(WebKit::UserData::encode):
(WebKit::UserData::decode):

  • Shared/UserMessageCoders.h:

(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):

  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:

(WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):

  • UIProcess/Notifications/WebNotificationProvider.cpp:

(WebKit::WebNotificationProvider::clearNotifications):

  • UIProcess/Plugins/PlugInAutoStartProvider.cpp:

(WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable):

  • UIProcess/StatisticsRequest.cpp:

(WebKit::addToDictionaryFromHashMap):

  • UIProcess/WebDatabaseManagerProxy.cpp:

(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFindStringMatches):

  • UIProcess/WebUIClient.cpp:

(WebKit::WebUIClient::createNewPage):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::trackedRepaintRects):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:

(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):

Location:
trunk/Source/WebKit2
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r160393 r160395  
     12013-12-10  Anders Carlsson  <andersca@apple.com>
     2
     3        Move number and geometry classes into the API namespace
     4        https://bugs.webkit.org/show_bug.cgi?id=125549
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
     9        (-[WKRemoteObjectEncoder encodeBool:forKey:]):
     10        (-[WKRemoteObjectEncoder encodeInt64:forKey:]):
     11        (-[WKRemoteObjectEncoder encodeDouble:forKey:]):
     12        (-[WKRemoteObjectDecoder decodeBoolForKey:]):
     13        (-[WKRemoteObjectDecoder decodeInt64ForKey:]):
     14        (-[WKRemoteObjectDecoder decodeDoubleForKey:]):
     15        * Shared/API/c/WKGeometry.cpp:
     16        (WKSizeGetTypeID):
     17        (WKPointGetTypeID):
     18        (WKRectGetTypeID):
     19        (WKPointCreate):
     20        (WKSizeCreate):
     21        (WKRectCreate):
     22        * Shared/API/c/WKNumber.cpp:
     23        (WKBooleanGetTypeID):
     24        (WKBooleanCreate):
     25        (WKDoubleGetTypeID):
     26        (WKDoubleCreate):
     27        (WKUInt64GetTypeID):
     28        (WKUInt64Create):
     29        * Shared/API/c/WKSharedAPICast.h:
     30        * Shared/APIGeometry.cpp:
     31        (API::Point::encode):
     32        (API::Point::decode):
     33        (API::Size::encode):
     34        (API::Size::decode):
     35        (API::Rect::encode):
     36        (API::Rect::decode):
     37        * Shared/APIGeometry.h:
     38        (API::Size::create):
     39        (API::Size::Size):
     40        (API::Point::create):
     41        (API::Point::Point):
     42        (API::Rect::create):
     43        (API::Rect::Rect):
     44        * Shared/APINumber.h:
     45        (API::Number::create):
     46        (API::Number::decode):
     47        (API::Number::Number):
     48        * Shared/APIObject.h:
     49        * Shared/Plugins/Netscape/PluginInformation.cpp:
     50        (WebKit::getPluginModuleInformation):
     51        (WebKit::createPluginInformationDictionary):
     52        * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
     53        (WebKit::getPlatformPluginModuleInformation):
     54        * Shared/UserData.cpp:
     55        (WebKit::UserData::encode):
     56        (WebKit::UserData::decode):
     57        * Shared/UserMessageCoders.h:
     58        (WebKit::UserMessageEncoder::baseEncode):
     59        (WebKit::UserMessageDecoder::baseDecode):
     60        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
     61        (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
     62        (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
     63        * UIProcess/Notifications/WebNotificationProvider.cpp:
     64        (WebKit::WebNotificationProvider::clearNotifications):
     65        * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
     66        (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
     67        (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable):
     68        * UIProcess/StatisticsRequest.cpp:
     69        (WebKit::addToDictionaryFromHashMap):
     70        * UIProcess/WebDatabaseManagerProxy.cpp:
     71        (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
     72        * UIProcess/WebPageProxy.cpp:
     73        (WebKit::WebPageProxy::didFindStringMatches):
     74        * UIProcess/WebUIClient.cpp:
     75        (WebKit::WebUIClient::createNewPage):
     76        * WebProcess/WebPage/WebPage.cpp:
     77        (WebKit::WebPage::trackedRepaintRects):
     78        * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
     79        (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
     80
    1812013-12-10  Anders Carlsson  <andersca@apple.com>
    282
  • trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm

    r160391 r160395  
    243243- (void)encodeBool:(BOOL)value forKey:(NSString *)key
    244244{
    245     _currentDictionary->set(escapeKey(key), WebBoolean::create(value));
     245    _currentDictionary->set(escapeKey(key), API::Boolean::create(value));
    246246}
    247247
    248248- (void)encodeInt64:(int64_t)value forKey:(NSString *)key
    249249{
    250     _currentDictionary->set(escapeKey(key), WebUInt64::create(value));
     250    _currentDictionary->set(escapeKey(key), API::UInt64::create(value));
    251251}
    252252
    253253- (void)encodeDouble:(double)value forKey:(NSString *)key
    254254{
    255     _currentDictionary->set(escapeKey(key), WebDouble::create(value));
     255    _currentDictionary->set(escapeKey(key), API::Double::create(value));
    256256}
    257257
     
    482482- (BOOL)decodeBoolForKey:(NSString *)key
    483483{
    484     const WebBoolean* value = _currentDictionary->get<WebBoolean>(escapeKey(key));
     484    const API::Boolean* value = _currentDictionary->get<API::Boolean>(escapeKey(key));
    485485    if (!value)
    486486        return false;
     
    490490- (int64_t)decodeInt64ForKey:(NSString *)key
    491491{
    492     const WebUInt64* value = _currentDictionary->get<WebUInt64>(escapeKey(key));
     492    const API::UInt64* value = _currentDictionary->get<API::UInt64>(escapeKey(key));
    493493    if (!value)
    494494        return 0;
     
    498498- (double)decodeDoubleForKey:(NSString *)key
    499499{
    500     const WebDouble* value = _currentDictionary->get<WebDouble>(escapeKey(key));
     500    const API::Double* value = _currentDictionary->get<API::Double>(escapeKey(key));
    501501    if (!value)
    502502        return 0;
  • trunk/Source/WebKit2/Shared/API/c/WKGeometry.cpp

    r160388 r160395  
    3434WKTypeID WKSizeGetTypeID()
    3535{
    36     return toAPI(WebSize::APIType);
     36    return toAPI(API::Size::APIType);
    3737}
    3838
    3939WKTypeID WKPointGetTypeID()
    4040{
    41     return toAPI(WebPoint::APIType);
     41    return toAPI(API::Point::APIType);
    4242}
    4343
    4444WKTypeID WKRectGetTypeID()
    4545{
    46     return toAPI(WebRect::APIType);
     46    return toAPI(API::Rect::APIType);
    4747}
    4848
    4949WKPointRef WKPointCreate(WKPoint point)
    5050{
    51     RefPtr<WebPoint> webPoint = WebPoint::create(point);
    52     return toAPI(webPoint.release().leakRef());
     51    return toAPI(API::Point::create(point).leakRef());
    5352}
    5453
    5554WKSizeRef WKSizeCreate(WKSize size)
    5655{
    57     RefPtr<WebSize> webSize = WebSize::create(size);
    58     return toAPI(webSize.release().leakRef());
     56    return toAPI(API::Size::create(size).leakRef());
    5957}
    6058
    6159WKRectRef WKRectCreate(WKRect rect)
    6260{
    63     RefPtr<WebRect> webRect = WebRect::create(rect);
    64     return toAPI(webRect.release().leakRef());
     61    return toAPI(API::Rect::create(rect).leakRef());
    6562}
    6663
  • trunk/Source/WebKit2/Shared/API/c/WKNumber.cpp

    r160391 r160395  
    3434WKTypeID WKBooleanGetTypeID()
    3535{
    36     return toAPI(WebBoolean::APIType);
     36    return toAPI(API::Boolean::APIType);
    3737}
    3838
    3939WKBooleanRef WKBooleanCreate(bool value)
    4040{
    41     RefPtr<WebBoolean> booleanObject = WebBoolean::create(value);
     41    RefPtr<API::Boolean> booleanObject = API::Boolean::create(value);
    4242    return toAPI(booleanObject.release().leakRef());
    4343}
     
    5050WKTypeID WKDoubleGetTypeID()
    5151{
    52     return toAPI(WebDouble::APIType);
     52    return toAPI(API::Double::APIType);
    5353}
    5454
    5555WKDoubleRef WKDoubleCreate(double value)
    5656{
    57     RefPtr<WebDouble> doubleObject = WebDouble::create(value);
     57    RefPtr<API::Double> doubleObject = API::Double::create(value);
    5858    return toAPI(doubleObject.release().leakRef());
    5959}
     
    6666WKTypeID WKUInt64GetTypeID()
    6767{
    68     return toAPI(WebUInt64::APIType);
     68    return toAPI(API::UInt64::APIType);
    6969}
    7070
    7171WKUInt64Ref WKUInt64Create(uint64_t value)
    7272{
    73     RefPtr<WebUInt64> uint64Object = WebUInt64::create(value);
     73    RefPtr<API::UInt64> uint64Object = API::UInt64::create(value);
    7474    return toAPI(uint64Object.release().leakRef());
    7575}
  • trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h

    r160391 r160395  
    6161namespace API {
    6262class Array;
     63class Point;
     64class Rect;
     65class Size;
    6366}
    6467
     
    7679class WebGraphicsContext;
    7780class WebImage;
    78 class WebPoint;
    79 class WebRect;
    8081class WebSecurityOrigin;
    8182class WebSerializedScriptValue;
    82 class WebSize;
    8383class WebURLRequest;
    8484class WebURLResponse;
     
    9393
    9494WK_ADD_API_MAPPING(WKArrayRef, API::Array)
    95 WK_ADD_API_MAPPING(WKBooleanRef, WebBoolean)
     95WK_ADD_API_MAPPING(WKBooleanRef, API::Boolean)
    9696WK_ADD_API_MAPPING(WKCertificateInfoRef, WebCertificateInfo)
    9797WK_ADD_API_MAPPING(WKConnectionRef, WebConnection)
     
    9999WK_ADD_API_MAPPING(WKDataRef, WebData)
    100100WK_ADD_API_MAPPING(WKDictionaryRef, ImmutableDictionary)
    101 WK_ADD_API_MAPPING(WKDoubleRef, WebDouble)
     101WK_ADD_API_MAPPING(WKDoubleRef, API::Double)
    102102WK_ADD_API_MAPPING(WKErrorRef, WebError)
    103103WK_ADD_API_MAPPING(WKGraphicsContextRef, WebGraphicsContext)
    104104WK_ADD_API_MAPPING(WKImageRef, WebImage)
    105105WK_ADD_API_MAPPING(WKMutableDictionaryRef, MutableDictionary)
    106 WK_ADD_API_MAPPING(WKPointRef, WebPoint)
    107 WK_ADD_API_MAPPING(WKRectRef, WebRect)
     106WK_ADD_API_MAPPING(WKPointRef, API::Point)
     107WK_ADD_API_MAPPING(WKRectRef, API::Rect)
    108108WK_ADD_API_MAPPING(WKSecurityOriginRef, WebSecurityOrigin)
    109109WK_ADD_API_MAPPING(WKSerializedScriptValueRef, WebSerializedScriptValue)
    110 WK_ADD_API_MAPPING(WKSizeRef, WebSize)
     110WK_ADD_API_MAPPING(WKSizeRef, API::Size)
    111111WK_ADD_API_MAPPING(WKStringRef, WebString)
    112112WK_ADD_API_MAPPING(WKTypeRef, API::Object)
    113 WK_ADD_API_MAPPING(WKUInt64Ref, WebUInt64)
     113WK_ADD_API_MAPPING(WKUInt64Ref, API::UInt64)
    114114WK_ADD_API_MAPPING(WKURLRef, WebURL)
    115115WK_ADD_API_MAPPING(WKURLRequestRef, WebURLRequest)
  • trunk/Source/WebKit2/Shared/APIGeometry.cpp

    r160390 r160395  
    3030#include "ArgumentEncoder.h"
    3131
    32 namespace WebKit {
     32namespace API {
    3333
    34 void WebPoint::encode(CoreIPC::ArgumentEncoder& encoder) const
     34void Point::encode(CoreIPC::ArgumentEncoder& encoder) const
    3535{
    3636    encoder << m_point.x;
     
    3838}
    3939
    40 bool WebPoint::decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result)
     40bool Point::decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result)
    4141{
    4242    WKPoint point;
     
    4646        return false;
    4747
    48     result = WebPoint::create(point);
     48    result = Point::create(point);
    4949    return true;
    5050}
    5151
    5252
    53 void WebSize::encode(CoreIPC::ArgumentEncoder& encoder) const
     53void Size::encode(CoreIPC::ArgumentEncoder& encoder) const
    5454{
    5555    encoder << m_size.width;
     
    5757}
    5858
    59 bool WebSize::decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result)
     59bool Size::decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result)
    6060{
    6161    WKSize size;
     
    6565        return false;
    6666
    67     result = WebSize::create(size);
     67    result = Size::create(size);
    6868    return true;
    6969}
    7070
    7171
    72 void WebRect::encode(CoreIPC::ArgumentEncoder& encoder) const
     72void Rect::encode(CoreIPC::ArgumentEncoder& encoder) const
    7373{
    7474    encoder << m_rect.origin.x;
     
    7878}
    7979
    80 bool WebRect::decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result)
     80bool Rect::decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result)
    8181{
    8282    WKRect rect;
     
    9090        return false;
    9191
    92     result = WebRect::create(rect);
     92    result = Rect::create(rect);
    9393    return true;
    9494}
    9595
    96 } // namespace WebKit
    97 
     96} // namespace API
  • trunk/Source/WebKit2/Shared/APIGeometry.h

    r160390 r160395  
    3737}
    3838
    39 namespace WebKit {
     39namespace API {
    4040
    41 class WebSize : public API::ObjectImpl<API::Object::Type::Size> {
     41class Size : public API::ObjectImpl<API::Object::Type::Size> {
    4242public:
    43     static PassRefPtr<WebSize> create(const WKSize& size)
     43    static PassRefPtr<Size> create(const WKSize& size)
    4444    {
    45         return adoptRef(new WebSize(size));
     45        return adoptRef(new Size(size));
    4646    }
    4747
     
    5252
    5353private:
    54     explicit WebSize(const WKSize& size)
     54    explicit Size(const WKSize& size)
    5555        : m_size(size)
    5656    {
     
    6060};
    6161
    62 class WebPoint : public API::ObjectImpl<API::Object::Type::Point> {
     62class Point : public API::ObjectImpl<API::Object::Type::Point> {
    6363public:
    64     static PassRefPtr<WebPoint> create(const WKPoint& point)
     64    static PassRefPtr<Point> create(const WKPoint& point)
    6565    {
    66         return adoptRef(new WebPoint(point));
     66        return adoptRef(new Point(point));
    6767    }
    6868
     
    7373
    7474private:
    75     explicit WebPoint(const WKPoint& point)
     75    explicit Point(const WKPoint& point)
    7676        : m_point(point)
    7777    { }
     
    8080};
    8181
    82 class WebRect : public API::ObjectImpl<API::Object::Type::Rect> {
     82class Rect : public API::ObjectImpl<API::Object::Type::Rect> {
    8383public:
    84     static PassRefPtr<WebRect> create(const WKRect& rect)
     84    static PassRefPtr<Rect> create(const WKRect& rect)
    8585    {
    86         return adoptRef(new WebRect(rect));
     86        return adoptRef(new Rect(rect));
    8787    }
    8888
     
    9393
    9494private:
    95     explicit WebRect(const WKRect& rect)
     95    explicit Rect(const WKRect& rect)
    9696        : m_rect(rect)
    9797    {
     
    101101};
    102102
    103 } // namespace WebKit
     103} // namespace API
    104104
    105105#endif // APIGeometry_h
  • trunk/Source/WebKit2/Shared/APINumber.h

    r160393 r160395  
    3232#include <wtf/PassRefPtr.h>
    3333
    34 namespace WebKit {
     34namespace API {
    3535
    3636template<typename NumberType, API::Object::Type APIObjectType>
    37 class WebNumber : public API::ObjectImpl<APIObjectType> {
     37class Number : public ObjectImpl<APIObjectType> {
    3838public:
    39     static PassRefPtr<WebNumber> create(NumberType value)
     39    static PassRefPtr<Number> create(NumberType value)
    4040    {
    41         return adoptRef(new WebNumber(value));
     41        return adoptRef(new Number(value));
    4242    }
    4343
     
    4949    }
    5050
    51     static bool decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result)
     51    static bool decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<Object>& result)
    5252    {
    5353        NumberType value;
     
    5555            return false;
    5656
    57         result = WebNumber::create(value);
     57        result = Number::create(value);
    5858        return true;
    5959    }
    6060
    6161private:
    62     explicit WebNumber(NumberType value)
     62    explicit Number(NumberType value)
    6363        : m_value(value)
    6464    {
     
    6868};
    6969
    70 typedef WebNumber<bool, API::Object::Type::Boolean> WebBoolean;
    71 typedef WebNumber<double, API::Object::Type::Double> WebDouble;
    72 typedef WebNumber<uint64_t, API::Object::Type::UInt64> WebUInt64;
     70typedef Number<bool, API::Object::Type::Boolean> Boolean;
     71typedef Number<double, API::Object::Type::Double> Double;
     72typedef Number<uint64_t, API::Object::Type::UInt64> UInt64;
    7373
    74 } // namespace WebKit
     74} // namespace API
    7575
    7676#endif // APINumber_h
  • trunk/Source/WebKit2/Shared/APIObject.h

    r160384 r160395  
    6767        FrameHandle,
    6868        Image,
     69        PageGroupData,
    6970        PageHandle,
    7071        ProtectionSpace,
  • trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp

    r160391 r160395  
    114114    map.set(pluginInformationPathKey(), WebString::create(plugin.path));
    115115    map.set(pluginInformationDisplayNameKey(), WebString::create(plugin.info.name));
    116     map.set(pluginInformationDefaultLoadPolicyKey(), WebUInt64::create(toWKPluginLoadPolicy(PluginInfoStore::defaultLoadPolicyForPlugin(plugin))));
     116    map.set(pluginInformationDefaultLoadPolicyKey(), API::UInt64::create(toWKPluginLoadPolicy(PluginInfoStore::defaultLoadPolicyForPlugin(plugin))));
    117117
    118118    getPlatformPluginModuleInformation(plugin, map);
     
    146146    if (!pluginURLString.isEmpty())
    147147        map.set(pluginInformationPluginURLKey(), WebURL::create(pluginURLString));
    148     map.set(plugInInformationReplacementObscuredKey(), WebBoolean::create(replacementObscured));
     148    map.set(plugInInformationReplacementObscuredKey(), API::Boolean::create(replacementObscured));
    149149
    150150    return ImmutableDictionary::adopt(map);
  • trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm

    r160391 r160395  
    4343    map.set(pluginInformationBundleVersionKey(), WebString::create(plugin.versionString));
    4444    map.set(pluginInformationBundleShortVersionKey(), WebString::create(plugin.shortVersionString));
    45     map.set(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey(), WebBoolean::create(WKIsPluginUpdateAvailable(nsStringFromWebCoreString(plugin.bundleIdentifier))));
    46     map.set(pluginInformationHasSandboxProfileKey(), WebBoolean::create(pluginHasSandboxProfile(plugin.bundleIdentifier)));
     45    map.set(pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey(), API::Boolean::create(WKIsPluginUpdateAvailable(nsStringFromWebCoreString(plugin.bundleIdentifier))));
     46    map.set(pluginInformationHasSandboxProfileKey(), API::Boolean::create(pluginHasSandboxProfile(plugin.bundleIdentifier)));
    4747}
    4848
  • trunk/Source/WebKit2/Shared/UserData.cpp

    r160393 r160395  
    116116
    117117    case API::Object::Type::Boolean:
    118         static_cast<const WebBoolean&>(object).encode(encoder);
     118        static_cast<const API::Boolean&>(object).encode(encoder);
    119119        break;
    120120
     
    138138
    139139    case API::Object::Type::Point:
    140         static_cast<const WebPoint&>(object).encode(encoder);
     140        static_cast<const API::Point&>(object).encode(encoder);
    141141
    142142    case API::Object::Type::Rect:
    143         static_cast<const WebRect&>(object).encode(encoder);
     143        static_cast<const API::Rect&>(object).encode(encoder);
    144144
    145145    case API::Object::Type::SerializedScriptValue: {
     
    150150
    151151    case API::Object::Type::Size:
    152         static_cast<const WebSize&>(object).encode(encoder);
     152        static_cast<const API::Size&>(object).encode(encoder);
    153153        break;
    154154
     
    166166
    167167    case API::Object::Type::UInt64:
    168         static_cast<const WebUInt64&>(object).encode(encoder);
     168        static_cast<const API::UInt64&>(object).encode(encoder);
    169169        break;
    170170
     
    200200
    201201    case API::Object::Type::Boolean:
    202         if (!WebBoolean::decode(decoder, result))
     202        if (!API::Boolean::decode(decoder, result))
    203203            return false;
    204204        break;
     
    228228
    229229    case API::Object::Type::Double:
    230         if (!WebDouble::decode(decoder, result))
     230        if (!API::Double::decode(decoder, result))
    231231            return false;
    232232        break;
     
    246246       
    247247    case API::Object::Type::Point:
    248         if (!WebPoint::decode(decoder, result))
     248        if (!API::Point::decode(decoder, result))
    249249            return false;
    250250        break;
    251251
    252252    case API::Object::Type::Rect:
    253         if (!WebRect::decode(decoder, result))
     253        if (!API::Rect::decode(decoder, result))
    254254            return false;
    255255        break;
     
    266266
    267267    case API::Object::Type::Size:
    268         if (!WebSize::decode(decoder, result))
     268        if (!API::Size::decode(decoder, result))
    269269            return false;
    270270        break;
     
    288288
    289289    case API::Object::Type::UInt64:
    290         if (!WebUInt64::decode(decoder, result))
     290        if (!API::UInt64::decode(decoder, result))
    291291            return false;
    292292        break;
  • trunk/Source/WebKit2/Shared/UserMessageCoders.h

    r160391 r160395  
    5959//   - WebCertificateInfo -> WebCertificateInfo
    6060//   - WebData -> WebData
    61 //   - WebDouble -> WebDouble
     61//   - API::Double -> API::Double
    6262//   - WebImage -> WebImage
    6363//   - WebRenderLayer -> WebRenderLayer
    6464//   - WebRenderObject -> WebRenderObject
    65 //   - WebUInt64 -> WebUInt64
     65//   - API::UInt64 -> API::UInt64
    6666//   - WebURL -> WebURL
    6767//   - WebURLRequest -> WebURLRequest
     
    114114        }
    115115        case API::Object::Type::Boolean: {
    116             WebBoolean* booleanObject = static_cast<WebBoolean*>(m_root);
     116            API::Boolean* booleanObject = static_cast<API::Boolean*>(m_root);
    117117            encoder << booleanObject->value();
    118118            return true;
    119119        }
    120120        case API::Object::Type::Double: {
    121             WebDouble* doubleObject = static_cast<WebDouble*>(m_root);
     121            API::Double* doubleObject = static_cast<API::Double*>(m_root);
    122122            encoder << doubleObject->value();
    123123            return true;
    124124        }
    125125        case API::Object::Type::UInt64: {
    126             WebUInt64* uint64Object = static_cast<WebUInt64*>(m_root);
     126            API::UInt64* uint64Object = static_cast<API::UInt64*>(m_root);
    127127            encoder << uint64Object->value();
    128128            return true;
    129129        }
    130130        case API::Object::Type::Point: {
    131             WebPoint* pointObject = static_cast<WebPoint*>(m_root);
     131            API::Point* pointObject = static_cast<API::Point*>(m_root);
    132132            encoder << pointObject->point().x;
    133133            encoder << pointObject->point().y;
     
    135135        }
    136136        case API::Object::Type::Size: {
    137             WebSize* sizeObject = static_cast<WebSize*>(m_root);
     137            API::Size* sizeObject = static_cast<API::Size*>(m_root);
    138138            encoder << sizeObject->size().width;
    139139            encoder << sizeObject->size().height;
     
    141141        }
    142142        case API::Object::Type::Rect: {
    143             WebRect* rectObject = static_cast<WebRect*>(m_root);
     143            API::Rect* rectObject = static_cast<API::Rect*>(m_root);
    144144            encoder << rectObject->rect().origin.x;
    145145            encoder << rectObject->rect().origin.y;
     
    250250//   - WebCertificateInfo -> WebCertificateInfo
    251251//   - WebData -> WebData
    252 //   - WebDouble -> WebDouble
     252//   - API::Double -> API::Double
    253253//   - WebImage -> WebImage
    254 //   - WebUInt64 -> WebUInt64
     254//   - API::UInt64 -> API::UInt64
    255255//   - WebURL -> WebURL
    256256//   - WebURLRequest -> WebURLRequest
     
    331331            if (!decoder.decode(value))
    332332                return false;
    333             coder.m_root = WebDouble::create(value);
     333            coder.m_root = API::Double::create(value);
    334334            break;
    335335        }
     
    338338            if (!decoder.decode(value))
    339339                return false;
    340             coder.m_root = WebUInt64::create(value);
     340            coder.m_root = API::UInt64::create(value);
    341341            break;
    342342        }
     
    345345            if (!decoder.decode(value))
    346346                return false;
    347             coder.m_root = WebBoolean::create(value);
     347            coder.m_root = API::Boolean::create(value);
    348348            break;
    349349        }
     
    355355            if (!decoder.decode(height))
    356356                return false;
    357             coder.m_root = WebSize::create(WKSizeMake(width, height));
     357            coder.m_root = API::Size::create(WKSizeMake(width, height));
    358358            break;
    359359        }
     
    365365            if (!decoder.decode(y))
    366366                return false;
    367             coder.m_root = WebPoint::create(WKPointMake(x, y));
     367            coder.m_root = API::Point::create(WKPointMake(x, y));
    368368            break;
    369369        }
     
    381381            if (!decoder.decode(height))
    382382                return false;
    383             coder.m_root = WebRect::create(WKRectMake(x, y, width, height));
     383            coder.m_root = API::Rect::create(WKRectMake(x, y, width, height));
    384384            break;
    385385        }
  • trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp

    r159988 r160395  
    9797    for (size_t i = 0; i < knownOrigins->size(); ++i) {
    9898        WebString* origin = knownOrigins->at<WebString>(i);
    99         permissions.set(origin->string(), knownPermissions->get<WebBoolean>(origin->string())->value());
     99        permissions.set(origin->string(), knownPermissions->get<API::Boolean>(origin->string())->value());
    100100    }
    101101}
     
    209209    size_t size = globalNotificationIDs->size();
    210210    for (size_t i = 0; i < size; ++i) {
    211         auto it = m_globalNotificationMap.find(globalNotificationIDs->at<WebUInt64>(i)->value());
     211        auto it = m_globalNotificationMap.find(globalNotificationIDs->at<API::UInt64>(i)->value());
    212212        if (it == m_globalNotificationMap.end())
    213213            continue;
  • trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.cpp

    r160391 r160395  
    7070
    7171    for (const auto& notificationID : notificationIDs)
    72         arrayIDs.uncheckedAppend(WebUInt64::create(notificationID));
     72        arrayIDs.uncheckedAppend(API::UInt64::create(notificationID));
    7373
    7474    m_client.clearNotifications(toAPI(API::Array::create(std::move(arrayIDs)).get()), m_client.base.clientInfo);
  • trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp

    r159234 r160395  
    9090            if (now > valueIt->value)
    9191                continue;
    92             hashMap.set(String::number(valueIt->key), WebDouble::create(valueIt->value));
     92            hashMap.set(String::number(valueIt->key), API::Double::create(valueIt->value));
    9393        }
    9494
     
    117117                continue;
    118118
    119             if (hashIt->value->type() != WebDouble::APIType)
     119            if (hashIt->value->type() != API::Double::APIType)
    120120                continue;
    121121
    122             double expirationTime = static_cast<WebDouble*>(hashIt->value.get())->value();
     122            double expirationTime = static_cast<API::Double*>(hashIt->value.get())->value();
    123123            hashes.set(hash, expirationTime);
    124124            hashMap.set(hash, expirationTime);
  • trunk/Source/WebKit2/UIProcess/StatisticsRequest.cpp

    r159234 r160395  
    5757    HashMap<String, uint64_t>::const_iterator end = map.end();
    5858    for (HashMap<String, uint64_t>::const_iterator it = map.begin(); it != end; ++it)
    59         dictionary->set(it->key, RefPtr<WebUInt64>(WebUInt64::create(it->value)).get());
     59        dictionary->set(it->key, RefPtr<API::UInt64>(API::UInt64::create(it->value)).get());
    6060}
    6161
  • trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp

    r159988 r160395  
    171171            detailsMap.set(databaseDetailsNameKey(), WebString::create(databaseDetails.name()));
    172172            detailsMap.set(databaseDetailsDisplayNameKey(), WebString::create(databaseDetails.displayName()));
    173             detailsMap.set(databaseDetailsExpectedUsageKey(), WebUInt64::create(databaseDetails.expectedUsage()));
    174             detailsMap.set(databaseDetailsCurrentUsageKey(), WebUInt64::create(databaseDetails.currentUsage()));
     173            detailsMap.set(databaseDetailsExpectedUsageKey(), API::UInt64::create(databaseDetails.expectedUsage()));
     174            detailsMap.set(databaseDetailsCurrentUsageKey(), API::UInt64::create(databaseDetails.currentUsage()));
    175175
    176176            databases.uncheckedAppend(ImmutableDictionary::adopt(detailsMap));
     
    179179        HashMap<String, RefPtr<API::Object>> originAndDatabasesMap;
    180180        originAndDatabasesMap.set(originKey(), origin);
    181         originAndDatabasesMap.set(originQuotaKey(), WebUInt64::create(originAndDatabases.originQuota));
    182         originAndDatabasesMap.set(originUsageKey(), WebUInt64::create(originAndDatabases.originUsage));
     181        originAndDatabasesMap.set(originQuotaKey(), API::UInt64::create(originAndDatabases.originQuota));
     182        originAndDatabasesMap.set(originUsageKey(), API::UInt64::create(originAndDatabases.originUsage));
    183183        originAndDatabasesMap.set(databaseDetailsKey(), API::Array::create(std::move(databases)));
    184184
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r160385 r160395  
    30323032
    30333033        for (const auto& rect : rects)
    3034             apiRects.uncheckedAppend(WebRect::create(toAPI(rect)));
     3034            apiRects.uncheckedAppend(API::Rect::create(toAPI(rect)));
    30353035
    30363036        matches.uncheckedAppend(API::Array::create(std::move(apiRects)));
  • trunk/Source/WebKit2/UIProcess/WebUIClient.cpp

    r160391 r160395  
    5757    ImmutableDictionary::MapType map;
    5858    if (windowFeatures.xSet)
    59         map.set("x", WebDouble::create(windowFeatures.x));
     59        map.set("x", API::Double::create(windowFeatures.x));
    6060    if (windowFeatures.ySet)
    61         map.set("y", WebDouble::create(windowFeatures.y));
     61        map.set("y", API::Double::create(windowFeatures.y));
    6262    if (windowFeatures.widthSet)
    63         map.set("width", WebDouble::create(windowFeatures.width));
     63        map.set("width", API::Double::create(windowFeatures.width));
    6464    if (windowFeatures.heightSet)
    65         map.set("height", WebDouble::create(windowFeatures.height));
    66     map.set("menuBarVisible", WebBoolean::create(windowFeatures.menuBarVisible));
    67     map.set("statusBarVisible", WebBoolean::create(windowFeatures.statusBarVisible));
    68     map.set("toolBarVisible", WebBoolean::create(windowFeatures.toolBarVisible));
    69     map.set("locationBarVisible", WebBoolean::create(windowFeatures.locationBarVisible));
    70     map.set("scrollbarsVisible", WebBoolean::create(windowFeatures.scrollbarsVisible));
    71     map.set("resizable", WebBoolean::create(windowFeatures.resizable));
    72     map.set("fullscreen", WebBoolean::create(windowFeatures.fullscreen));
    73     map.set("dialog", WebBoolean::create(windowFeatures.dialog));
     65        map.set("height", API::Double::create(windowFeatures.height));
     66    map.set("menuBarVisible", API::Boolean::create(windowFeatures.menuBarVisible));
     67    map.set("statusBarVisible", API::Boolean::create(windowFeatures.statusBarVisible));
     68    map.set("toolBarVisible", API::Boolean::create(windowFeatures.toolBarVisible));
     69    map.set("locationBarVisible", API::Boolean::create(windowFeatures.locationBarVisible));
     70    map.set("scrollbarsVisible", API::Boolean::create(windowFeatures.scrollbarsVisible));
     71    map.set("resizable", API::Boolean::create(windowFeatures.resizable));
     72    map.set("fullscreen", API::Boolean::create(windowFeatures.fullscreen));
     73    map.set("dialog", API::Boolean::create(windowFeatures.dialog));
    7474    RefPtr<ImmutableDictionary> featuresMap = ImmutableDictionary::adopt(map);
    7575
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r160388 r160395  
    693693
    694694    for (const auto& repaintRect : view->trackedRepaintRects())
    695         repaintRects.uncheckedAppend(WebRect::create(toAPI(repaintRect)));
     695        repaintRects.uncheckedAppend(API::Rect::create(toAPI(repaintRect)));
    696696
    697697    return API::Array::create(std::move(repaintRects));
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm

    r159197 r160395  
    210210    if (toImpl(result.get())->type() == WebString::APIType)
    211211        return CFBridgingRelease(WKStringCopyCFString(kCFAllocatorDefault, (WKStringRef)result.get()));
    212     else if (toImpl(result.get())->type() == WebBoolean::APIType)
     212    else if (toImpl(result.get())->type() == API::Boolean::APIType)
    213213        return [NSNumber numberWithBool:WKBooleanGetValue(static_cast<WKBooleanRef>(result.get()))];
    214214
Note: See TracChangeset for help on using the changeset viewer.