Index: Source/bindings/tests/results/V8TestObject.cpp |
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp |
index c87706d664ba088f6f6f24251de3245b67aaef70..784fdaf50222f0b32d9c83a14482929339209f81 100644 |
--- a/Source/bindings/tests/results/V8TestObject.cpp |
+++ b/Source/bindings/tests/results/V8TestObject.cpp |
@@ -873,6 +873,123 @@ static void animatedReflectedAttributeAttributeSetterCallback(v8::Local<v8::Stri |
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
} |
+static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObj* imp = V8TestObject::toNative(info.Holder()); |
+ String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeAttr); |
+ if (resultValue.isEmpty()) { |
+ ; |
+ } else if (equalIgnoringCase(resultValue, "unique")) { |
+ resultValue = "unique"; |
+ } else { |
+ resultValue = ""; |
+ } |
+ v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
+} |
+ |
+static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
+ TestObjV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TestObj* imp = V8TestObject::toNative(info.Holder()); |
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
+ imp->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); |
+} |
+ |
+static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
+ TestObjV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObj* imp = V8TestObject::toNative(info.Holder()); |
+ String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr); |
+ if (resultValue.isEmpty()) { |
+ ; |
+ } else if (equalIgnoringCase(resultValue, "Per")) { |
+ resultValue = "Per"; |
+ } else if (equalIgnoringCase(resultValue, "Paal")) { |
+ resultValue = "Paal"; |
+ } else if (equalIgnoringCase(resultValue, "Espen")) { |
+ resultValue = "Espen"; |
+ } else { |
+ resultValue = ""; |
+ } |
+ v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
+} |
+ |
+static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
+ TestObjV8Internal::limitedToOnlyAttributeAttributeGetter(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TestObj* imp = V8TestObject::toNative(info.Holder()); |
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
+ imp->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); |
+} |
+ |
+static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
+ TestObjV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TestObj* imp = V8TestObject::toNative(info.Holder()); |
+ String resultValue = imp->fastGetAttribute(HTMLNames::OtherAttr); |
+ if (resultValue.isEmpty()) { |
+ ; |
+ } else if (equalIgnoringCase(resultValue, "Value1")) { |
+ resultValue = "Value1"; |
+ } else if (equalIgnoringCase(resultValue, "Value2")) { |
+ resultValue = "Value2"; |
+ } else { |
+ resultValue = ""; |
+ } |
+ v8SetReturnValueString(info, resultValue, info.GetIsolate()); |
+} |
+ |
+static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
+ TestObjV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
+static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TestObj* imp = V8TestObject::toNative(info.Holder()); |
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
+ imp->setAttribute(HTMLNames::OtherAttr, cppValue); |
+} |
+ |
+static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
+ CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
+ TestObjV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
+} |
+ |
static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
{ |
TestObj* imp = V8TestObject::toNative(info.Holder()); |
@@ -5138,6 +5255,9 @@ static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[] |
{"reflectedCustomBooleanAttr", TestObjV8Internal::reflectedCustomBooleanAttrAttributeGetterCallback, TestObjV8Internal::reflectedCustomBooleanAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"reflectedCustomURLAttr", TestObjV8Internal::reflectedCustomURLAttrAttributeGetterCallback, TestObjV8Internal::reflectedCustomURLAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"animatedReflectedAttribute", TestObjV8Internal::animatedReflectedAttributeAttributeGetterCallback, TestObjV8Internal::animatedReflectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"limitedToOnlyOneAttribute", TestObjV8Internal::limitedToOnlyOneAttributeAttributeGetterCallback, TestObjV8Internal::limitedToOnlyOneAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"limitedToOnlyAttribute", TestObjV8Internal::limitedToOnlyAttributeAttributeGetterCallback, TestObjV8Internal::limitedToOnlyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
+ {"limitedToOnlyOtherAttribute", TestObjV8Internal::limitedToOnlyOtherAttributeAttributeGetterCallback, TestObjV8Internal::limitedToOnlyOtherAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"typedArrayAttr", TestObjV8Internal::typedArrayAttrAttributeGetterCallback, TestObjV8Internal::typedArrayAttrAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"attrWithGetterException", TestObjV8Internal::attrWithGetterExceptionAttributeGetterCallback, TestObjV8Internal::attrWithGetterExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
{"attrWithSetterException", TestObjV8Internal::attrWithSetterExceptionAttributeGetterCallback, TestObjV8Internal::attrWithSetterExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |