Changeset 66933 in webkit
- Timestamp:
- Sep 7, 2010 4:51:45 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r66916 r66933 1 2010-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 1 16 2010-09-07 Anders Carlsson <andersca@apple.com> 2 17 -
trunk/WebKit2/UIProcess/API/C/WKAPICast.h
r66676 r66933 121 121 }; 122 122 123 } // namespace WebKit124 125 123 /* Opaque typing convenience methods */ 126 124 127 125 template<typename T> 128 inline typename WebKit::APITypeInfo<T>::ImplType toWK(T t)126 inline typename APITypeInfo<T>::ImplType toWK(T t) 129 127 { 130 128 // An example of the conversions that take place: … … 134 132 typedef typename WTF::RemoveConst<PotentiallyConstValueType>::Type NonConstValueType; 135 133 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)); 137 135 } 138 136 139 137 template<typename T> 140 inline typename WebKit::ImplTypeInfo<T>::APIType toRef(T t)141 { 142 return reinterpret_cast<typename WebKit::ImplTypeInfo<T>::APIType>(t);138 inline typename ImplTypeInfo<T>::APIType toRef(T t) 139 { 140 return reinterpret_cast<typename ImplTypeInfo<T>::APIType>(t); 143 141 } 144 142 145 143 /* Special cases. */ 146 144 147 inline WebKit::ProxyingRefPtr<WebKit::WebString> toRef(WTF::StringImpl* string)145 inline ProxyingRefPtr<WebString> toRef(WTF::StringImpl* string) 148 146 { 149 147 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 151 inline ProxyingRefPtr<WebURL> toURLRef(WTF::StringImpl* string) 154 152 { 155 153 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))); 157 155 } 158 156 … … 160 158 { 161 159 WTF::StringImpl* impl = string.impl() ? string.impl() : WTF::StringImpl::empty(); 162 RefPtr<Web Kit::WebString> webString = WebKit::WebString::create(WTF::String(impl));160 RefPtr<WebString> webString = WebString::create(WTF::String(impl)); 163 161 return toRef(webString.release().releaseRef()); 164 162 } … … 167 165 { 168 166 WTF::StringImpl* impl = string.impl() ? string.impl() : WTF::StringImpl::empty(); 169 RefPtr<Web Kit::WebURL> webURL = WebKit::WebURL::create(WTF::String(impl));167 RefPtr<WebURL> webURL = WebURL::create(WTF::String(impl)); 170 168 return toRef(webURL.release().releaseRef()); 171 169 } … … 187 185 /* Enum conversions */ 188 186 189 inline WKTypeID toRef( WebKit::APIObject::Type type)187 inline WKTypeID toRef(APIObject::Type type) 190 188 { 191 189 return static_cast<WKTypeID>(type); … … 220 218 } 221 219 222 inline WKEventModifiers toRef(Web Kit::WebEvent::Modifiers modifiers)220 inline WKEventModifiers toRef(WebEvent::Modifiers modifiers) 223 221 { 224 222 WKEventModifiers wkModifiers = 0; 225 if (modifiers & Web Kit::WebEvent::ShiftKey)223 if (modifiers & WebEvent::ShiftKey) 226 224 wkModifiers |= kWKEventModifiersShiftKey; 227 if (modifiers & Web Kit::WebEvent::ControlKey)225 if (modifiers & WebEvent::ControlKey) 228 226 wkModifiers |= kWKEventModifiersControlKey; 229 if (modifiers & Web Kit::WebEvent::AltKey)227 if (modifiers & WebEvent::AltKey) 230 228 wkModifiers |= kWKEventModifiersAltKey; 231 if (modifiers & Web Kit::WebEvent::MetaKey)229 if (modifiers & WebEvent::MetaKey) 232 230 wkModifiers |= kWKEventModifiersMetaKey; 233 231 return wkModifiers; 234 232 } 235 233 234 } // namespace WebKit 235 236 236 #endif // WKAPICast_h -
trunk/WebKit2/UIProcess/API/C/cf/WKStringCF.cpp
r65465 r66933 30 30 31 31 using namespace WebCore; 32 using namespace WebKit; 32 33 33 34 WKStringRef WKStringCreateWithCFString(CFStringRef cfString) -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h
r66639 r66933 71 71 template<> struct BundleImplTypeInfo<WebCore::Range*> { typedef WKBundleRangeRef APIType; }; 72 72 73 } // namespace WebKit74 75 73 /* Opaque typing convenience methods */ 76 74 77 75 template<typename T> 78 inline typename WebKit::BundleAPITypeInfo<T>::ImplType toWK(T t)76 inline typename BundleAPITypeInfo<T>::ImplType toWK(T t) 79 77 { 80 78 typedef typename WTF::RemovePointer<T>::Type PotentiallyConstValueType; 81 79 typedef typename WTF::RemoveConst<PotentiallyConstValueType>::Type NonConstValueType; 82 80 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)); 84 82 } 85 83 86 84 template<typename T> 87 inline typename WebKit::BundleImplTypeInfo<T>::APIType toRef(T t)85 inline typename BundleImplTypeInfo<T>::APIType toRef(T t) 88 86 { 89 return reinterpret_cast<typename WebKit::BundleImplTypeInfo<T>::APIType>(t);87 return reinterpret_cast<typename BundleImplTypeInfo<T>::APIType>(t); 90 88 } 91 89 … … 160 158 } 161 159 160 } // namespace WebKit 161 162 162 #endif // WKBundleAPICast_h
Note: See TracChangeset
for help on using the changeset viewer.