Changeset 63628 in webkit
- Timestamp:
- Jul 18, 2010 10:45:32 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63622 r63628 1 2010-07-18 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 Implement some NPRuntime related NPN_ functions 6 https://bugs.webkit.org/show_bug.cgi?id=42518 7 8 * WebCore.exp.in: 9 Export IdentifierRep functions. 10 1 11 2010-07-17 TJ Lee <tjlee0909@gmail.com> 2 12 -
trunk/WebCore/WebCore.exp.in
r63595 r63628 283 283 __ZN7WebCore13HitTestResultC1ERKS0_ 284 284 __ZN7WebCore13HitTestResultD1Ev 285 __ZN7WebCore13IdentifierRep3getEi 286 __ZN7WebCore13IdentifierRep3getEPKc 285 287 __ZN7WebCore13KeyboardEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowERKNS_6StringEjbbbbb 286 288 __ZN7WebCore13TypingCommand39insertParagraphSeparatorInQuotedContentEPNS_8DocumentE -
trunk/WebKit2/ChangeLog
r63627 r63628 1 2010-07-18 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 Implement some NPRuntime related NPN_ functions 6 https://bugs.webkit.org/show_bug.cgi?id=42518 7 8 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: 9 (WebKit::NPN_GetStringIdentifier): 10 (WebKit::NPN_GetStringIdentifiers): 11 (WebKit::NPN_GetIntIdentifier): 12 (WebKit::NPN_IdentifierIsString): 13 (WebKit::NPN_UTF8FromIdentifier): 14 (WebKit::NPN_IntFromIdentifier): 15 (WebKit::NPN_CreateObject): 16 1 17 2010-07-18 Anders Carlsson <andersca@apple.com> 2 18 -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
r63451 r63628 28 28 #include "NetscapePlugin.h" 29 29 #include "NotImplemented.h" 30 #include <WebCore/IdentifierRep.h> 30 31 31 32 using namespace WebCore; … … 217 218 static NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) 218 219 { 219 notImplemented(); 220 return 0; 220 return static_cast<NPIdentifier>(IdentifierRep::get(name)); 221 221 } 222 222 223 223 static void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers) 224 224 { 225 notImplemented(); 225 ASSERT(names); 226 ASSERT(identifiers); 227 228 if (!names || !identifiers) 229 return; 230 231 for (int32_t i = 0; i < nameCount; ++i) 232 identifiers[i] = NPN_GetStringIdentifier(names[i]); 226 233 } 227 234 228 235 static NPIdentifier NPN_GetIntIdentifier(int32_t intid) 229 236 { 230 notImplemented(); 231 return 0; 237 return static_cast<NPIdentifier>(IdentifierRep::get(intid)); 232 238 } 233 239 234 240 static bool NPN_IdentifierIsString(NPIdentifier identifier) 235 241 { 236 notImplemented(); 237 return false; 242 return static_cast<IdentifierRep*>(identifier)->isString(); 238 243 } 239 244 240 245 static NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier) 241 246 { 242 notImplemented(); 243 return 0; 247 const char* string = static_cast<IdentifierRep*>(identifier)->string(); 248 if (!string) 249 return 0; 250 251 uint32_t stringLength = strlen(string); 252 char* utf8String = static_cast<char*>(NPN_MemAlloc(stringLength + 1)); 253 memcpy(utf8String, string, stringLength); 254 utf8String[stringLength] = '\0'; 255 256 return utf8String; 244 257 } 245 258 246 259 static int32_t NPN_IntFromIdentifier(NPIdentifier identifier) 247 260 { 248 notImplemented(); 249 return 0; 250 } 251 252 static NPObject *NPN_CreateObject(NPP npp, NPClass *aClass) 253 { 254 notImplemented(); 255 return 0; 261 return static_cast<IdentifierRep*>(identifier)->number(); 262 } 263 264 static NPObject* NPN_CreateObject(NPP npp, NPClass *npClass) 265 { 266 ASSERT(npClass); 267 268 NPObject* object; 269 if (npClass->allocate) 270 object = npClass->allocate(npp, npClass); 271 else 272 object = static_cast<NPObject*>(NPN_MemAlloc(sizeof(NPObject))); 273 274 object->_class = npClass; 275 object->referenceCount = 1; 276 277 return object; 256 278 } 257 279
Note: See TracChangeset
for help on using the changeset viewer.