| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 {"location", EventV8Internal::locationAttributeGetterCallback, 0, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), 0 /* on instance */}, | 129 {"location", EventV8Internal::locationAttributeGetterCallback, 0, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), 0 /* on instance */}, |
| 130 {"keyLocation", EventV8Internal::keyLocationAttributeGetterCallback, 0, 0, 0
, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttrib
ute>(v8::None), 0 /* on instance */}, | 130 {"keyLocation", EventV8Internal::keyLocationAttributeGetterCallback, 0, 0, 0
, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttrib
ute>(v8::None), 0 /* on instance */}, |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 bool initializeEvent(EventInit& eventInit, const Dictionary& options, ExceptionS
tate& exceptionState, const String& forEventName) | 133 bool initializeEvent(EventInit& eventInit, const Dictionary& options, ExceptionS
tate& exceptionState, const String& forEventName) |
| 134 { | 134 { |
| 135 Dictionary::ConversionContext conversionContext(forEventName.isEmpty() ? Str
ing("TestExtendedEvent") : forEventName, "", exceptionState); | 135 Dictionary::ConversionContext conversionContext(forEventName.isEmpty() ? Str
ing("TestExtendedEvent") : forEventName, "", exceptionState); |
| 136 if (!initializeTestEvent(eventInit, options, exceptionState, forEventName.is
Empty() ? String("TestExtendedEvent") : forEventName)) | 136 if (!initializeTestEvent(eventInit, options, exceptionState, forEventName.is
Empty() ? String("TestExtendedEvent") : forEventName)) |
| 137 return false; | 137 return false; |
| 138 | 138 |
| 139 if (!options.convert(conversionContext.withAttributes(false, NormalConversio
n), "location", eventInit.location)) | 139 if (!options.convert(conversionContext.conversionType(false, NormalConversio
n, "unsigned long"), "location", eventInit.location)) |
| 140 return false; | 140 return false; |
| 141 if (options.convert(conversionContext.withAttributes(false, NormalConversion
), "keyLocation", eventInit.location)) { | 141 if (options.convert(conversionContext.conversionType(false, NormalConversion
, "unsigned long"), "keyLocation", eventInit.location)) { |
| 142 if (options.hasProperty("keyLocation")) | 142 if (options.hasProperty("keyLocation")) |
| 143 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::K
eyboardEventKeyLocation); | 143 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::K
eyboardEventKeyLocation); |
| 144 } else { | 144 } else { |
| 145 return false; | 145 return false; |
| 146 } | 146 } |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 | 149 |
| 150 void V8TestExtendedEvent::constructorCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 150 void V8TestExtendedEvent::constructorCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 151 { | 151 { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 } | 239 } |
| 240 | 240 |
| 241 template<> | 241 template<> |
| 242 v8::Handle<v8::Value> toV8NoInline(Event* impl, v8::Handle<v8::Object> creationC
ontext, v8::Isolate* isolate) | 242 v8::Handle<v8::Value> toV8NoInline(Event* impl, v8::Handle<v8::Object> creationC
ontext, v8::Isolate* isolate) |
| 243 { | 243 { |
| 244 return toV8(impl, creationContext, isolate); | 244 return toV8(impl, creationContext, isolate); |
| 245 } | 245 } |
| 246 | 246 |
| 247 } // namespace WebCore | 247 } // namespace WebCore |
| 248 #endif // ENABLE(TEST) | 248 #endif // ENABLE(TEST) |
| OLD | NEW |