Changeset 66933 in webkit


Ignore:
Timestamp:
Sep 7, 2010 4:51:45 PM (14 years ago)
Author:
andersca@apple.com
Message:

Fix clang++ build.

Reviewed by Sam Weinig.

  • UIProcess/API/C/WKAPICast.h:

Move all functions into the WebKit namespace.

  • UIProcess/API/C/cf/WKStringCF.cpp:

Add using namespace WebKit.

  • WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:

Move all functions into the WebKit namespace.

Location:
trunk/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r66916 r66933  
     12010-09-07  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Fix clang++ build.
     6
     7        * UIProcess/API/C/WKAPICast.h:
     8        Move all functions into the WebKit namespace.
     9       
     10        * UIProcess/API/C/cf/WKStringCF.cpp:
     11        Add using namespace WebKit.
     12
     13        * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
     14        Move all functions into the WebKit namespace.
     15
    1162010-09-07  Anders Carlsson  <andersca@apple.com>
    217
  • trunk/WebKit2/UIProcess/API/C/WKAPICast.h

    r66676 r66933  
    121121};
    122122
    123 } // namespace WebKit
    124 
    125123/* Opaque typing convenience methods */
    126124
    127125template<typename T>
    128 inline typename WebKit::APITypeInfo<T>::ImplType toWK(T t)
     126inline typename APITypeInfo<T>::ImplType toWK(T t)
    129127{
    130128    // An example of the conversions that take place:
     
    134132    typedef typename WTF::RemoveConst<PotentiallyConstValueType>::Type NonConstValueType;
    135133
    136     return reinterpret_cast<typename WebKit::APITypeInfo<T>::ImplType>(const_cast<NonConstValueType*>(t));
     134    return reinterpret_cast<typename APITypeInfo<T>::ImplType>(const_cast<NonConstValueType*>(t));
    137135}
    138136
    139137template<typename T>
    140 inline typename WebKit::ImplTypeInfo<T>::APIType toRef(T t)
    141 {
    142     return reinterpret_cast<typename WebKit::ImplTypeInfo<T>::APIType>(t);
     138inline typename ImplTypeInfo<T>::APIType toRef(T t)
     139{
     140    return reinterpret_cast<typename ImplTypeInfo<T>::APIType>(t);
    143141}
    144142
    145143/* Special cases. */
    146144
    147 inline WebKit::ProxyingRefPtr<WebKit::WebString> toRef(WTF::StringImpl* string)
     145inline ProxyingRefPtr<WebString> toRef(WTF::StringImpl* string)
    148146{
    149147    WTF::StringImpl* impl = string ? string : WTF::StringImpl::empty();
    150     return WebKit::ProxyingRefPtr<WebKit::WebString>(WebKit::WebString::create(WTF::String(impl)));
    151 }
    152 
    153 inline WebKit::ProxyingRefPtr<WebKit::WebURL> toURLRef(WTF::StringImpl* string)
     148    return ProxyingRefPtr<WebString>(WebString::create(WTF::String(impl)));
     149}
     150
     151inline ProxyingRefPtr<WebURL> toURLRef(WTF::StringImpl* string)
    154152{
    155153    WTF::StringImpl* impl = string ? string : WTF::StringImpl::empty();
    156     return WebKit::ProxyingRefPtr<WebKit::WebURL>(WebKit::WebURL::create(WTF::String(impl)));
     154    return ProxyingRefPtr<WebURL>(WebURL::create(WTF::String(impl)));
    157155}
    158156
     
    160158{
    161159    WTF::StringImpl* impl = string.impl() ? string.impl() : WTF::StringImpl::empty();
    162     RefPtr<WebKit::WebString> webString = WebKit::WebString::create(WTF::String(impl));
     160    RefPtr<WebString> webString = WebString::create(WTF::String(impl));
    163161    return toRef(webString.release().releaseRef());
    164162}
     
    167165{
    168166    WTF::StringImpl* impl = string.impl() ? string.impl() : WTF::StringImpl::empty();
    169     RefPtr<WebKit::WebURL> webURL = WebKit::WebURL::create(WTF::String(impl));
     167    RefPtr<WebURL> webURL = WebURL::create(WTF::String(impl));
    170168    return toRef(webURL.release().releaseRef());
    171169}
     
    187185/* Enum conversions */
    188186
    189 inline WKTypeID toRef(WebKit::APIObject::Type type)
     187inline WKTypeID toRef(APIObject::Type type)
    190188{
    191189    return static_cast<WKTypeID>(type);
     
    220218}
    221219
    222 inline WKEventModifiers toRef(WebKit::WebEvent::Modifiers modifiers)
     220inline WKEventModifiers toRef(WebEvent::Modifiers modifiers)
    223221{
    224222    WKEventModifiers wkModifiers = 0;
    225     if (modifiers & WebKit::WebEvent::ShiftKey)
     223    if (modifiers & WebEvent::ShiftKey)
    226224        wkModifiers |= kWKEventModifiersShiftKey;
    227     if (modifiers & WebKit::WebEvent::ControlKey)
     225    if (modifiers & WebEvent::ControlKey)
    228226        wkModifiers |= kWKEventModifiersControlKey;
    229     if (modifiers & WebKit::WebEvent::AltKey)
     227    if (modifiers & WebEvent::AltKey)
    230228        wkModifiers |= kWKEventModifiersAltKey;
    231     if (modifiers & WebKit::WebEvent::MetaKey)
     229    if (modifiers & WebEvent::MetaKey)
    232230        wkModifiers |= kWKEventModifiersMetaKey;
    233231    return wkModifiers;
    234232}
    235233
     234} // namespace WebKit
     235
    236236#endif // WKAPICast_h
  • trunk/WebKit2/UIProcess/API/C/cf/WKStringCF.cpp

    r65465 r66933  
    3030
    3131using namespace WebCore;
     32using namespace WebKit;
    3233
    3334WKStringRef WKStringCreateWithCFString(CFStringRef cfString)
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h

    r66639 r66933  
    7171template<> struct BundleImplTypeInfo<WebCore::Range*>                   { typedef WKBundleRangeRef APIType; };
    7272
    73 } // namespace WebKit
    74 
    7573/* Opaque typing convenience methods */
    7674
    7775template<typename T>
    78 inline typename WebKit::BundleAPITypeInfo<T>::ImplType toWK(T t)
     76inline typename BundleAPITypeInfo<T>::ImplType toWK(T t)
    7977{
    8078    typedef typename WTF::RemovePointer<T>::Type PotentiallyConstValueType;
    8179    typedef typename WTF::RemoveConst<PotentiallyConstValueType>::Type NonConstValueType;
    8280
    83     return reinterpret_cast<typename WebKit::BundleAPITypeInfo<T>::ImplType>(const_cast<NonConstValueType*>(t));
     81    return reinterpret_cast<typename BundleAPITypeInfo<T>::ImplType>(const_cast<NonConstValueType*>(t));
    8482}
    8583
    8684template<typename T>
    87 inline typename WebKit::BundleImplTypeInfo<T>::APIType toRef(T t)
     85inline typename BundleImplTypeInfo<T>::APIType toRef(T t)
    8886{
    89     return reinterpret_cast<typename WebKit::BundleImplTypeInfo<T>::APIType>(t);
     87    return reinterpret_cast<typename BundleImplTypeInfo<T>::APIType>(t);
    9088}
    9189
     
    160158}
    161159
     160} // namespace WebKit
     161
    162162#endif // WKBundleAPICast_h
Note: See TracChangeset for help on using the changeset viewer.