Changeset 156808 in webkit
- Timestamp:
- Oct 2, 2013, 4:32:47 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 22 added
- 14 edited
-
ChangeLog (modified) (1 diff)
-
bindings/scripts/IDLParser.pm (modified) (10 diffs)
-
bindings/scripts/test/CPP/WebDOMTestObj.cpp (modified) (2 diffs)
-
bindings/scripts/test/CPP/WebDOMTestObj.h (modified) (3 diffs)
-
bindings/scripts/test/CPP/WebDOMattribute.cpp (added)
-
bindings/scripts/test/CPP/WebDOMattribute.h (added)
-
bindings/scripts/test/CPP/WebDOMreadonly.cpp (added)
-
bindings/scripts/test/CPP/WebDOMreadonly.h (added)
-
bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (modified) (5 diffs)
-
bindings/scripts/test/GObject/WebKitDOMTestObj.h (modified) (2 diffs)
-
bindings/scripts/test/GObject/WebKitDOMTestObj.symbols (modified) (2 diffs)
-
bindings/scripts/test/GObject/WebKitDOMattribute.cpp (added)
-
bindings/scripts/test/GObject/WebKitDOMattribute.h (added)
-
bindings/scripts/test/GObject/WebKitDOMattribute.symbols (added)
-
bindings/scripts/test/GObject/WebKitDOMattributePrivate.h (added)
-
bindings/scripts/test/GObject/WebKitDOMreadonly.cpp (added)
-
bindings/scripts/test/GObject/WebKitDOMreadonly.h (added)
-
bindings/scripts/test/GObject/WebKitDOMreadonly.symbols (added)
-
bindings/scripts/test/GObject/WebKitDOMreadonlyPrivate.h (added)
-
bindings/scripts/test/JS/JSTestObj.cpp (modified) (10 diffs)
-
bindings/scripts/test/JS/JSTestObj.h (modified) (3 diffs)
-
bindings/scripts/test/JS/JSattribute.cpp (added)
-
bindings/scripts/test/JS/JSattribute.h (added)
-
bindings/scripts/test/JS/JSreadonly.cpp (added)
-
bindings/scripts/test/JS/JSreadonly.h (added)
-
bindings/scripts/test/ObjC/DOMTestObj.h (modified) (3 diffs)
-
bindings/scripts/test/ObjC/DOMTestObj.mm (modified) (2 diffs)
-
bindings/scripts/test/ObjC/DOMattribute.h (added)
-
bindings/scripts/test/ObjC/DOMattribute.mm (added)
-
bindings/scripts/test/ObjC/DOMattributeInternal.h (added)
-
bindings/scripts/test/ObjC/DOMreadonly.h (added)
-
bindings/scripts/test/ObjC/DOMreadonly.mm (added)
-
bindings/scripts/test/ObjC/DOMreadonlyInternal.h (added)
-
bindings/scripts/test/TestException.idl (modified) (1 diff)
-
bindings/scripts/test/TestInterface.idl (modified) (1 diff)
-
bindings/scripts/test/TestObj.idl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156806 r156808 1 2013-10-02 Bem Jones-Bey <bjonesbe@adobe.com> 2 3 [css-shapes] shape-outside does not properly handle the container and the float having different writing modes 4 https://bugs.webkit.org/show_bug.cgi?id=122243 5 6 Reviewed by Alexandru Chiculita. 7 8 The margin box offset needs to be computed based on the writing mode 9 of the container, not the writihg mode of the float itself. This 10 patch makes that happen. 11 12 Test: fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html 13 14 * rendering/shapes/ShapeOutsideInfo.cpp: 15 (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): 1 2013-10-02 Eric Carlson <eric.carlson@apple.com> 2 3 IDL parser should remove a leading "_" from identifier names 4 https://bugs.webkit.org/show_bug.cgi?id=122239 5 6 Reviewed by Jer Noble. 7 8 No new tests, updated bindings tests and results. 9 10 * bindings/scripts/IDLParser.pm: 11 (identifierRemoveNullablePrefix): Remove leading "_". 12 (parseInterface): Call identifierRemoveNullablePrefix. 13 (parseException): Ditto. 14 (parseEnum): Ditto. 15 (parseConst): Ditto. 16 (parseAttributeRest): Ditto. 17 (parseOperationRest): Ditto. 18 (parseOptionalOrRequiredArgument): Ditto. 19 (parseExceptionField): Ditto. 20 (parseNonAnyType): Ditto. 21 22 Update tests and results. 23 * bindings/scripts/test/CPP/WebDOMTestObj.cpp: 24 * bindings/scripts/test/CPP/WebDOMTestObj.h: 25 * bindings/scripts/test/CPP/WebDOMattribute.cpp: Added. 26 * bindings/scripts/test/CPP/WebDOMattribute.h: Added. 27 * bindings/scripts/test/CPP/WebDOMreadonly.cpp: Added. 28 * bindings/scripts/test/CPP/WebDOMreadonly.h: Added. 29 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: 30 * bindings/scripts/test/GObject/WebKitDOMTestObj.h: 31 * bindings/scripts/test/GObject/WebKitDOMTestObj.symbols: 32 * bindings/scripts/test/GObject/WebKitDOMattribute.cpp: Added. 33 * bindings/scripts/test/GObject/WebKitDOMattribute.h: Added. 34 * bindings/scripts/test/GObject/WebKitDOMattribute.symbols: Added. 35 * bindings/scripts/test/GObject/WebKitDOMattributePrivate.h: Added. 36 * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp: Added. 37 * bindings/scripts/test/GObject/WebKitDOMreadonly.h: Added. 38 * bindings/scripts/test/GObject/WebKitDOMreadonly.symbols: Added. 39 * bindings/scripts/test/GObject/WebKitDOMreadonlyPrivate.h: Added. 40 * bindings/scripts/test/JS/JSTestObj.cpp: 41 * bindings/scripts/test/JS/JSTestObj.h: 42 * bindings/scripts/test/JS/JSattribute.cpp: Added. 43 * bindings/scripts/test/JS/JSattribute.h: Added. 44 * bindings/scripts/test/JS/JSreadonly.cpp: Added. 45 * bindings/scripts/test/JS/JSreadonly.h: Added. 46 * bindings/scripts/test/ObjC/DOMTestObj.h: 47 * bindings/scripts/test/ObjC/DOMTestObj.mm: 48 * bindings/scripts/test/ObjC/DOMattribute.h: Added. 49 * bindings/scripts/test/ObjC/DOMattribute.mm: Added. 50 * bindings/scripts/test/ObjC/DOMattributeInternal.h: Added. 51 * bindings/scripts/test/ObjC/DOMreadonly.h: Added. 52 * bindings/scripts/test/ObjC/DOMreadonly.mm: Added. 53 * bindings/scripts/test/ObjC/DOMreadonlyInternal.h: Added. 54 * bindings/scripts/test/TestException.idl: 55 * bindings/scripts/test/TestInterface.idl: 56 * bindings/scripts/test/TestObj.idl: 16 57 17 58 2013-10-02 Andreas Kling <akling@apple.com> -
trunk/Source/WebCore/bindings/scripts/IDLParser.pm
r152725 r156808 307 307 my $type = shift; 308 308 $type =~ s/\?//g; 309 return $type; 310 } 311 312 sub identifierRemoveNullablePrefix 313 { 314 my $type = shift; 315 $type =~ s/^_//; 309 316 return $type; 310 317 } … … 497 504 my $interfaceNameToken = $self->getToken(); 498 505 $self->assertTokenType($interfaceNameToken, IdentifierToken); 499 $interface->name( $interfaceNameToken->value());506 $interface->name(identifierRemoveNullablePrefix($interfaceNameToken->value())); 500 507 my $parents = $self->parseInheritance(); 501 508 $interface->parents($parents); … … 697 704 my $exceptionNameToken = $self->getToken(); 698 705 $self->assertTokenType($exceptionNameToken, IdentifierToken); 699 $interface->name( $exceptionNameToken->value());706 $interface->name(identifierRemoveNullablePrefix($exceptionNameToken->value())); 700 707 $interface->isException(1); 701 708 my $parents = $self->parseInheritance(); … … 761 768 my $enumNameToken = $self->getToken(); 762 769 $self->assertTokenType($enumNameToken, IdentifierToken); 763 $enum->name( $enumNameToken->value());770 $enum->name(identifierRemoveNullablePrefix($enumNameToken->value())); 764 771 $self->assertTokenValue($self->getToken(), "{", __LINE__); 765 772 push(@{$enum->values}, @{$self->parseEnumValueList()}); … … 875 882 my $constNameToken = $self->getToken(); 876 883 $self->assertTokenType($constNameToken, IdentifierToken); 877 $newDataNode->name( $constNameToken->value());884 $newDataNode->name(identifierRemoveNullablePrefix($constNameToken->value())); 878 885 $self->assertTokenValue($self->getToken(), "=", __LINE__); 879 886 $newDataNode->value($self->parseConstValue()); … … 1157 1164 my $token = $self->getToken(); 1158 1165 $self->assertTokenType($token, IdentifierToken); 1159 $newDataNode->signature->name( $token->value());1166 $newDataNode->signature->name(identifierRemoveNullablePrefix($token->value())); 1160 1167 $self->assertTokenValue($self->getToken(), ";", __LINE__); 1161 1168 # CustomConstructor may also be used on attributes. … … 1343 1350 $newDataNode->signature(domSignature->new()); 1344 1351 my $name = $self->parseOptionalIdentifier(); 1345 $newDataNode->signature->name( $name);1352 $newDataNode->signature->name(identifierRemoveNullablePrefix($name)); 1346 1353 $self->assertTokenValue($self->getToken(), "(", $name, __LINE__); 1347 1354 push(@{$newDataNode->parameters}, @{$self->parseArgumentList()}); … … 1428 1435 } 1429 1436 # Remove all "?" if exists, e.g. "object?[]?" -> "object[]". 1430 $paramDataNode->type( typeRemoveNullableSuffix($type));1437 $paramDataNode->type(identifierRemoveNullablePrefix(typeRemoveNullableSuffix($type))); 1431 1438 $paramDataNode->isOptional(1); 1432 1439 $paramDataNode->name($self->parseArgumentName()); … … 1505 1512 my $token = $self->getToken(); 1506 1513 $self->assertTokenType($token, IdentifierToken); 1507 $newDataNode->signature->name( $token->value());1514 $newDataNode->signature->name(identifierRemoveNullablePrefix($token->value())); 1508 1515 $self->assertTokenValue($self->getToken(), ";", __LINE__); 1509 1516 $newDataNode->signature->extendedAttributes($extendedAttributeList); … … 1877 1884 } 1878 1885 if ($next->type() == IdentifierToken || $next->value() eq "::") { 1879 my $name = $self->parseScopedName();1886 my $name = identifierRemoveNullablePrefix($self->parseScopedName()); 1880 1887 return $name . $self->parseTypeSuffix(); 1881 1888 } -
trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
r156580 r156808 766 766 } 767 767 768 WebDOMString WebDOMTestObj::attribute() const 769 { 770 if (!impl()) 771 return WebDOMString(); 772 773 return static_cast<const WTF::String&>(impl()->attribute()); 774 } 775 768 776 void WebDOMTestObj::voidMethod() 769 777 { … … 1122 1130 } 1123 1131 1132 void WebDOMTestObj::any(float a, int b) 1133 { 1134 if (!impl()) 1135 return; 1136 1137 impl()->any(a, b); 1138 } 1139 1124 1140 WebCore::TestObj* toWebCore(const WebDOMTestObj& wrapper) 1125 1141 { -
trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
r152569 r156808 66 66 WEBDOM_CONST_VALUE_13 = 0X20, 67 67 WEBDOM_CONST_VALUE_14 = 0x1abc, 68 WEBDOM_CONST_JAVASCRIPT = 15 68 WEBDOM_CONST_JAVASCRIPT = 15, 69 WEBDOM_readonly = 0 69 70 }; 70 71 … … 156 157 int nullableStringValue() const; 157 158 void setNullableStringValue(int); 159 WebDOMString attribute() const; 158 160 159 161 void voidMethod(); … … 208 210 void variadicDoubleMethod(double head, double tail); 209 211 void variadicNodeMethod(const WebDOMNode& head, const WebDOMNode& tail); 212 void any(float a, int b); 210 213 211 214 WebCore::TestObj* impl() const; -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
r156163 r156808 132 132 PROP_NULLABLE_LONG_SETTABLE_ATTRIBUTE, 133 133 PROP_NULLABLE_STRING_VALUE, 134 PROP_ATTRIBUTE, 134 135 }; 135 136 … … 562 563 break; 563 564 } 565 case PROP_ATTRIBUTE: { 566 g_value_take_string(value, convertToUTF8String(coreSelf->attribute())); 567 break; 568 } 564 569 default: 565 570 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec); … … 1127 1132 G_MINLONG, G_MAXLONG, 0, 1128 1133 WEBKIT_PARAM_READWRITE)); 1134 1135 g_object_class_install_property( 1136 gobjectClass, 1137 PROP_ATTRIBUTE, 1138 g_param_spec_string( 1139 "attribute", 1140 "TestObj:attribute", 1141 "read-only gchar* TestObj:attribute", 1142 "", 1143 WEBKIT_PARAM_READABLE)); 1129 1144 1130 1145 } … … 1651 1666 } 1652 1667 1668 void webkit_dom_test_obj_any(WebKitDOMTestObj* self, gfloat a, glong b) 1669 { 1670 WebCore::JSMainThreadNullState state; 1671 g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self)); 1672 WebCore::TestObj* item = WebKit::core(self); 1673 item->any(a, b); 1674 } 1675 1653 1676 glong webkit_dom_test_obj_get_read_only_long_attr(WebKitDOMTestObj* self) 1654 1677 { … … 2589 2612 } 2590 2613 2614 gchar* webkit_dom_test_obj_get_attribute(WebKitDOMTestObj* self) 2615 { 2616 WebCore::JSMainThreadNullState state; 2617 g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0); 2618 WebCore::TestObj* item = WebKit::core(self); 2619 gchar* result = convertToUTF8String(item->attribute()); 2620 return result; 2621 } 2622 -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
r156163 r156808 544 544 545 545 /** 546 * webkit_dom_test_obj_any: 547 * @self: A #WebKitDOMTestObj 548 * @a: A #gfloat 549 * @b: A #glong 550 * 551 * 552 **/ 553 WEBKIT_API void 554 webkit_dom_test_obj_any(WebKitDOMTestObj* self, gfloat a, glong b); 555 556 /** 546 557 * webkit_dom_test_obj_get_read_only_long_attr: 547 558 * @self: A #WebKitDOMTestObj … … 1512 1523 webkit_dom_test_obj_set_nullable_string_value(WebKitDOMTestObj* self, glong value); 1513 1524 1525 /** 1526 * webkit_dom_test_obj_get_attribute: 1527 * @self: A #WebKitDOMTestObj 1528 * 1529 * Returns: 1530 * 1531 **/ 1532 WEBKIT_API gchar* 1533 webkit_dom_test_obj_get_attribute(WebKitDOMTestObj* self); 1534 1514 1535 G_END_DECLS 1515 1536 -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.symbols
r155893 r156808 46 46 void webkit_dom_test_obj_variadic_double_method(WebKitDOMTestObj*, gdouble, gdouble) 47 47 void webkit_dom_test_obj_variadic_node_method(WebKitDOMTestObj*, WebKitDOMNode*, WebKitDOMNode*) 48 void webkit_dom_test_obj_any(WebKitDOMTestObj*, gfloat, glong) 48 49 glong webkit_dom_test_obj_get_read_only_long_attr(WebKitDOMTestObj*) 49 50 gchar* webkit_dom_test_obj_get_read_only_string_attr(WebKitDOMTestObj*) … … 141 142 glong webkit_dom_test_obj_get_nullable_string_value(WebKitDOMTestObj*, GError**) 142 143 void webkit_dom_test_obj_set_nullable_string_value(WebKitDOMTestObj*, glong) 144 gchar* webkit_dom_test_obj_get_attribute(WebKitDOMTestObj*) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r156782 r156808 153 153 { "nullableLongSettableAttribute", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongSettableAttribute), (intptr_t)setJSTestObjNullableLongSettableAttribute }, 154 154 { "nullableStringValue", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringValue), (intptr_t)setJSTestObjNullableStringValue }, 155 { "attribute", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttribute), (intptr_t)0 }, 156 { "attributeWithReservedEnumType", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithReservedEnumType), (intptr_t)setJSTestObjAttributeWithReservedEnumType }, 155 157 { "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t)0 }, 156 158 { 0, 0, NoIntrinsic, 0, 0 } 157 159 }; 158 160 159 static const HashTable JSTestObjTable = { 26 5, 255, JSTestObjTableValues, 0 };161 static const HashTable JSTestObjTable = { 266, 255, JSTestObjTableValues, 0 }; 160 162 /* Hash table for constructor */ 161 163 … … 177 179 { "CONST_VALUE_14", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0 }, 178 180 { "CONST_JAVASCRIPT", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t)0 }, 181 { "readonly", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadonly), (intptr_t)0 }, 179 182 { "staticReadOnlyLongAttr", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlyLongAttr), (intptr_t)0 }, 180 183 { "staticStringAttr", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticStringAttr), (intptr_t)setJSTestObjConstructorStaticStringAttr }, … … 191 194 }; 192 195 193 static const HashTable JSTestObjConstructorTable = { 3 8, 31, JSTestObjConstructorTableValues, 0 };196 static const HashTable JSTestObjConstructorTable = { 39, 31, JSTestObjConstructorTableValues, 0 }; 194 197 195 198 #if ENABLE(Condition1) … … 208 211 COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDoNotCheckConstants); 209 212 COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCheckConstants); 213 COMPILE_ASSERT(0 == TestObj::readonly, TestObjEnumreadonlyIsWrongUseDoNotCheckConstants); 210 214 211 215 EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* exec) … … 266 270 { "CONST_VALUE_14", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t)0 }, 267 271 { "CONST_JAVASCRIPT", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t)0 }, 272 { "readonly", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadonly), (intptr_t)0 }, 268 273 { "voidMethod", DontDelete | JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t)0 }, 269 274 { "voidMethodWithArgs", DontDelete | JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t)3 }, … … 333 338 { "variadicDoubleMethod", DontDelete | JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicDoubleMethod), (intptr_t)2 }, 334 339 { "variadicNodeMethod", DontDelete | JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicNodeMethod), (intptr_t)2 }, 340 { "any", DontDelete | JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAny), (intptr_t)2 }, 335 341 { 0, 0, NoIntrinsic, 0, 0 } 336 342 }; … … 1082 1088 1083 1089 1090 JSValue jsTestObjAttribute(ExecState* exec, JSValue slotBase, PropertyName) 1091 { 1092 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase)); 1093 UNUSED_PARAM(exec); 1094 TestObj* impl = castedThis->impl(); 1095 JSValue result = jsStringWithCache(exec, impl->attribute()); 1096 return result; 1097 } 1098 1099 1100 JSValue jsTestObjAttributeWithReservedEnumType(ExecState* exec, JSValue slotBase, PropertyName) 1101 { 1102 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase)); 1103 UNUSED_PARAM(exec); 1104 TestObj* impl = castedThis->impl(); 1105 JSValue result = jsStringWithCache(exec, impl->attributeWithReservedEnumType()); 1106 return result; 1107 } 1108 1109 1084 1110 JSValue jsTestObjConstructor(ExecState* exec, JSValue slotBase, PropertyName) 1085 1111 { … … 1722 1748 return; 1723 1749 impl->setNullableStringValue(nativeValue); 1750 } 1751 1752 1753 void setJSTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject* thisObject, JSValue value) 1754 { 1755 UNUSED_PARAM(exec); 1756 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1757 TestObj* impl = castedThis->impl(); 1758 const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); 1759 if (exec->hadException()) 1760 return; 1761 if (nativeValue != "" && nativeValue != "OptionalValue1" && nativeValue != "OptionalValue2" && nativeValue != "OptionalValue3") 1762 return; 1763 impl->setAttributeWithReservedEnumType(nativeValue); 1724 1764 } 1725 1765 … … 3143 3183 } 3144 3184 3185 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(ExecState* exec) 3186 { 3187 JSValue thisValue = exec->hostThisValue(); 3188 if (!thisValue.inherits(JSTestObj::info())) 3189 return throwVMTypeError(exec); 3190 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue)); 3191 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 3192 TestObj* impl = castedThis->impl(); 3193 if (exec->argumentCount() < 2) 3194 return throwVMError(exec, createNotEnoughArgumentsError(exec)); 3195 float a(exec->argument(0).toFloat(exec)); 3196 if (exec->hadException()) 3197 return JSValue::encode(jsUndefined()); 3198 int b(toInt32(exec, exec->argument(1), NormalConversion)); 3199 if (exec->hadException()) 3200 return JSValue::encode(jsUndefined()); 3201 impl->any(a, b); 3202 return JSValue::encode(jsUndefined()); 3203 } 3204 3145 3205 void JSTestObj::visitChildren(JSCell* cell, SlotVisitor& visitor) 3146 3206 { … … 3233 3293 UNUSED_PARAM(exec); 3234 3294 return jsNumber(static_cast<int>(15)); 3295 } 3296 3297 JSValue jsTestObjReadonly(ExecState* exec, JSValue, PropertyName) 3298 { 3299 UNUSED_PARAM(exec); 3300 return jsNumber(static_cast<int>(0)); 3235 3301 } 3236 3302 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r156782 r156808 232 232 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(JSC::ExecState*); 233 233 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(JSC::ExecState*); 234 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(JSC::ExecState*); 234 235 // Attributes 235 236 … … 364 365 JSC::JSValue jsTestObjNullableStringValue(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 365 366 void setJSTestObjNullableStringValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 367 JSC::JSValue jsTestObjAttribute(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 368 JSC::JSValue jsTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 369 void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 366 370 JSC::JSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 367 371 // Constants … … 382 386 JSC::JSValue jsTestObjCONST_VALUE_14(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 383 387 JSC::JSValue jsTestObjCONST_JAVASCRIPT(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 388 JSC::JSValue jsTestObjReadonly(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 384 389 385 390 } // namespace WebCore -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
r152569 r156808 61 61 DOM_CONST_VALUE_13 = 0X20, 62 62 DOM_CONST_VALUE_14 = 0x1abc, 63 DOM_CONST_JAVASCRIPT = 15 63 DOM_CONST_JAVASCRIPT = 15, 64 DOM_readonly = 0 64 65 }; 65 66 … … 124 125 @property int nullableLongSettableAttribute; 125 126 @property int nullableStringValue; 127 @property(readonly, copy) NSString *attribute; 126 128 127 129 - (void)voidMethod; … … 189 191 - (void)variadicDoubleMethod:(double)head tail:(double)tail; 190 192 - (void)variadicNodeMethod:(DOMNode *)head tail:(DOMNode *)tail; 193 - (void)any:(float)a b:(int)b; 191 194 @end 192 195 -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
r156580 r156808 800 800 } 801 801 802 - (NSString *)attribute 803 { 804 WebCore::JSMainThreadNullState state; 805 return IMPL->attribute(); 806 } 807 802 808 - (void)voidMethod 803 809 { … … 1163 1169 WebCore::JSMainThreadNullState state; 1164 1170 IMPL->variadicNodeMethod(core(head), core(tail)); 1171 } 1172 1173 - (void)any:(float)a b:(int)b 1174 { 1175 WebCore::JSMainThreadNullState state; 1176 IMPL->any(a, b); 1165 1177 } 1166 1178 -
trunk/Source/WebCore/bindings/scripts/test/TestException.idl
r131145 r156808 29 29 readonly attribute DOMString name; 30 30 }; 31 32 // Identifiers with a leading underscore, which should be removed. 33 exception _attribute { 34 readonly attribute DOMString _readonly; 35 }; -
trunk/Source/WebCore/bindings/scripts/test/TestInterface.idl
r151896 r156808 43 43 TestInterface implements TestImplements; 44 44 45 [ 46 ImplementationLacksVTable 47 ] interface _readonly { 48 }; -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r156175 r156808 33 33 enum TestEnumType { "", "EnumValue1", "EnumValue2", "EnumValue3" }; 34 34 35 // Leading underscore on an enum should be removed. 36 enum _optional { "", "OptionalValue1", "OptionalValue2", "OptionalValue3" }; 37 35 38 [ 36 39 Constructor(TestCallback testCallback), … … 265 268 266 269 [GetterRaisesException] attribute long? nullableStringValue; 270 271 // Identifiers with a leading underscore, which should be removed. 272 const unsigned short _readonly = 0; 273 readonly attribute DOMString _attribute; 274 attribute _optional attributeWithReservedEnumType; 275 void _any(float a, long b); 267 276 }; 268 277
Note:
See TracChangeset
for help on using the changeset viewer.