Changeset 61413 in webkit
- Timestamp:
- Jun 18, 2010 9:47:54 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 78 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r61412 r61413 1 2010-06-18 Darin Adler <darin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Implement additional DOM attribute reflection for bindings 6 https://bugs.webkit.org/show_bug.cgi?id=39936 7 8 - Added support for [Reflect] for long, unsigned long, and boolean 9 attributes. 10 - Fixed code that set attributes like this: <video controls="controls"> 11 to instead set them like this: <video controls>. 12 - Added lots more uses of [Reflect]. 13 - Removed now-unneeded [ConvertFromString]. 14 - Made [Reflect] imply [ConvertNullToNullString] so we can get rid 15 of most uses of the latter. 16 - Made [Reflect] automatically lowercase the name of the reflected 17 content attribute to minimize the need to specify a custom content 18 attribute name. 19 20 One thing this patch does *not* do is remove the unneeded functions 21 in the various DOM classes that are no longer used by the bindings. 22 We should do that in a followup. 23 24 * bindings/scripts/CodeGenerator.pm: Added new functions so code 25 can be shared across bindings, GetterExpressionPrefix and 26 SetterExpressionPrefix. We can do a lot more refactoring like 27 this in the future. 28 29 * bindings/scripts/CodeGeneratorCPP.pm: Removed unneeded 30 ConvertFromString handling, changed to use the new 31 GetterExpressionPrefix and SetterExpressionPrefix functions 32 to better handle reflected DOM attributes. 33 34 * bindings/scripts/CodeGeneratorGObject.pm: Removed unneeded 35 ConvertFromString handling, changed to use the new 36 GetterExpressionPrefix and SetterExpressionPrefix functions 37 to better handle reflected DOM attributes. Fixed a few things 38 in the output so the .cpp file will have more WebKit style. 39 The .h file should be GTK style, but the .cpp file can be the 40 standard WebKit style eventually. 41 42 * bindings/scripts/CodeGeneratorJS.pm: Changed to use the new 43 GetterExpressionPrefix and SetterExpressionPrefix functions 44 and removed a now-unneeded IsSVGAnimatedType special case since 45 the new functions take care of it. Made reflected attributes 46 automatically convert null to the null string without a 47 separate ConvertNullToNullString attribute. 48 49 * bindings/scripts/CodeGeneratorObjC.pm: Changed to use the new 50 GetterExpressionPrefix and SetterExpressionPrefix functions 51 and removed a now-unneeded IsSVGAnimatedType special case since 52 the new functions take care of it. Redid the special cases for 53 ownerDocument and for operator to fit better with the new code 54 paths. Removed unneeded ConvertFromString handling. 55 56 * bindings/scripts/CodeGeneratorV8.pm: Changed to use the new 57 GetterExpressionPrefix and SetterExpressionPrefix functions 58 and removed a now-unneeded IsSVGAnimatedType special case since 59 the new functions take care of it. Made reflected attributes 60 automatically convert null to the null string without a 61 separate ConvertNullToNullString attribute. 62 63 * bindings/scripts/test/TestObj.idl: Added some test cases for 64 content attribute reflection and for exceptions in string-typed 65 attributes. 66 67 * bindings/scripts/test/CPP/WebKitDOMTestObj.cpp: Updated. 68 * bindings/scripts/test/CPP/WebKitDOMTestObj.h: Ditto. 69 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto. 70 * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto. 71 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. 72 * bindings/scripts/test/JS/JSTestObj.h: Ditto. 73 * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto. 74 * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto. 75 * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. 76 77 * dom/Element.cpp: 78 (WebCore::Element::getIntegralAttribute): Added. 79 (WebCore::Element::setIntegralAttribute): Added. 80 (WebCore::Element::getUnsignedIntegralAttribute): Added. 81 (WebCore::Element::setUnsignedIntegralAttribute): Added. 82 * dom/Element.h: Added new attribute get/set functions for bindings. 83 84 * html/HTMLMediaElement.cpp: 85 (WebCore::HTMLMediaElement::isURLAttribute): Added. Returns true for 86 srcAttr. 87 * html/HTMLMediaElement.h: Added isURLAttribute. 88 89 * html/HTMLVideoElement.cpp: 90 (WebCore::HTMLVideoElement::isURLAttribute): Changed to call 91 HTMLMediaElement::isURLAttribute before checking for posterAttr. 92 93 * html/HTMLAnchorElement.idl: 94 * html/HTMLAppletElement.idl: 95 * html/HTMLAreaElement.idl: 96 * html/HTMLBRElement.idl: 97 * html/HTMLBaseElement.idl: 98 * html/HTMLBaseFontElement.idl: 99 * html/HTMLBlockquoteElement.idl: 100 * html/HTMLBodyElement.idl: 101 * html/HTMLButtonElement.idl: 102 * html/HTMLDListElement.idl: 103 * html/HTMLDirectoryElement.idl: 104 * html/HTMLDivElement.idl: 105 * html/HTMLElement.idl: 106 * html/HTMLEmbedElement.idl: 107 * html/HTMLFontElement.idl: 108 * html/HTMLFormElement.idl: 109 * html/HTMLFrameElement.idl: 110 * html/HTMLFrameSetElement.idl: 111 * html/HTMLHRElement.idl: 112 * html/HTMLHeadElement.idl: 113 * html/HTMLHeadingElement.idl: 114 * html/HTMLHtmlElement.idl: 115 * html/HTMLIFrameElement.idl: 116 * html/HTMLImageElement.idl: 117 * html/HTMLInputElement.idl: 118 * html/HTMLIsIndexElement.idl: 119 * html/HTMLLIElement.idl: 120 * html/HTMLLabelElement.idl: 121 * html/HTMLLegendElement.idl: 122 * html/HTMLLinkElement.idl: 123 * html/HTMLMapElement.idl: 124 * html/HTMLMediaElement.idl: 125 * html/HTMLMenuElement.idl: 126 * html/HTMLMetaElement.idl: 127 * html/HTMLModElement.idl: 128 * html/HTMLOListElement.idl: 129 * html/HTMLObjectElement.idl: 130 * html/HTMLOptGroupElement.idl: 131 * html/HTMLOptionElement.idl: 132 * html/HTMLParagraphElement.idl: 133 * html/HTMLParamElement.idl: 134 * html/HTMLPreElement.idl: 135 * html/HTMLQuoteElement.idl: 136 * html/HTMLScriptElement.idl: 137 * html/HTMLStyleElement.idl: 138 * html/HTMLTableCaptionElement.idl: 139 * html/HTMLTableCellElement.idl: 140 * html/HTMLTableColElement.idl: 141 * html/HTMLTableElement.idl: 142 * html/HTMLTableRowElement.idl: 143 * html/HTMLTableSectionElement.idl: 144 * html/HTMLTextAreaElement.idl: 145 * html/HTMLUListElement.idl: 146 * html/HTMLVideoElement.idl: 147 * svg/SVGElement.idl: 148 Added more uses of [Reflect]. Got rid of uses of [ConvertNullToNullString] that 149 are now unneeded since [Reflect] now implies that. Changed formatting to be 150 simpler and consistent without all the lining up and multiple lines. 151 1 152 2010-06-17 Dumitru Daniliuc <dumi@chromium.org> 2 153 -
trunk/WebCore/bindings/scripts/CodeGenerator.pm
r61384 r61413 382 382 } 383 383 384 sub AttributeNameForGetterAndSetter 385 { 386 my ($generator, $attribute) = @_; 387 388 my $attributeName = $attribute->signature->name; 389 390 # Avoid clash with C++ keyword. 391 $attributeName = "_operator" if $attributeName eq "operator"; 392 393 # SVG animated types need to use a special attribute name. 394 # The rest of the special casing for SVG animated types is handled in the language-specific code generators. 395 $attributeName .= "Animated" if $generator->IsSVGAnimatedType($generator->StripModule($attribute->signature->type)); 396 397 return $attributeName; 398 } 399 400 sub ContentAttributeName 401 { 402 my ($generator, $implIncludes, $interfaceName, $attribute) = @_; 403 404 my $contentAttributeName = $attribute->signature->extendedAttributes->{"Reflect"} 405 || $attribute->signature->extendedAttributes->{"ReflectURL"}; 406 return undef if !$contentAttributeName; 407 408 $contentAttributeName = lc $generator->AttributeNameForGetterAndSetter($attribute) if $contentAttributeName eq "1"; 409 410 my $namespace = $generator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 411 412 $implIncludes->{"${namespace}.h"} = 1; 413 return "WebCore::${namespace}::${contentAttributeName}Attr"; 414 } 415 416 sub GetterExpressionPrefix 417 { 418 my ($generator, $implIncludes, $interfaceName, $attribute) = @_; 419 420 my $contentAttributeName = $generator->ContentAttributeName($implIncludes, $interfaceName, $attribute); 421 422 if (!$contentAttributeName) { 423 return $generator->WK_lcfirst($generator->AttributeNameForGetterAndSetter($attribute)) . "("; 424 } 425 426 my $functionName; 427 if ($attribute->signature->extendedAttributes->{"ReflectURL"}) { 428 $functionName = "getURLAttribute"; 429 } elsif ($attribute->signature->type eq "boolean") { 430 $functionName = "hasAttribute"; 431 } elsif ($attribute->signature->type eq "long") { 432 $functionName = "getIntegralAttribute"; 433 } elsif ($attribute->signature->type eq "unsigned long") { 434 $functionName = "getUnsignedIntegralAttribute"; 435 } else { 436 $functionName = "getAttribute"; 437 } 438 439 return "$functionName($contentAttributeName" 440 } 441 442 sub SetterExpressionPrefix 443 { 444 my ($generator, $implIncludes, $interfaceName, $attribute) = @_; 445 446 my $contentAttributeName = $generator->ContentAttributeName($implIncludes, $interfaceName, $attribute); 447 448 if (!$contentAttributeName) { 449 return "set" . $generator->WK_ucfirst($generator->AttributeNameForGetterAndSetter($attribute)) . "("; 450 } 451 452 my $functionName; 453 if ($attribute->signature->type eq "boolean") { 454 $functionName = "setBooleanAttribute"; 455 } elsif ($attribute->signature->type eq "long") { 456 $functionName = "setIntegralAttribute"; 457 } elsif ($attribute->signature->type eq "unsigned long") { 458 $functionName = "setUnsignedIntegralAttribute"; 459 } else { 460 $functionName = "setAttribute"; 461 } 462 463 return "$functionName($contentAttributeName, " 464 } 384 465 385 466 1; -
trunk/WebCore/bindings/scripts/CodeGeneratorCPP.pm
r61384 r61413 680 680 my $getterSig = "$attributeType $className\:\:$attributeName() const\n"; 681 681 my $hasGetterException = @{$attribute->getterExceptions}; 682 my $getterContentHead; 683 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; 684 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; 685 if ($reflect || $reflectURL) { 686 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $attributeName : ($reflect || $reflectURL); 687 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 688 $implIncludes{"${namespace}.h"} = 1; 689 my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute"; 690 $getterContentHead = "impl()->${getAttributeFunctionName}(WebCore::${namespace}::${contentAttributeName}Attr"; 691 } else { 692 $getterContentHead = "impl()->" . $codeGenerator->WK_lcfirst($attributeName) . "("; 693 } 682 my $getterContentHead = "impl()->" . $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 694 683 my $getterContentTail = ")"; 695 684 … … 699 688 $getterContentHead = "WebCore::String::number(" . $getterContentHead; 700 689 $getterContentTail .= ")"; 701 } elsif ($attribute->signature->extendedAttributes->{"ConvertFromString"}) {702 $getterContentTail .= ".toInt()";703 690 } elsif ($attribute->signature->type eq "SerializedScriptValue") { 704 691 $getterContentHead = "$getterContentHead"; … … 751 738 my $arg = GetCPPTypeGetter($argName, $idlType); 752 739 753 # The definition of ConvertFromString and ConvertToString is flipped for the setter 754 if ($attribute->signature->extendedAttributes->{"ConvertFromString"}) { 755 $arg = "WebCore::String::number($arg)"; 756 } elsif ($attribute->signature->extendedAttributes->{"ConvertToString"}) { 740 # The definition of ConvertToString is flipped for the setter 741 if ($attribute->signature->extendedAttributes->{"ConvertToString"}) { 757 742 $arg = "WebCore::String($arg).toInt()"; 758 743 } … … 763 748 push(@implContent, AddEarlyReturnStatement()); 764 749 765 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};766 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"};767 750 push(@implContent, " $exceptionInit\n") if $hasSetterException; 768 751 my $ec = $hasSetterException ? ", ec" : ""; 769 if ($reflect || $reflectURL) { 770 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $attributeName : ($reflect || $reflectURL); 771 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 772 $implIncludes{"${namespace}.h"} = 1; 773 push(@implContent, " impl()->setAttribute(WebCore::${namespace}::${contentAttributeName}Attr, $arg$ec);\n"); 774 } else { 775 push(@implContent, " impl()->$coreSetterName($arg$ec);\n"); 776 } 752 my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 753 push(@implContent, " impl()->$setterExpressionPrefix$arg$ec);\n"); 777 754 push(@implContent, " $exceptionRaiseOnError\n") if $hasSetterException; 778 755 push(@implContent, "}\n\n"); -
trunk/WebCore/bindings/scripts/CodeGeneratorGObject.pm
r61384 r61413 362 362 if ($gtype eq "string") { 363 363 $convertFunction = "WebCore::String::fromUTF8"; 364 } elsif ($attribute->signature->extendedAttributes->{"ConvertFromString"}) { 365 $convertFunction = "WebCore::String::number"; 366 } 367 368 my $setterContentHead; 369 my $getterContentHead; 370 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; 371 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; 372 if ($reflect || $reflectURL) { 373 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $camelPropName : ($reflect || $reflectURL); 374 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 375 $implIncludes{"${namespace}.h"} = 1; 376 my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute"; 377 $setterContentHead = "coreSelf->setAttribute(WebCore::${namespace}::${contentAttributeName}Attr, ${convertFunction}(g_value_get_$gtype(value))"; 378 $getterContentHead = "coreSelf->${getAttributeFunctionName}(WebCore::${namespace}::${contentAttributeName}Attr"; 379 } else { 380 $setterContentHead = "coreSelf->set${setPropNameFunction}(${convertFunction}(g_value_get_$gtype(value))"; 381 $getterContentHead = "coreSelf->${getPropNameFunction}("; 382 } 364 } 365 366 my $getterExpressionPrefix = $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 367 my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 368 369 my $getterContentHead = "coreSelf->$getterExpressionPrefix"; 370 my $setterContentHead = "coreSelf->$setterExpressionPrefix${convertFunction}(g_value_get_$gtype(value))"; 383 371 384 372 if (grep {$_ eq $attribute} @writeableProperties) { … … 414 402 push(@txtGetProps, $txtGetProp); 415 403 $done = 1; 416 }417 418 if($attribute->signature->extendedAttributes->{"ConvertFromString"}) {419 # TODO: Add other conversion functions for different types. Current420 # IDLs only list longs.421 if($gtype eq "long") {422 $convertFunction = "";423 $postConvertFunction = ".toInt()";424 } else {425 die "Can't convert to type ${gtype}.";426 }427 404 } 428 405 … … 816 793 } 817 794 if ($paramIsGDOMType || ($paramIDLType eq "DOMString") || ($paramIDLType eq "CompareHow")) { 818 $paramName = " _g_" . $paramName;795 $paramName = "converted_" . $paramName; 819 796 } 820 797 if ($callImplParams) { … … 854 831 if ($returnType ne "void") { 855 832 # TODO: return proper default result 856 push(@cBody, " g_return_val_if_fail 833 push(@cBody, " g_return_val_if_fail(self, 0);\n"); 857 834 } else { 858 push(@cBody, " g_return_if_fail 835 push(@cBody, " g_return_if_fail(self);\n"); 859 836 } 860 837 … … 871 848 if ($returnType ne "void") { 872 849 # TODO: return proper default result 873 push(@cBody, " g_return_val_if_fail 850 push(@cBody, " g_return_val_if_fail($paramName, 0);\n"); 874 851 } else { 875 push(@cBody, " g_return_if_fail 852 push(@cBody, " g_return_if_fail($paramName);\n"); 876 853 } 877 854 } … … 885 862 my $paramIsGDOMType = IsGDOMClassType($paramIDLType); 886 863 if ($paramIDLType eq "DOMString") { 887 push(@cBody, " WebCore::String _g_${paramName} = WebCore::String::fromUTF8($paramName);\n");864 push(@cBody, " WebCore::String converted_${paramName} = WebCore::String::fromUTF8($paramName);\n"); 888 865 } elsif ($paramIDLType eq "CompareHow") { 889 push(@cBody, " WebCore::Range::CompareHow _g_${paramName} = static_cast<WebCore::Range::CompareHow>($paramName);\n");866 push(@cBody, " WebCore::Range::CompareHow converted_${paramName} = static_cast<WebCore::Range::CompareHow>($paramName);\n"); 890 867 } elsif ($paramIsGDOMType) { 891 push(@cBody, " WebCore::${paramIDLType} * _g_${paramName} = WebKit::core($paramName);\n");868 push(@cBody, " WebCore::${paramIDLType} * converted_${paramName} = WebKit::core($paramName);\n"); 892 869 if ($returnType ne "void") { 893 870 # TODO: return proper default result 894 push(@cBody, " g_return_val_if_fail (_g_${paramName}, 0);\n");871 push(@cBody, " g_return_val_if_fail(converted_${paramName}, 0);\n"); 895 872 } else { 896 push(@cBody, " g_return_if_fail (_g_${paramName});\n");873 push(@cBody, " g_return_if_fail(converted_${paramName});\n"); 897 874 } 898 875 } 899 $returnParamName = " _g_".$paramName if $param->extendedAttributes->{"Return"};876 $returnParamName = "converted_".$paramName if $param->extendedAttributes->{"Return"}; 900 877 } 901 878 … … 956 933 } elsif ($functionSigType eq "DOMString") { 957 934 my $getterContentHead; 958 my $reflect = $function->signature->extendedAttributes->{"Reflect"}; 959 my $reflectURL = $function->signature->extendedAttributes->{"ReflectURL"}; 960 if ($reflect || $reflectURL) { 961 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $functionSigName : ($reflect || $reflectURL); 962 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 963 $implIncludes{"${namespace}.h"} = 1; 964 my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute"; 965 $getterContentHead = "${assign}convertToUTF8String(item->${getAttributeFunctionName}(WebCore::${namespace}::${contentAttributeName}Attr));\n"; 935 if ($prefix) { 936 my $getterExpressionPrefix = $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $function); 937 $getterContentHead = "${assign}convertToUTF8String(item->$getterExpressionPrefix${exceptions}));\n"; 966 938 } else { 967 939 $getterContentHead = "${assign}convertToUTF8String(item->${functionSigName}(${callImplParams}${exceptions}));\n"; 968 940 } 969 970 941 push(@cBody, " ${getterContentHead}"); 971 942 } else { 972 my $setterContentHead; 973 my $reflect = $function->signature->extendedAttributes->{"Reflect"}; 974 my $reflectURL = $function->signature->extendedAttributes->{"ReflectURL"}; 975 if ($reflect || $reflectURL) { 976 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $functionSigName : ($reflect || $reflectURL); 977 $contentAttributeName =~ s/set//; 978 $contentAttributeName = $codeGenerator->WK_lcfirst($contentAttributeName); 979 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 980 $implIncludes{"${namespace}.h"} = 1; 981 $setterContentHead = "${assign}${assignPre}item->setAttribute(WebCore::${namespace}::${contentAttributeName}Attr, ${callImplParams}${exceptions}${assignPost});\n"; 943 my $contentHead; 944 if ($prefix eq "get_") { 945 my $getterExpressionPrefix = $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $function); 946 $contentHead = "${assign}${assignPre}item->$getterExpressionPrefix${callImplParams}${exceptions}${assignPost});\n"; 947 } elsif ($prefix eq "set_") { 948 my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $function); 949 $contentHead = "${assign}${assignPre}item->$setterExpressionPrefix${callImplParams}${exceptions}${assignPost});\n"; 982 950 } else { 983 $setterContentHead = "${assign}${assignPre}item->${functionSigName}(${callImplParams}${exceptions}${assignPost});\n"; 984 } 985 986 push(@cBody, " ${setterContentHead}"); 951 $contentHead = "${assign}${assignPre}item->${functionSigName}(${callImplParams}${exceptions}${assignPost});\n"; 952 } 953 push(@cBody, " ${contentHead}"); 987 954 988 955 if(@{$function->raisesExceptions}) { … … 1049 1016 # according to GObject conventions. Skip this for now. 1050 1017 || $attribute->signature->name eq "URL" # TODO: handle this 1051 || $attribute->signature->extendedAttributes->{"ConvertFromString"} # TODO: handle this1052 1018 ) { 1053 1019 next TOP; … … 1079 1045 1080 1046 $function->signature(new domSignature()); 1081 $function->signature->name($ setname);1047 $function->signature->name($attribute->signature->name); 1082 1048 $function->signature->type("void"); 1083 1049 $function->signature->extendedAttributes($attribute->signature->extendedAttributes); … … 1093 1059 $function->raisesExceptions($attribute->setterExceptions); 1094 1060 1095 $object->GenerateFunction($interfaceName, $function, " ");1061 $object->GenerateFunction($interfaceName, $function, "set_"); 1096 1062 } 1097 1063 } -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r61384 r61413 4 4 # Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org> 5 5 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> 6 # Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.6 # Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 7 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 8 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. … … 1571 1571 } 1572 1572 } else { 1573 my $getterExpression = "imp->" . $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute) . ")"; 1574 my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, $getterExpression, "castedThis"); 1573 1575 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n"); 1574 my $value;1575 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};1576 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"};1577 if ($reflect || $reflectURL) {1578 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $name : ($reflect || $reflectURL);1579 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName);1580 $implIncludes{"${namespace}.h"} = 1;1581 my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute";1582 $value = "imp->$getAttributeFunctionName(${namespace}::${contentAttributeName}Attr)"1583 } else {1584 $value = "imp->$implGetterFunctionName()";1585 }1586 my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, $value, "castedThis");1587 1576 if ($codeGenerator->IsSVGAnimatedType($type)) { 1588 1577 push(@implContent, " RefPtr<$type> obj = $jsType;\n"); … … 1735 1724 } else { 1736 1725 my $nativeValue = JSValueToNative($attribute->signature, "value"); 1726 my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 1727 1737 1728 push(@implContent, " ExceptionCode ec = 0;\n") if @{$attribute->setterExceptions}; 1738 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; 1739 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; 1740 if ($reflect || $reflectURL) { 1741 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $name : ($reflect || $reflectURL); 1742 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 1743 $implIncludes{"${namespace}.h"} = 1; 1744 push(@implContent, " imp->setAttribute(${namespace}::${contentAttributeName}Attr, $nativeValue"); 1745 } else { 1746 push(@implContent, " imp->set$implSetterFunctionName($nativeValue"); 1747 } 1729 push(@implContent, " imp->$setterExpressionPrefix$nativeValue"); 1748 1730 push(@implContent, ", ec") if @{$attribute->setterExceptions}; 1749 1731 push(@implContent, ");\n"); … … 2331 2313 2332 2314 if ($type eq "DOMString") { 2333 return "valueToStringWithNullCheck(exec, $value)" if $signature->extendedAttributes->{"ConvertNullToNullString"} ;2315 return "valueToStringWithNullCheck(exec, $value)" if $signature->extendedAttributes->{"ConvertNullToNullString"} || $signature->extendedAttributes->{"Reflect"} || $signature->extendedAttributes->{"ReflectURL"}; 2334 2316 return "valueToStringWithUndefinedOrNullCheck(exec, $value)" if $signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"}; 2335 2317 return "ustringToString($value.toString(exec))"; … … 2423 2405 return "toJS(exec, $globalObject, JSSVGDynamicPODTypeWrapperCache<$nativeType, $implClassNameForValueConversion>::lookupOrCreateWrapper(imp, &${implClassNameForValueConversion}::$getter, &${implClassNameForValueConversion}::$setter).get(), JSSVGContextCache::svgContextForDOMObject(castedThis));" 2424 2406 } 2425 }2426 2427 if ($codeGenerator->IsSVGAnimatedType($type)) {2428 # Some SVGFE*Element.idl use 'operator' as attribute name, rewrite as '_operator' to avoid clashes with C/C++2429 $value =~ s/operator\(\)/_operator\(\)/ if ($value =~ /operator/);2430 $value =~ s/\(\)//;2431 $value .= "Animated()";2432 2407 } 2433 2408 -
trunk/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r61384 r61413 4 4 # Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org> 5 5 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> 6 # Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.6 # Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 7 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 8 8 # Copyright (C) 2010 Google Inc. … … 1176 1176 # Special case attribute frame to be frameBorders. 1177 1177 $attributeInterfaceName .= "Borders"; 1178 } elsif ($attributeName eq "ownerDocument") { 1179 # FIXME: for now special case attribute ownerDocument to call document, this is incorrect 1180 # legacy behavior. (see http://bugs.webkit.org/show_bug.cgi?id=10889) 1181 $attributeName = "document"; 1182 } elsif ($codeGenerator->IsSVGAnimatedType($idlType)) { 1183 # Special case for animated types. 1184 $attributeName .= "Animated"; 1178 } elsif ($attributeName eq "operator") { 1179 # Avoid clash with C++ keyword. 1180 $attributeInterfaceName = "_operator"; 1185 1181 } 1186 1182 … … 1190 1186 my $getterSig = "- ($attributeType)$attributeInterfaceName\n"; 1191 1187 1192 # Some SVGFE*Element.idl use 'operator' as attribute name, rewrite as '_operator' to avoid clashes with C/C++ 1193 $attributeName =~ s/operatorAnimated/_operatorAnimated/ if ($attributeName =~ /operatorAnimated/); 1194 $getterSig =~ s/operator/_operator/ if ($getterSig =~ /operator/); 1188 my $getterExpressionPrefix = $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 1189 1190 # FIXME: Special case attribute ownerDocument to call document. This makes it return the 1191 # document when called on the document itself. Legacy behavior, see <https://bugs.webkit.org/show_bug.cgi?id=10889>. 1192 $getterExpressionPrefix =~ s/\bownerDocument\b/document/; 1195 1193 1196 1194 my $hasGetterException = @{$attribute->getterExceptions}; 1197 my $getterContentHead; 1198 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; 1199 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; 1200 if ($reflect || $reflectURL) { 1201 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $attributeName : ($reflect || $reflectURL); 1202 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 1203 $implIncludes{"${namespace}.h"} = 1; 1204 my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute"; 1205 $getterContentHead = "IMPL->${getAttributeFunctionName}(WebCore::${namespace}::${contentAttributeName}Attr"; 1206 } else { 1207 $getterContentHead = "IMPL->" . $codeGenerator->WK_lcfirst($attributeName) . "("; 1208 } 1195 my $getterContentHead = "IMPL->$getterExpressionPrefix"; 1209 1196 my $getterContentTail = ")"; 1210 1197 … … 1257 1244 $getterContentHead = "WebCore::String::number(" . $getterContentHead; 1258 1245 $getterContentTail .= ")"; 1259 } elsif ($attribute->signature->extendedAttributes->{"ConvertFromString"}) {1260 $getterContentTail .= ".toInt()";1261 1246 } elsif ($codeGenerator->IsPodType($idlType) or $idlType eq "Date") { 1262 1247 $getterContentHead = "kit($getterContentHead"; … … 1317 1302 my $arg = GetObjCTypeGetter($argName, $idlType); 1318 1303 1319 # The definition of ConvertFromString and ConvertToString is flipped for the setter 1320 if ($attribute->signature->extendedAttributes->{"ConvertFromString"}) { 1321 $arg = "WebCore::String::number($arg)"; 1322 } elsif ($attribute->signature->extendedAttributes->{"ConvertToString"}) { 1304 # The definition of ConvertToString is flipped for the setter 1305 if ($attribute->signature->extendedAttributes->{"ConvertToString"}) { 1323 1306 $arg = "WebCore::String($arg).toInt()"; 1324 1307 } … … 1347 1330 } 1348 1331 } else { 1349 my $ reflect = $attribute->signature->extendedAttributes->{"Reflect"};1350 my $ reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"};1332 my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 1333 my $ec = $hasSetterException ? ", ec" : ""; 1351 1334 push(@implContent, " $exceptionInit\n") if $hasSetterException; 1352 my $ec = $hasSetterException ? ", ec" : ""; 1353 if ($reflect || $reflectURL) { 1354 my $contentAttributeName = (($reflect || $reflectURL) eq "1") ? $attributeName : ($reflect || $reflectURL); 1355 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 1356 $implIncludes{"${namespace}.h"} = 1; 1357 push(@implContent, " IMPL->setAttribute(WebCore::${namespace}::${contentAttributeName}Attr, $arg$ec);\n"); 1358 } else { 1359 push(@implContent, " IMPL->$coreSetterName($arg$ec);\n"); 1360 } 1335 push(@implContent, " IMPL->$setterExpressionPrefix$arg$ec);\n"); 1361 1336 push(@implContent, " $exceptionRaiseOnError\n") if $hasSetterException; 1362 1337 } -
trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm
r61384 r61413 678 678 if ($getterStringUsesImp && $reflect && IsNodeSubType($dataNode) && $codeGenerator->IsStringType($attrType)) { 679 679 # Generate super-compact call for regular attribute getter: 680 my $contentAttributeName = $reflect eq "1" ? $attrName : $reflect;680 my $contentAttributeName = $reflect eq "1" ? lc $attrName : $reflect; 681 681 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 682 682 $implIncludes{"${namespace}.h"} = 1; … … 709 709 } 710 710 711 my $getterFunc = $codeGenerator->WK_lcfirst($attrName);712 713 if ($codeGenerator->IsSVGAnimatedType($attribute->signature->type)) {714 # Some SVGFE*Element.idl use 'operator' as attribute name; rewrite as '_operator' to avoid clashes with C/C++715 $getterFunc = "_" . $getterFunc if ($attrName =~ /operator/);716 $getterFunc .= "Animated";717 }718 719 711 my $returnType = GetTypeFromSignature($attribute->signature); 720 712 721 713 my $getterString; 722 714 if ($getterStringUsesImp) { 723 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; 724 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; 725 if ($reflect || $reflectURL) { 726 my $contentAttributeName = ($reflect || $reflectURL) eq "1" ? $attrName : ($reflect || $reflectURL); 727 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 728 $implIncludes{"${namespace}.h"} = 1; 729 my $getAttributeFunctionName = $reflectURL ? "getURLAttribute" : "getAttribute"; 730 $getterString = "imp->$getAttributeFunctionName(${namespace}::${contentAttributeName}Attr"; 731 } else { 732 $getterString = "imp->$getterFunc("; 733 } 715 $getterString = "imp->" . $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 734 716 $getterString .= "ec" if $useExceptions; 735 717 $getterString .= ")"; 736 if ($nativeType eq "int" and $attribute->signature->extendedAttributes->{"ConvertFromString"}) {737 $getterString .= ".toInt()";738 }739 718 } else { 740 719 $getterString = "impInstance"; … … 888 867 if (($reflect || $reflectURL) && IsNodeSubType($dataNode) && $codeGenerator->IsStringType($attrType)) { 889 868 # Generate super-compact call for regular attribute setter: 890 my $contentAttributeName = ($reflect || $reflectURL) eq "1" ? $attrName : ($reflect || $reflectURL);869 my $contentAttributeName = ($reflect || $reflectURL) eq "1" ? lc $attrName : ($reflect || $reflectURL); 891 870 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 892 871 $implIncludes{"${namespace}.h"} = 1; … … 913 892 } 914 893 915 my $result = ""; 916 if ($nativeType eq "int" and $attribute->signature->extendedAttributes->{"ConvertFromString"}) { 917 $result .= "WebCore::String::number("; 918 } 919 $result .= "v"; 920 if ($nativeType eq "int" and $attribute->signature->extendedAttributes->{"ConvertFromString"}) { 921 $result .= ")"; 922 } 894 my $result = "v"; 923 895 my $returnType = GetTypeFromSignature($attribute->signature); 924 896 if (IsRefPtrType($returnType)) { … … 936 908 push(@implContentDecls, " *imp = $result;\n"); 937 909 } else { 938 my $implSetterFunctionName = $codeGenerator->WK_ucfirst($attrName); 939 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"}; 940 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"}; 941 if ($reflect || $reflectURL) { 942 my $contentAttributeName = ($reflect || $reflectURL) eq "1" ? $attrName : ($reflect || $reflectURL); 943 my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName); 944 $implIncludes{"${namespace}.h"} = 1; 945 push(@implContentDecls, " imp->setAttribute(${namespace}::${contentAttributeName}Attr, $result"); 946 } elsif ($attribute->signature->type eq "EventListener") { 910 if ($attribute->signature->type eq "EventListener") { 911 my $implSetterFunctionName = $codeGenerator->WK_ucfirst($attrName); 947 912 $implIncludes{"V8AbstractEventListener.h"} = 1; 948 913 push(@implContentDecls, " transferHiddenDependency(info.Holder(), imp->$attrName(), value, V8${interfaceName}::eventListenerCacheIndex);\n"); … … 955 920 } 956 921 } else { 957 push(@implContentDecls, " imp->set$implSetterFunctionName($result"); 922 my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute); 923 push(@implContentDecls, " imp->$setterExpressionPrefix$result"); 958 924 } 959 925 push(@implContentDecls, ", ec") if $useExceptions; … … 2713 2679 if ($signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"}) { 2714 2680 $mode = "WithUndefinedOrNullCheck"; 2715 } elsif ($signature->extendedAttributes->{"ConvertNullToNullString"} ) {2681 } elsif ($signature->extendedAttributes->{"ConvertNullToNullString"} || $signature->extendedAttributes->{"Reflect"} || $signature->extendedAttributes->{"ReflectURL"}) { 2716 2682 $mode = "WithNullCheck"; 2717 2683 } -
trunk/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
r61384 r61413 23 23 24 24 #include "AtomicString.h" 25 #include "HTMLNames.h" 25 26 #include "KURL.h" 26 27 #include "SerializedScriptValue.h" … … 174 175 } 175 176 176 int WebDOMTestObj::attrWithException() const 177 { 178 if (!impl()) 179 return 0; 180 181 return impl()->attrWithException(); 182 } 183 184 void WebDOMTestObj::setAttrWithException(int newAttrWithException) 185 { 186 if (!impl()) 187 return; 188 189 impl()->setAttrWithException(newAttrWithException); 177 WebDOMString WebDOMTestObj::reflectedStringAttr() const 178 { 179 if (!impl()) 180 return WebDOMString(); 181 182 return static_cast<const WebCore::String&>(impl()->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr)); 183 } 184 185 void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr) 186 { 187 if (!impl()) 188 return; 189 190 impl()->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, newReflectedStringAttr); 191 } 192 193 int WebDOMTestObj::reflectedIntegralAttr() const 194 { 195 if (!impl()) 196 return 0; 197 198 return impl()->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr); 199 } 200 201 void WebDOMTestObj::setReflectedIntegralAttr(int newReflectedIntegralAttr) 202 { 203 if (!impl()) 204 return; 205 206 impl()->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr); 207 } 208 209 bool WebDOMTestObj::reflectedBooleanAttr() const 210 { 211 if (!impl()) 212 return false; 213 214 return impl()->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr); 215 } 216 217 void WebDOMTestObj::setReflectedBooleanAttr(bool newReflectedBooleanAttr) 218 { 219 if (!impl()) 220 return; 221 222 impl()->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, newReflectedBooleanAttr); 223 } 224 225 WebDOMString WebDOMTestObj::reflectedURLAttr() const 226 { 227 if (!impl()) 228 return WebDOMString(); 229 230 return static_cast<const WebCore::String&>(impl()->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr)); 231 } 232 233 void WebDOMTestObj::setReflectedURLAttr(const WebDOMString& newReflectedURLAttr) 234 { 235 if (!impl()) 236 return; 237 238 impl()->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, newReflectedURLAttr); 239 } 240 241 WebDOMString WebDOMTestObj::reflectedStringAttr() const 242 { 243 if (!impl()) 244 return WebDOMString(); 245 246 return static_cast<const WebCore::String&>(impl()->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr)); 247 } 248 249 void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr) 250 { 251 if (!impl()) 252 return; 253 254 impl()->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, newReflectedStringAttr); 255 } 256 257 int WebDOMTestObj::reflectedCustomIntegralAttr() const 258 { 259 if (!impl()) 260 return 0; 261 262 return impl()->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr); 263 } 264 265 void WebDOMTestObj::setReflectedCustomIntegralAttr(int newReflectedCustomIntegralAttr) 266 { 267 if (!impl()) 268 return; 269 270 impl()->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, newReflectedCustomIntegralAttr); 271 } 272 273 bool WebDOMTestObj::reflectedCustomBooleanAttr() const 274 { 275 if (!impl()) 276 return false; 277 278 return impl()->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr); 279 } 280 281 void WebDOMTestObj::setReflectedCustomBooleanAttr(bool newReflectedCustomBooleanAttr) 282 { 283 if (!impl()) 284 return; 285 286 impl()->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, newReflectedCustomBooleanAttr); 287 } 288 289 WebDOMString WebDOMTestObj::reflectedURLAttr() const 290 { 291 if (!impl()) 292 return WebDOMString(); 293 294 return static_cast<const WebCore::String&>(impl()->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr)); 295 } 296 297 void WebDOMTestObj::setReflectedURLAttr(const WebDOMString& newReflectedURLAttr) 298 { 299 if (!impl()) 300 return; 301 302 impl()->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, newReflectedURLAttr); 303 } 304 305 int WebDOMTestObj::attrWithGetterException() const 306 { 307 if (!impl()) 308 return 0; 309 310 WebCore::ExceptionCode ec = 0; 311 int result = impl()->attrWithGetterException(ec); 312 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 313 return result; 314 } 315 316 void WebDOMTestObj::setAttrWithGetterException(int newAttrWithGetterException) 317 { 318 if (!impl()) 319 return; 320 321 WebCore::ExceptionCode ec = 0; 322 impl()->setAttrWithGetterException(newAttrWithGetterException, ec); 323 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 190 324 } 191 325 … … 195 329 return 0; 196 330 197 WebCore::ExceptionCode ec = 0; 198 int result = impl()->attrWithSetterException(ec); 199 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 200 return result; 331 return impl()->attrWithSetterException(); 201 332 } 202 333 … … 211 342 } 212 343 213 int WebDOMTestObj::attrWithGetterException() const 214 { 215 if (!impl()) 216 return 0; 217 218 return impl()->attrWithGetterException(); 219 } 220 221 void WebDOMTestObj::setAttrWithGetterException(int newAttrWithGetterException) 222 { 223 if (!impl()) 224 return; 225 226 WebCore::ExceptionCode ec = 0; 227 impl()->setAttrWithGetterException(newAttrWithGetterException, ec); 344 WebDOMString WebDOMTestObj::stringAttrWithGetterException() const 345 { 346 if (!impl()) 347 return WebDOMString(); 348 349 WebCore::ExceptionCode ec = 0; 350 WebDOMString result = impl()->stringAttrWithGetterException(ec); 351 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 352 return static_cast<const WebCore::String&>(result); 353 } 354 355 void WebDOMTestObj::setStringAttrWithGetterException(const WebDOMString& newStringAttrWithGetterException) 356 { 357 if (!impl()) 358 return; 359 360 WebCore::ExceptionCode ec = 0; 361 impl()->setStringAttrWithGetterException(newStringAttrWithGetterException, ec); 362 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 363 } 364 365 WebDOMString WebDOMTestObj::stringAttrWithSetterException() const 366 { 367 if (!impl()) 368 return WebDOMString(); 369 370 return static_cast<const WebCore::String&>(impl()->stringAttrWithSetterException()); 371 } 372 373 void WebDOMTestObj::setStringAttrWithSetterException(const WebDOMString& newStringAttrWithSetterException) 374 { 375 if (!impl()) 376 return; 377 378 WebCore::ExceptionCode ec = 0; 379 impl()->setStringAttrWithSetterException(newStringAttrWithSetterException, ec); 228 380 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 229 381 } -
trunk/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
r61384 r61413 55 55 WebDOMTestObj testObjAttr() const; 56 56 void setTestObjAttr(const WebDOMTestObj&); 57 int attrWithException() const; 58 void setAttrWithException(int); 57 WebDOMString reflectedStringAttr() const; 58 void setReflectedStringAttr(const WebDOMString&); 59 int reflectedIntegralAttr() const; 60 void setReflectedIntegralAttr(int); 61 bool reflectedBooleanAttr() const; 62 void setReflectedBooleanAttr(bool); 63 WebDOMString reflectedURLAttr() const; 64 void setReflectedURLAttr(const WebDOMString&); 65 WebDOMString reflectedStringAttr() const; 66 void setReflectedStringAttr(const WebDOMString&); 67 int reflectedCustomIntegralAttr() const; 68 void setReflectedCustomIntegralAttr(int); 69 bool reflectedCustomBooleanAttr() const; 70 void setReflectedCustomBooleanAttr(bool); 71 WebDOMString reflectedURLAttr() const; 72 void setReflectedURLAttr(const WebDOMString&); 73 int attrWithGetterException() const; 74 void setAttrWithGetterException(int); 59 75 int attrWithSetterException() const; 60 76 void setAttrWithSetterException(int); 61 int attrWithGetterException() const; 62 void setAttrWithGetterException(int); 77 WebDOMString stringAttrWithGetterException() const; 78 void setStringAttrWithGetterException(const WebDOMString&); 79 WebDOMString stringAttrWithSetterException() const; 80 void setStringAttrWithSetterException(const WebDOMString&); 63 81 int customAttr() const; 64 82 void setCustomAttr(int); -
trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
r61384 r61413 58 58 webkit_dom_test_callback_callback_with_class1param(WebKitDOMTestCallback* self, WebKitDOMClass1* class1param) 59 59 { 60 g_return_val_if_fail 60 g_return_val_if_fail(self, 0); 61 61 WebCore::TestCallback * item = WebKit::core(self); 62 g_return_val_if_fail 63 WebCore::Class1 * _g_class1param = WebKit::core(class1param);64 g_return_val_if_fail (_g_class1param, 0);65 gboolean res = item->callbackWithClass1Param( _g_class1param);62 g_return_val_if_fail(class1param, 0); 63 WebCore::Class1 * converted_class1param = WebKit::core(class1param); 64 g_return_val_if_fail(converted_class1param, 0); 65 gboolean res = item->callbackWithClass1Param(converted_class1param); 66 66 return res; 67 67 } … … 70 70 webkit_dom_test_callback_callback_with_class2param(WebKitDOMTestCallback* self, WebKitDOMClass2* class2param, gchar* str_arg) 71 71 { 72 g_return_val_if_fail 72 g_return_val_if_fail(self, 0); 73 73 WebCore::TestCallback * item = WebKit::core(self); 74 g_return_val_if_fail 75 g_return_val_if_fail 76 WebCore::Class2 * _g_class2param = WebKit::core(class2param);77 g_return_val_if_fail (_g_class2param, 0);78 WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);79 gboolean res = item->callbackWithClass2Param( _g_class2param, _g_str_arg);74 g_return_val_if_fail(class2param, 0); 75 g_return_val_if_fail(str_arg, 0); 76 WebCore::Class2 * converted_class2param = WebKit::core(class2param); 77 g_return_val_if_fail(converted_class2param, 0); 78 WebCore::String converted_str_arg = WebCore::String::fromUTF8(str_arg); 79 gboolean res = item->callbackWithClass2Param(converted_class2param, converted_str_arg); 80 80 return res; 81 81 } … … 84 84 webkit_dom_test_callback_callback_with_non_bool_return_type(WebKitDOMTestCallback* self, WebKitDOMClass3* class3param) 85 85 { 86 g_return_val_if_fail 86 g_return_val_if_fail(self, 0); 87 87 WebCore::TestCallback * item = WebKit::core(self); 88 g_return_val_if_fail 89 WebCore::Class3 * _g_class3param = WebKit::core(class3param);90 g_return_val_if_fail (_g_class3param, 0);91 glong res = item->callbackWithNonBoolReturnType( _g_class3param);88 g_return_val_if_fail(class3param, 0); 89 WebCore::Class3 * converted_class3param = WebKit::core(class3param); 90 g_return_val_if_fail(converted_class3param, 0); 91 glong res = item->callbackWithNonBoolReturnType(converted_class3param); 92 92 return res; 93 93 } -
trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
r61384 r61413 25 25 #include <wtf/RefPtr.h> 26 26 #include "ExceptionCode.h" 27 #include "HTMLNames.h" 27 28 #include "TestObj.h" 28 29 #include "WebKitDOMBinding.h" … … 52 53 webkit_dom_test_obj_void_method(WebKitDOMTestObj* self) 53 54 { 54 g_return_if_fail 55 g_return_if_fail(self); 55 56 WebCore::TestObj * item = WebKit::core(self); 56 57 item->voidMethod(); … … 60 61 webkit_dom_test_obj_void_method_with_args(WebKitDOMTestObj* self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg) 61 62 { 62 g_return_if_fail 63 WebCore::TestObj * item = WebKit::core(self); 64 g_return_if_fail 65 g_return_if_fail 66 WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);67 WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);68 g_return_if_fail (_g_obj_arg);69 item->voidMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg);63 g_return_if_fail(self); 64 WebCore::TestObj * item = WebKit::core(self); 65 g_return_if_fail(str_arg); 66 g_return_if_fail(obj_arg); 67 WebCore::String converted_str_arg = WebCore::String::fromUTF8(str_arg); 68 WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg); 69 g_return_if_fail(converted_obj_arg); 70 item->voidMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg); 70 71 } 71 72 … … 73 74 webkit_dom_test_obj_int_method(WebKitDOMTestObj* self) 74 75 { 75 g_return_val_if_fail 76 g_return_val_if_fail(self, 0); 76 77 WebCore::TestObj * item = WebKit::core(self); 77 78 glong res = item->intMethod(); … … 82 83 webkit_dom_test_obj_int_method_with_args(WebKitDOMTestObj* self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg) 83 84 { 84 g_return_val_if_fail 85 WebCore::TestObj * item = WebKit::core(self); 86 g_return_val_if_fail 87 g_return_val_if_fail 88 WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);89 WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);90 g_return_val_if_fail (_g_obj_arg, 0);91 glong res = item->intMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg);85 g_return_val_if_fail(self, 0); 86 WebCore::TestObj * item = WebKit::core(self); 87 g_return_val_if_fail(str_arg, 0); 88 g_return_val_if_fail(obj_arg, 0); 89 WebCore::String converted_str_arg = WebCore::String::fromUTF8(str_arg); 90 WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg); 91 g_return_val_if_fail(converted_obj_arg, 0); 92 glong res = item->intMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg); 92 93 return res; 93 94 } … … 96 97 webkit_dom_test_obj_obj_method(WebKitDOMTestObj* self) 97 98 { 98 g_return_val_if_fail 99 g_return_val_if_fail(self, 0); 99 100 WebCore::TestObj * item = WebKit::core(self); 100 101 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethod()); … … 106 107 webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg, gchar* str_arg, WebKitDOMTestObj* obj_arg) 107 108 { 108 g_return_val_if_fail 109 WebCore::TestObj * item = WebKit::core(self); 110 g_return_val_if_fail 111 g_return_val_if_fail 112 WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);113 WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);114 g_return_val_if_fail (_g_obj_arg, 0);115 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg));109 g_return_val_if_fail(self, 0); 110 WebCore::TestObj * item = WebKit::core(self); 111 g_return_val_if_fail(str_arg, 0); 112 g_return_val_if_fail(obj_arg, 0); 113 WebCore::String converted_str_arg = WebCore::String::fromUTF8(str_arg); 114 WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg); 115 g_return_val_if_fail(converted_obj_arg, 0); 116 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg)); 116 117 WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get())); 117 118 return res; … … 121 122 webkit_dom_test_obj_method_that_requires_all_args(WebKitDOMTestObj* self, gchar* str_arg, WebKitDOMTestObj* obj_arg) 122 123 { 123 g_return_val_if_fail 124 WebCore::TestObj * item = WebKit::core(self); 125 g_return_val_if_fail 126 g_return_val_if_fail 127 WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);128 WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);129 g_return_val_if_fail (_g_obj_arg, 0);130 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgs( _g_str_arg, _g_obj_arg));124 g_return_val_if_fail(self, 0); 125 WebCore::TestObj * item = WebKit::core(self); 126 g_return_val_if_fail(str_arg, 0); 127 g_return_val_if_fail(obj_arg, 0); 128 WebCore::String converted_str_arg = WebCore::String::fromUTF8(str_arg); 129 WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg); 130 g_return_val_if_fail(converted_obj_arg, 0); 131 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgs(converted_str_arg, converted_obj_arg)); 131 132 WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get())); 132 133 return res; … … 136 137 webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* self, gchar* str_arg, WebKitDOMTestObj* obj_arg, GError **error) 137 138 { 138 g_return_val_if_fail 139 WebCore::TestObj * item = WebKit::core(self); 140 g_return_val_if_fail 141 g_return_val_if_fail 142 WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);143 WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);144 g_return_val_if_fail (_g_obj_arg, 0);139 g_return_val_if_fail(self, 0); 140 WebCore::TestObj * item = WebKit::core(self); 141 g_return_val_if_fail(str_arg, 0); 142 g_return_val_if_fail(obj_arg, 0); 143 WebCore::String converted_str_arg = WebCore::String::fromUTF8(str_arg); 144 WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg); 145 g_return_val_if_fail(converted_obj_arg, 0); 145 146 WebCore::ExceptionCode ec = 0; 146 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgsAndThrows( _g_str_arg, _g_obj_arg, ec));147 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgsAndThrows(converted_str_arg, converted_obj_arg, ec)); 147 148 if (ec) { 148 149 WebCore::ExceptionCodeDescription ecdesc; … … 157 158 webkit_dom_test_obj_serialized_value(WebKitDOMTestObj* self, WebKitDOMSerializedScriptValue* serialized_arg) 158 159 { 159 g_return_if_fail 160 WebCore::TestObj * item = WebKit::core(self); 161 g_return_if_fail 162 WebCore::SerializedScriptValue * _g_serialized_arg = WebKit::core(serialized_arg);163 g_return_if_fail (_g_serialized_arg);164 item->serializedValue( _g_serialized_arg);160 g_return_if_fail(self); 161 WebCore::TestObj * item = WebKit::core(self); 162 g_return_if_fail(serialized_arg); 163 WebCore::SerializedScriptValue * converted_serialized_arg = WebKit::core(serialized_arg); 164 g_return_if_fail(converted_serialized_arg); 165 item->serializedValue(converted_serialized_arg); 165 166 } 166 167 … … 168 169 webkit_dom_test_obj_method_with_exception(WebKitDOMTestObj* self, GError **error) 169 170 { 170 g_return_if_fail 171 g_return_if_fail(self); 171 172 WebCore::TestObj * item = WebKit::core(self); 172 173 WebCore::ExceptionCode ec = 0; … … 188 189 webkit_dom_test_obj_with_dynamic_frame(WebKitDOMTestObj* self) 189 190 { 190 g_return_if_fail 191 g_return_if_fail(self); 191 192 WebCore::TestObj * item = WebKit::core(self); 192 193 item->withDynamicFrame(); … … 196 197 webkit_dom_test_obj_with_dynamic_frame_and_arg(WebKitDOMTestObj* self, glong int_arg) 197 198 { 198 g_return_if_fail 199 g_return_if_fail(self); 199 200 WebCore::TestObj * item = WebKit::core(self); 200 201 item->withDynamicFrameAndArg(int_arg); … … 204 205 webkit_dom_test_obj_with_dynamic_frame_and_optional_arg(WebKitDOMTestObj* self, glong int_arg, glong optional_arg) 205 206 { 206 g_return_if_fail 207 g_return_if_fail(self); 207 208 WebCore::TestObj * item = WebKit::core(self); 208 209 item->withDynamicFrameAndOptionalArg(int_arg, optional_arg); … … 212 213 webkit_dom_test_obj_with_dynamic_frame_and_user_gesture(WebKitDOMTestObj* self, glong int_arg) 213 214 { 214 g_return_if_fail 215 g_return_if_fail(self); 215 216 WebCore::TestObj * item = WebKit::core(self); 216 217 item->withDynamicFrameAndUserGesture(int_arg); … … 220 221 webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad(WebKitDOMTestObj* self, glong int_arg, glong optional_arg) 221 222 { 222 g_return_if_fail 223 g_return_if_fail(self); 223 224 WebCore::TestObj * item = WebKit::core(self); 224 225 item->withDynamicFrameAndUserGestureASAD(int_arg, optional_arg); … … 228 229 webkit_dom_test_obj_with_script_state_void(WebKitDOMTestObj* self) 229 230 { 230 g_return_if_fail 231 g_return_if_fail(self); 231 232 WebCore::TestObj * item = WebKit::core(self); 232 233 item->withScriptStateVoid(); … … 236 237 webkit_dom_test_obj_with_script_state_obj(WebKitDOMTestObj* self) 237 238 { 238 g_return_val_if_fail 239 g_return_val_if_fail(self, 0); 239 240 WebCore::TestObj * item = WebKit::core(self); 240 241 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObj()); … … 246 247 webkit_dom_test_obj_with_script_state_void_exception(WebKitDOMTestObj* self, GError **error) 247 248 { 248 g_return_if_fail 249 g_return_if_fail(self); 249 250 WebCore::TestObj * item = WebKit::core(self); 250 251 WebCore::ExceptionCode ec = 0; … … 260 261 webkit_dom_test_obj_with_script_state_obj_exception(WebKitDOMTestObj* self, GError **error) 261 262 { 262 g_return_val_if_fail 263 g_return_val_if_fail(self, 0); 263 264 WebCore::TestObj * item = WebKit::core(self); 264 265 WebCore::ExceptionCode ec = 0; … … 276 277 webkit_dom_test_obj_with_script_execution_context(WebKitDOMTestObj* self) 277 278 { 278 g_return_if_fail 279 g_return_if_fail(self); 279 280 WebCore::TestObj * item = WebKit::core(self); 280 281 item->withScriptExecutionContext(); … … 284 285 webkit_dom_test_obj_method_with_optional_arg(WebKitDOMTestObj* self, glong opt) 285 286 { 286 g_return_if_fail 287 g_return_if_fail(self); 287 288 WebCore::TestObj * item = WebKit::core(self); 288 289 item->methodWithOptionalArg(opt); … … 292 293 webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg(WebKitDOMTestObj* self, glong non_opt, glong opt) 293 294 { 294 g_return_if_fail 295 g_return_if_fail(self); 295 296 WebCore::TestObj * item = WebKit::core(self); 296 297 item->methodWithNonOptionalArgAndOptionalArg(non_opt, opt); … … 300 301 webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args(WebKitDOMTestObj* self, glong non_opt, glong opt1, glong opt2) 301 302 { 302 g_return_if_fail 303 g_return_if_fail(self); 303 304 WebCore::TestObj * item = WebKit::core(self); 304 305 item->methodWithNonOptionalArgAndTwoOptionalArgs(non_opt, opt1, opt2); … … 308 309 webkit_dom_test_obj_get_read_only_int_attr(WebKitDOMTestObj* self) 309 310 { 310 g_return_val_if_fail 311 g_return_val_if_fail(self, 0); 311 312 WebCore::TestObj * item = WebKit::core(self); 312 313 glong res = item->readOnlyIntAttr(); … … 317 318 webkit_dom_test_obj_get_read_only_string_attr(WebKitDOMTestObj* self) 318 319 { 319 g_return_val_if_fail 320 g_return_val_if_fail(self, 0); 320 321 WebCore::TestObj * item = WebKit::core(self); 321 322 gchar* res = convertToUTF8String(item->readOnlyStringAttr()); … … 326 327 webkit_dom_test_obj_get_read_only_test_obj_attr(WebKitDOMTestObj* self) 327 328 { 328 g_return_val_if_fail 329 g_return_val_if_fail(self, 0); 329 330 WebCore::TestObj * item = WebKit::core(self); 330 331 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->readOnlyTestObjAttr()); … … 336 337 webkit_dom_test_obj_get_int_attr(WebKitDOMTestObj* self) 337 338 { 338 g_return_val_if_fail 339 g_return_val_if_fail(self, 0); 339 340 WebCore::TestObj * item = WebKit::core(self); 340 341 glong res = item->intAttr(); … … 345 346 webkit_dom_test_obj_set_int_attr(WebKitDOMTestObj* self, glong value) 346 347 { 347 g_return_if_fail 348 g_return_if_fail(self); 348 349 WebCore::TestObj * item = WebKit::core(self); 349 350 item->setIntAttr(value); … … 353 354 webkit_dom_test_obj_get_long_long_attr(WebKitDOMTestObj* self) 354 355 { 355 g_return_val_if_fail 356 g_return_val_if_fail(self, 0); 356 357 WebCore::TestObj * item = WebKit::core(self); 357 358 gint64 res = item->longLongAttr(); … … 362 363 webkit_dom_test_obj_set_long_long_attr(WebKitDOMTestObj* self, gint64 value) 363 364 { 364 g_return_if_fail 365 g_return_if_fail(self); 365 366 WebCore::TestObj * item = WebKit::core(self); 366 367 item->setLongLongAttr(value); … … 370 371 webkit_dom_test_obj_get_unsigned_long_long_attr(WebKitDOMTestObj* self) 371 372 { 372 g_return_val_if_fail 373 g_return_val_if_fail(self, 0); 373 374 WebCore::TestObj * item = WebKit::core(self); 374 375 guint64 res = item->unsignedLongLongAttr(); … … 379 380 webkit_dom_test_obj_set_unsigned_long_long_attr(WebKitDOMTestObj* self, guint64 value) 380 381 { 381 g_return_if_fail 382 g_return_if_fail(self); 382 383 WebCore::TestObj * item = WebKit::core(self); 383 384 item->setUnsignedLongLongAttr(value); … … 387 388 webkit_dom_test_obj_get_string_attr(WebKitDOMTestObj* self) 388 389 { 389 g_return_val_if_fail 390 g_return_val_if_fail(self, 0); 390 391 WebCore::TestObj * item = WebKit::core(self); 391 392 gchar* res = convertToUTF8String(item->stringAttr()); … … 396 397 webkit_dom_test_obj_set_string_attr(WebKitDOMTestObj* self, gchar* value) 397 398 { 398 g_return_if_fail 399 WebCore::TestObj * item = WebKit::core(self); 400 g_return_if_fail 401 WebCore::String _g_value = WebCore::String::fromUTF8(value);402 item->setStringAttr( _g_value);399 g_return_if_fail(self); 400 WebCore::TestObj * item = WebKit::core(self); 401 g_return_if_fail(value); 402 WebCore::String converted_value = WebCore::String::fromUTF8(value); 403 item->setStringAttr(converted_value); 403 404 } 404 405 … … 406 407 webkit_dom_test_obj_get_test_obj_attr(WebKitDOMTestObj* self) 407 408 { 408 g_return_val_if_fail 409 g_return_val_if_fail(self, 0); 409 410 WebCore::TestObj * item = WebKit::core(self); 410 411 PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->testObjAttr()); … … 416 417 webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* value) 417 418 { 418 g_return_if_fail (self); 419 WebCore::TestObj * item = WebKit::core(self); 420 g_return_if_fail (value); 421 WebCore::TestObj * _g_value = WebKit::core(value); 422 g_return_if_fail (_g_value); 423 item->setTestObjAttr(_g_value); 419 g_return_if_fail(self); 420 WebCore::TestObj * item = WebKit::core(self); 421 g_return_if_fail(value); 422 WebCore::TestObj * converted_value = WebKit::core(value); 423 g_return_if_fail(converted_value); 424 item->setTestObjAttr(converted_value); 425 } 426 427 gchar* 428 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self) 429 { 430 g_return_val_if_fail(self, 0); 431 WebCore::TestObj * item = WebKit::core(self); 432 gchar* res = convertToUTF8String(item->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr)); 433 return res; 434 } 435 436 void 437 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, gchar* value) 438 { 439 g_return_if_fail(self); 440 WebCore::TestObj * item = WebKit::core(self); 441 g_return_if_fail(value); 442 WebCore::String converted_value = WebCore::String::fromUTF8(value); 443 item->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, converted_value); 424 444 } 425 445 426 446 glong 427 webkit_dom_test_obj_get_attr_with_exception(WebKitDOMTestObj* self) 428 { 429 g_return_val_if_fail (self, 0); 430 WebCore::TestObj * item = WebKit::core(self); 431 glong res = item->attrWithException(); 432 return res; 433 } 434 435 void 436 webkit_dom_test_obj_set_attr_with_exception(WebKitDOMTestObj* self, glong value) 437 { 438 g_return_if_fail (self); 439 WebCore::TestObj * item = WebKit::core(self); 440 item->setAttrWithException(value); 447 webkit_dom_test_obj_get_reflected_integral_attr(WebKitDOMTestObj* self) 448 { 449 g_return_val_if_fail(self, 0); 450 WebCore::TestObj * item = WebKit::core(self); 451 glong res = item->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr); 452 return res; 453 } 454 455 void 456 webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong value) 457 { 458 g_return_if_fail(self); 459 WebCore::TestObj * item = WebKit::core(self); 460 item->setAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, value); 461 } 462 463 gboolean 464 webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self) 465 { 466 g_return_val_if_fail(self, 0); 467 WebCore::TestObj * item = WebKit::core(self); 468 gboolean res = item->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr); 469 return res; 470 } 471 472 void 473 webkit_dom_test_obj_set_reflected_boolean_attr(WebKitDOMTestObj* self, gboolean value) 474 { 475 g_return_if_fail(self); 476 WebCore::TestObj * item = WebKit::core(self); 477 item->setAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, value); 478 } 479 480 gchar* 481 webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self) 482 { 483 g_return_val_if_fail(self, 0); 484 WebCore::TestObj * item = WebKit::core(self); 485 gchar* res = convertToUTF8String(item->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr)); 486 return res; 487 } 488 489 void 490 webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, gchar* value) 491 { 492 g_return_if_fail(self); 493 WebCore::TestObj * item = WebKit::core(self); 494 g_return_if_fail(value); 495 WebCore::String converted_value = WebCore::String::fromUTF8(value); 496 item->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, converted_value); 497 } 498 499 gchar* 500 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self) 501 { 502 g_return_val_if_fail(self, 0); 503 WebCore::TestObj * item = WebKit::core(self); 504 gchar* res = convertToUTF8String(item->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr)); 505 return res; 506 } 507 508 void 509 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, gchar* value) 510 { 511 g_return_if_fail(self); 512 WebCore::TestObj * item = WebKit::core(self); 513 g_return_if_fail(value); 514 WebCore::String converted_value = WebCore::String::fromUTF8(value); 515 item->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, converted_value); 441 516 } 442 517 443 518 glong 444 webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self, GError **error) 445 { 446 g_return_val_if_fail (self, 0); 519 webkit_dom_test_obj_get_reflected_custom_integral_attr(WebKitDOMTestObj* self) 520 { 521 g_return_val_if_fail(self, 0); 522 WebCore::TestObj * item = WebKit::core(self); 523 glong res = item->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr); 524 return res; 525 } 526 527 void 528 webkit_dom_test_obj_set_reflected_custom_integral_attr(WebKitDOMTestObj* self, glong value) 529 { 530 g_return_if_fail(self); 531 WebCore::TestObj * item = WebKit::core(self); 532 item->setAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, value); 533 } 534 535 gboolean 536 webkit_dom_test_obj_get_reflected_custom_boolean_attr(WebKitDOMTestObj* self) 537 { 538 g_return_val_if_fail(self, 0); 539 WebCore::TestObj * item = WebKit::core(self); 540 gboolean res = item->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr); 541 return res; 542 } 543 544 void 545 webkit_dom_test_obj_set_reflected_custom_boolean_attr(WebKitDOMTestObj* self, gboolean value) 546 { 547 g_return_if_fail(self); 548 WebCore::TestObj * item = WebKit::core(self); 549 item->setAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, value); 550 } 551 552 gchar* 553 webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self) 554 { 555 g_return_val_if_fail(self, 0); 556 WebCore::TestObj * item = WebKit::core(self); 557 gchar* res = convertToUTF8String(item->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr)); 558 return res; 559 } 560 561 void 562 webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, gchar* value) 563 { 564 g_return_if_fail(self); 565 WebCore::TestObj * item = WebKit::core(self); 566 g_return_if_fail(value); 567 WebCore::String converted_value = WebCore::String::fromUTF8(value); 568 item->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, converted_value); 569 } 570 571 glong 572 webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error) 573 { 574 g_return_val_if_fail(self, 0); 447 575 WebCore::TestObj * item = WebKit::core(self); 448 576 WebCore::ExceptionCode ec = 0; 449 glong res = item->attrWith SetterException(ec);577 glong res = item->attrWithGetterException(ec); 450 578 if (ec) { 451 579 WebCore::ExceptionCodeDescription ecdesc; … … 457 585 458 586 void 587 webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value, GError **error) 588 { 589 g_return_if_fail(self); 590 WebCore::TestObj * item = WebKit::core(self); 591 WebCore::ExceptionCode ec = 0; 592 item->setAttrWithGetterException(value, ec); 593 if (ec) { 594 WebCore::ExceptionCodeDescription ecdesc; 595 WebCore::getExceptionCodeDescription(ec, ecdesc); 596 g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name); 597 } 598 } 599 600 glong 601 webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self) 602 { 603 g_return_val_if_fail(self, 0); 604 WebCore::TestObj * item = WebKit::core(self); 605 glong res = item->attrWithSetterException(); 606 return res; 607 } 608 609 void 459 610 webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong value, GError **error) 460 611 { 461 g_return_if_fail 612 g_return_if_fail(self); 462 613 WebCore::TestObj * item = WebKit::core(self); 463 614 WebCore::ExceptionCode ec = 0; … … 470 621 } 471 622 472 glong 473 webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self) 474 { 475 g_return_val_if_fail (self, 0); 476 WebCore::TestObj * item = WebKit::core(self); 477 glong res = item->attrWithGetterException(); 478 return res; 479 } 480 481 void 482 webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value, GError **error) 483 { 484 g_return_if_fail (self); 623 gchar* 624 webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error) 625 { 626 g_return_val_if_fail(self, 0); 485 627 WebCore::TestObj * item = WebKit::core(self); 486 628 WebCore::ExceptionCode ec = 0; 487 item->setAttrWithGetterException(value, ec); 629 gchar* res = convertToUTF8String(item->stringAttrWithGetterException(ec)); 630 return res; 631 } 632 633 void 634 webkit_dom_test_obj_set_string_attr_with_getter_exception(WebKitDOMTestObj* self, gchar* value, GError **error) 635 { 636 g_return_if_fail(self); 637 WebCore::TestObj * item = WebKit::core(self); 638 g_return_if_fail(value); 639 WebCore::String converted_value = WebCore::String::fromUTF8(value); 640 WebCore::ExceptionCode ec = 0; 641 item->setStringAttrWithGetterException(converted_value, ec); 488 642 if (ec) { 489 643 WebCore::ExceptionCodeDescription ecdesc; … … 494 648 495 649 gchar* 650 webkit_dom_test_obj_get_string_attr_with_setter_exception(WebKitDOMTestObj* self) 651 { 652 g_return_val_if_fail(self, 0); 653 WebCore::TestObj * item = WebKit::core(self); 654 gchar* res = convertToUTF8String(item->stringAttrWithSetterException()); 655 return res; 656 } 657 658 void 659 webkit_dom_test_obj_set_string_attr_with_setter_exception(WebKitDOMTestObj* self, gchar* value, GError **error) 660 { 661 g_return_if_fail(self); 662 WebCore::TestObj * item = WebKit::core(self); 663 g_return_if_fail(value); 664 WebCore::String converted_value = WebCore::String::fromUTF8(value); 665 WebCore::ExceptionCode ec = 0; 666 item->setStringAttrWithSetterException(converted_value, ec); 667 if (ec) { 668 WebCore::ExceptionCodeDescription ecdesc; 669 WebCore::getExceptionCodeDescription(ec, ecdesc); 670 g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name); 671 } 672 } 673 674 gchar* 496 675 webkit_dom_test_obj_get_script_string_attr(WebKitDOMTestObj* self) 497 676 { 498 g_return_val_if_fail 677 g_return_val_if_fail(self, 0); 499 678 WebCore::TestObj * item = WebKit::core(self); 500 679 gchar* res = convertToUTF8String(item->scriptStringAttr()); … … 506 685 webkit_dom_test_obj_get_conditional_attr1(WebKitDOMTestObj* self) 507 686 { 508 g_return_val_if_fail 687 g_return_val_if_fail(self, 0); 509 688 WebCore::TestObj * item = WebKit::core(self); 510 689 glong res = item->conditionalAttr1(); … … 517 696 webkit_dom_test_obj_set_conditional_attr1(WebKitDOMTestObj* self, glong value) 518 697 { 519 g_return_if_fail 698 g_return_if_fail(self); 520 699 WebCore::TestObj * item = WebKit::core(self); 521 700 item->setConditionalAttr1(value); … … 527 706 webkit_dom_test_obj_get_conditional_attr2(WebKitDOMTestObj* self) 528 707 { 529 g_return_val_if_fail 708 g_return_val_if_fail(self, 0); 530 709 WebCore::TestObj * item = WebKit::core(self); 531 710 glong res = item->conditionalAttr2(); … … 538 717 webkit_dom_test_obj_set_conditional_attr2(WebKitDOMTestObj* self, glong value) 539 718 { 540 g_return_if_fail 719 g_return_if_fail(self); 541 720 WebCore::TestObj * item = WebKit::core(self); 542 721 item->setConditionalAttr2(value); … … 548 727 webkit_dom_test_obj_get_conditional_attr3(WebKitDOMTestObj* self) 549 728 { 550 g_return_val_if_fail 729 g_return_val_if_fail(self, 0); 551 730 WebCore::TestObj * item = WebKit::core(self); 552 731 glong res = item->conditionalAttr3(); … … 559 738 webkit_dom_test_obj_set_conditional_attr3(WebKitDOMTestObj* self, glong value) 560 739 { 561 g_return_if_fail 740 g_return_if_fail(self); 562 741 WebCore::TestObj * item = WebKit::core(self); 563 742 item->setConditionalAttr3(value); … … 568 747 webkit_dom_test_obj_get_description(WebKitDOMTestObj* self) 569 748 { 570 g_return_val_if_fail 749 g_return_val_if_fail(self, 0); 571 750 WebCore::TestObj * item = WebKit::core(self); 572 751 glong res = item->description(); … … 577 756 webkit_dom_test_obj_get_id(WebKitDOMTestObj* self) 578 757 { 579 g_return_val_if_fail 758 g_return_val_if_fail(self, 0); 580 759 WebCore::TestObj * item = WebKit::core(self); 581 760 glong res = item->id(); … … 586 765 webkit_dom_test_obj_set_id(WebKitDOMTestObj* self, glong value) 587 766 { 588 g_return_if_fail 767 g_return_if_fail(self); 589 768 WebCore::TestObj * item = WebKit::core(self); 590 769 item->setId(value); … … 594 773 webkit_dom_test_obj_get_hash(WebKitDOMTestObj* self) 595 774 { 596 g_return_val_if_fail 775 g_return_val_if_fail(self, 0); 597 776 WebCore::TestObj * item = WebKit::core(self); 598 777 gchar* res = convertToUTF8String(item->hash()); … … 626 805 PROP_STRING_ATTR, 627 806 PROP_TEST_OBJ_ATTR, 628 PROP_ATTR_WITH_EXCEPTION, 807 PROP_REFLECTED_STRING_ATTR, 808 PROP_REFLECTED_INTEGRAL_ATTR, 809 PROP_REFLECTED_BOOLEAN_ATTR, 810 PROP_REFLECTED_URL_ATTR, 811 PROP_REFLECTED_STRING_ATTR, 812 PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR, 813 PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR, 814 PROP_REFLECTED_URL_ATTR, 815 PROP_ATTR_WITH_GETTER_EXCEPTION, 629 816 PROP_ATTR_WITH_SETTER_EXCEPTION, 630 PROP_ATTR_WITH_GETTER_EXCEPTION, 817 PROP_STRING_ATTR_WITH_GETTER_EXCEPTION, 818 PROP_STRING_ATTR_WITH_SETTER_EXCEPTION, 631 819 PROP_CUSTOM_ATTR, 632 820 PROP_SCRIPT_STRING_ATTR, … … 682 870 break; 683 871 } 684 case PROP_ATTR_WITH_EXCEPTION: 685 { 686 coreSelf->setAttrWithException((g_value_get_long(value))); 872 case PROP_REFLECTED_STRING_ATTR: 873 { 874 coreSelf->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, WebCore::String::fromUTF8(g_value_get_string(value))); 875 break; 876 } 877 case PROP_REFLECTED_INTEGRAL_ATTR: 878 { 879 coreSelf->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, (g_value_get_long(value))); 880 break; 881 } 882 case PROP_REFLECTED_BOOLEAN_ATTR: 883 { 884 coreSelf->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, (g_value_get_boolean(value))); 885 break; 886 } 887 case PROP_REFLECTED_URL_ATTR: 888 { 889 coreSelf->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, WebCore::String::fromUTF8(g_value_get_string(value))); 890 break; 891 } 892 case PROP_REFLECTED_STRING_ATTR: 893 { 894 coreSelf->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, WebCore::String::fromUTF8(g_value_get_string(value))); 895 break; 896 } 897 case PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR: 898 { 899 coreSelf->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, (g_value_get_long(value))); 900 break; 901 } 902 case PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR: 903 { 904 coreSelf->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, (g_value_get_boolean(value))); 905 break; 906 } 907 case PROP_REFLECTED_URL_ATTR: 908 { 909 coreSelf->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, WebCore::String::fromUTF8(g_value_get_string(value))); 910 break; 911 } 912 case PROP_ATTR_WITH_GETTER_EXCEPTION: 913 { 914 WebCore::ExceptionCode ec = 0; 915 coreSelf->setAttrWithGetterException((g_value_get_long(value)), ec); 687 916 break; 688 917 } … … 693 922 break; 694 923 } 695 case PROP_ ATTR_WITH_GETTER_EXCEPTION:924 case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION: 696 925 { 697 926 WebCore::ExceptionCode ec = 0; 698 coreSelf->setAttrWithGetterException((g_value_get_long(value)), ec); 927 coreSelf->setStringAttrWithGetterException(WebCore::String::fromUTF8(g_value_get_string(value)), ec); 928 break; 929 } 930 case PROP_STRING_ATTR_WITH_SETTER_EXCEPTION: 931 { 932 WebCore::ExceptionCode ec = 0; 933 coreSelf->setStringAttrWithSetterException(WebCore::String::fromUTF8(g_value_get_string(value)), ec); 699 934 break; 700 935 } … … 779 1014 break; 780 1015 } 781 case PROP_ATTR_WITH_EXCEPTION: 782 { 783 g_value_set_long(value, coreSelf->attrWithException()); 1016 case PROP_REFLECTED_STRING_ATTR: 1017 { 1018 g_value_take_string(value, convertToUTF8String(coreSelf->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr))); 1019 break; 1020 } 1021 case PROP_REFLECTED_INTEGRAL_ATTR: 1022 { 1023 g_value_set_long(value, coreSelf->reflectedIntegralAttr()); 1024 break; 1025 } 1026 case PROP_REFLECTED_BOOLEAN_ATTR: 1027 { 1028 g_value_set_boolean(value, coreSelf->reflectedBooleanAttr()); 1029 break; 1030 } 1031 case PROP_REFLECTED_URL_ATTR: 1032 { 1033 g_value_take_string(value, convertToUTF8String(coreSelf->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr))); 1034 break; 1035 } 1036 case PROP_REFLECTED_STRING_ATTR: 1037 { 1038 g_value_take_string(value, convertToUTF8String(coreSelf->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr))); 1039 break; 1040 } 1041 case PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR: 1042 { 1043 g_value_set_long(value, coreSelf->reflectedCustomIntegralAttr()); 1044 break; 1045 } 1046 case PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR: 1047 { 1048 g_value_set_boolean(value, coreSelf->reflectedCustomBooleanAttr()); 1049 break; 1050 } 1051 case PROP_REFLECTED_URL_ATTR: 1052 { 1053 g_value_take_string(value, convertToUTF8String(coreSelf->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr))); 1054 break; 1055 } 1056 case PROP_ATTR_WITH_GETTER_EXCEPTION: 1057 { 1058 WebCore::ExceptionCode ec = 0; 1059 g_value_set_long(value, coreSelf->attrWithGetterException(ec)); 784 1060 break; 785 1061 } 786 1062 case PROP_ATTR_WITH_SETTER_EXCEPTION: 787 1063 { 1064 g_value_set_long(value, coreSelf->attrWithSetterException()); 1065 break; 1066 } 1067 case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION: 1068 { 788 1069 WebCore::ExceptionCode ec = 0; 789 g_value_ set_long(value, coreSelf->attrWithSetterException(ec));790 break; 791 } 792 case PROP_ ATTR_WITH_GETTER_EXCEPTION:793 { 794 g_value_ set_long(value, coreSelf->attrWithGetterException());1070 g_value_take_string(value, convertToUTF8String(coreSelf->stringAttrWithGetterException(ec))); 1071 break; 1072 } 1073 case PROP_STRING_ATTR_WITH_SETTER_EXCEPTION: 1074 { 1075 g_value_take_string(value, convertToUTF8String(coreSelf->stringAttrWithSetterException())); 795 1076 break; 796 1077 } … … 915 1196 WEBKIT_PARAM_READWRITE)); 916 1197 g_object_class_install_property(gobjectClass, 917 PROP_ATTR_WITH_EXCEPTION, 918 g_param_spec_long("attr-with-exception", /* name */ 919 "test_obj_attr-with-exception", /* short description */ 920 "read-write glong TestObj.attr-with-exception", /* longer - could do with some extra doc stuff here */ 1198 PROP_REFLECTED_STRING_ATTR, 1199 g_param_spec_string("reflected-string-attr", /* name */ 1200 "test_obj_reflected-string-attr", /* short description */ 1201 "read-write gchar* TestObj.reflected-string-attr", /* longer - could do with some extra doc stuff here */ 1202 "", /* default */ 1203 WEBKIT_PARAM_READWRITE)); 1204 g_object_class_install_property(gobjectClass, 1205 PROP_REFLECTED_INTEGRAL_ATTR, 1206 g_param_spec_long("reflected-integral-attr", /* name */ 1207 "test_obj_reflected-integral-attr", /* short description */ 1208 "read-write glong TestObj.reflected-integral-attr", /* longer - could do with some extra doc stuff here */ 1209 G_MINLONG, /* min */ 1210 G_MAXLONG, /* max */ 1211 0, /* default */ 1212 WEBKIT_PARAM_READWRITE)); 1213 g_object_class_install_property(gobjectClass, 1214 PROP_REFLECTED_BOOLEAN_ATTR, 1215 g_param_spec_boolean("reflected-boolean-attr", /* name */ 1216 "test_obj_reflected-boolean-attr", /* short description */ 1217 "read-write gboolean TestObj.reflected-boolean-attr", /* longer - could do with some extra doc stuff here */ 1218 FALSE, /* default */ 1219 WEBKIT_PARAM_READWRITE)); 1220 g_object_class_install_property(gobjectClass, 1221 PROP_REFLECTED_URL_ATTR, 1222 g_param_spec_string("reflected-url-attr", /* name */ 1223 "test_obj_reflected-url-attr", /* short description */ 1224 "read-write gchar* TestObj.reflected-url-attr", /* longer - could do with some extra doc stuff here */ 1225 "", /* default */ 1226 WEBKIT_PARAM_READWRITE)); 1227 g_object_class_install_property(gobjectClass, 1228 PROP_REFLECTED_STRING_ATTR, 1229 g_param_spec_string("reflected-string-attr", /* name */ 1230 "test_obj_reflected-string-attr", /* short description */ 1231 "read-write gchar* TestObj.reflected-string-attr", /* longer - could do with some extra doc stuff here */ 1232 "", /* default */ 1233 WEBKIT_PARAM_READWRITE)); 1234 g_object_class_install_property(gobjectClass, 1235 PROP_REFLECTED_CUSTOM_INTEGRAL_ATTR, 1236 g_param_spec_long("reflected-custom-integral-attr", /* name */ 1237 "test_obj_reflected-custom-integral-attr", /* short description */ 1238 "read-write glong TestObj.reflected-custom-integral-attr", /* longer - could do with some extra doc stuff here */ 1239 G_MINLONG, /* min */ 1240 G_MAXLONG, /* max */ 1241 0, /* default */ 1242 WEBKIT_PARAM_READWRITE)); 1243 g_object_class_install_property(gobjectClass, 1244 PROP_REFLECTED_CUSTOM_BOOLEAN_ATTR, 1245 g_param_spec_boolean("reflected-custom-boolean-attr", /* name */ 1246 "test_obj_reflected-custom-boolean-attr", /* short description */ 1247 "read-write gboolean TestObj.reflected-custom-boolean-attr", /* longer - could do with some extra doc stuff here */ 1248 FALSE, /* default */ 1249 WEBKIT_PARAM_READWRITE)); 1250 g_object_class_install_property(gobjectClass, 1251 PROP_REFLECTED_URL_ATTR, 1252 g_param_spec_string("reflected-url-attr", /* name */ 1253 "test_obj_reflected-url-attr", /* short description */ 1254 "read-write gchar* TestObj.reflected-url-attr", /* longer - could do with some extra doc stuff here */ 1255 "", /* default */ 1256 WEBKIT_PARAM_READWRITE)); 1257 g_object_class_install_property(gobjectClass, 1258 PROP_ATTR_WITH_GETTER_EXCEPTION, 1259 g_param_spec_long("attr-with-getter-exception", /* name */ 1260 "test_obj_attr-with-getter-exception", /* short description */ 1261 "read-write glong TestObj.attr-with-getter-exception", /* longer - could do with some extra doc stuff here */ 921 1262 G_MINLONG, /* min */ 922 1263 G_MAXLONG, /* max */ … … 933 1274 WEBKIT_PARAM_READWRITE)); 934 1275 g_object_class_install_property(gobjectClass, 935 PROP_ATTR_WITH_GETTER_EXCEPTION, 936 g_param_spec_long("attr-with-getter-exception", /* name */ 937 "test_obj_attr-with-getter-exception", /* short description */ 938 "read-write glong TestObj.attr-with-getter-exception", /* longer - could do with some extra doc stuff here */ 939 G_MINLONG, /* min */ 940 G_MAXLONG, /* max */ 941 0, /* default */ 1276 PROP_STRING_ATTR_WITH_GETTER_EXCEPTION, 1277 g_param_spec_string("string-attr-with-getter-exception", /* name */ 1278 "test_obj_string-attr-with-getter-exception", /* short description */ 1279 "read-write gchar* TestObj.string-attr-with-getter-exception", /* longer - could do with some extra doc stuff here */ 1280 "", /* default */ 1281 WEBKIT_PARAM_READWRITE)); 1282 g_object_class_install_property(gobjectClass, 1283 PROP_STRING_ATTR_WITH_SETTER_EXCEPTION, 1284 g_param_spec_string("string-attr-with-setter-exception", /* name */ 1285 "test_obj_string-attr-with-setter-exception", /* short description */ 1286 "read-write gchar* TestObj.string-attr-with-setter-exception", /* longer - could do with some extra doc stuff here */ 1287 "", /* default */ 942 1288 WEBKIT_PARAM_READWRITE)); 943 1289 g_object_class_install_property(gobjectClass, -
trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
r61384 r61413 161 161 webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* value); 162 162 163 WEBKIT_API glong 164 webkit_dom_test_obj_get_attr_with_exception(WebKitDOMTestObj* self); 165 166 WEBKIT_API void 167 webkit_dom_test_obj_set_attr_with_exception(WebKitDOMTestObj* self, glong value); 168 169 WEBKIT_API glong 170 webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self, GError **error); 163 WEBKIT_API gchar* 164 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self); 165 166 WEBKIT_API void 167 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, gchar* value); 168 169 WEBKIT_API glong 170 webkit_dom_test_obj_get_reflected_integral_attr(WebKitDOMTestObj* self); 171 172 WEBKIT_API void 173 webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong value); 174 175 WEBKIT_API gboolean 176 webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self); 177 178 WEBKIT_API void 179 webkit_dom_test_obj_set_reflected_boolean_attr(WebKitDOMTestObj* self, gboolean value); 180 181 WEBKIT_API gchar* 182 webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self); 183 184 WEBKIT_API void 185 webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, gchar* value); 186 187 WEBKIT_API gchar* 188 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self); 189 190 WEBKIT_API void 191 webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, gchar* value); 192 193 WEBKIT_API glong 194 webkit_dom_test_obj_get_reflected_custom_integral_attr(WebKitDOMTestObj* self); 195 196 WEBKIT_API void 197 webkit_dom_test_obj_set_reflected_custom_integral_attr(WebKitDOMTestObj* self, glong value); 198 199 WEBKIT_API gboolean 200 webkit_dom_test_obj_get_reflected_custom_boolean_attr(WebKitDOMTestObj* self); 201 202 WEBKIT_API void 203 webkit_dom_test_obj_set_reflected_custom_boolean_attr(WebKitDOMTestObj* self, gboolean value); 204 205 WEBKIT_API gchar* 206 webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self); 207 208 WEBKIT_API void 209 webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, gchar* value); 210 211 WEBKIT_API glong 212 webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error); 213 214 WEBKIT_API void 215 webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value, GError **error); 216 217 WEBKIT_API glong 218 webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self); 171 219 172 220 WEBKIT_API void 173 221 webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong value, GError **error); 174 222 175 WEBKIT_API glong 176 webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self); 177 178 WEBKIT_API void 179 webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value, GError **error); 223 WEBKIT_API gchar* 224 webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error); 225 226 WEBKIT_API void 227 webkit_dom_test_obj_set_string_attr_with_getter_exception(WebKitDOMTestObj* self, gchar* value, GError **error); 228 229 WEBKIT_API gchar* 230 webkit_dom_test_obj_get_string_attr_with_setter_exception(WebKitDOMTestObj* self); 231 232 WEBKIT_API void 233 webkit_dom_test_obj_set_string_attr_with_setter_exception(WebKitDOMTestObj* self, gchar* value, GError **error); 180 234 181 235 WEBKIT_API gchar* -
trunk/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r61384 r61413 22 22 #include "JSTestObj.h" 23 23 24 #include "HTMLNames.h" 24 25 #include "JSEventListener.h" 25 26 #include "JSTestObj.h" … … 47 48 #endif 48 49 49 static const HashTableValue JSTestObjTableValues[ 21] =50 static const HashTableValue JSTestObjTableValues[30] = 50 51 { 51 52 { "readOnlyIntAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyIntAttr), (intptr_t)0 THUNK_GENERATOR(0) }, … … 57 58 { "stringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t)setJSTestObjStringAttr THUNK_GENERATOR(0) }, 58 59 { "testObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t)setJSTestObjTestObjAttr THUNK_GENERATOR(0) }, 59 { "attrWithException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithException), (intptr_t)setJSTestObjAttrWithException THUNK_GENERATOR(0) }, 60 { "reflectedStringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t)setJSTestObjReflectedStringAttr THUNK_GENERATOR(0) }, 61 { "reflectedIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedIntegralAttr), (intptr_t)setJSTestObjReflectedIntegralAttr THUNK_GENERATOR(0) }, 62 { "reflectedBooleanAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedBooleanAttr), (intptr_t)setJSTestObjReflectedBooleanAttr THUNK_GENERATOR(0) }, 63 { "reflectedURLAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedURLAttr), (intptr_t)setJSTestObjReflectedURLAttr THUNK_GENERATOR(0) }, 64 { "reflectedStringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t)setJSTestObjReflectedStringAttr THUNK_GENERATOR(0) }, 65 { "reflectedCustomIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomIntegralAttr), (intptr_t)setJSTestObjReflectedCustomIntegralAttr THUNK_GENERATOR(0) }, 66 { "reflectedCustomBooleanAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomBooleanAttr), (intptr_t)setJSTestObjReflectedCustomBooleanAttr THUNK_GENERATOR(0) }, 67 { "reflectedURLAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedURLAttr), (intptr_t)setJSTestObjReflectedURLAttr THUNK_GENERATOR(0) }, 68 { "attrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t)setJSTestObjAttrWithGetterException THUNK_GENERATOR(0) }, 60 69 { "attrWithSetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterException), (intptr_t)setJSTestObjAttrWithSetterException THUNK_GENERATOR(0) }, 61 { "attrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t)setJSTestObjAttrWithGetterException THUNK_GENERATOR(0) }, 70 { "stringAttrWithGetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithGetterException), (intptr_t)setJSTestObjStringAttrWithGetterException THUNK_GENERATOR(0) }, 71 { "stringAttrWithSetterException", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithSetterException), (intptr_t)setJSTestObjStringAttrWithSetterException THUNK_GENERATOR(0) }, 62 72 { "customAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCustomAttr), (intptr_t)setJSTestObjCustomAttr THUNK_GENERATOR(0) }, 63 73 { "scriptStringAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjScriptStringAttr), (intptr_t)0 THUNK_GENERATOR(0) }, … … 79 89 80 90 #undef THUNK_GENERATOR 81 static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 6 6, 63, JSTestObjTableValues, 0 };91 static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 69, 63, JSTestObjTableValues, 0 }; 82 92 /* Hash table for constructor */ 83 93 #if ENABLE(JIT) … … 288 298 } 289 299 290 JSValue jsTestObjAttrWithException(ExecState* exec, JSValue slotBase, const Identifier&) 291 { 292 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 293 UNUSED_PARAM(exec); 294 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 295 JSValue result = jsNumber(exec, imp->attrWithException()); 300 JSValue jsTestObjReflectedStringAttr(ExecState* exec, JSValue slotBase, const Identifier&) 301 { 302 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 303 UNUSED_PARAM(exec); 304 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 305 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr)); 306 return result; 307 } 308 309 JSValue jsTestObjReflectedIntegralAttr(ExecState* exec, JSValue slotBase, const Identifier&) 310 { 311 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 312 UNUSED_PARAM(exec); 313 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 314 JSValue result = jsNumber(exec, imp->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr)); 315 return result; 316 } 317 318 JSValue jsTestObjReflectedBooleanAttr(ExecState* exec, JSValue slotBase, const Identifier&) 319 { 320 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 321 UNUSED_PARAM(exec); 322 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 323 JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr)); 324 return result; 325 } 326 327 JSValue jsTestObjReflectedURLAttr(ExecState* exec, JSValue slotBase, const Identifier&) 328 { 329 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 330 UNUSED_PARAM(exec); 331 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 332 JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr)); 333 return result; 334 } 335 336 JSValue jsTestObjReflectedStringAttr(ExecState* exec, JSValue slotBase, const Identifier&) 337 { 338 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 339 UNUSED_PARAM(exec); 340 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 341 JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr)); 342 return result; 343 } 344 345 JSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, JSValue slotBase, const Identifier&) 346 { 347 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 348 UNUSED_PARAM(exec); 349 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 350 JSValue result = jsNumber(exec, imp->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr)); 351 return result; 352 } 353 354 JSValue jsTestObjReflectedCustomBooleanAttr(ExecState* exec, JSValue slotBase, const Identifier&) 355 { 356 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 357 UNUSED_PARAM(exec); 358 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 359 JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr)); 360 return result; 361 } 362 363 JSValue jsTestObjReflectedURLAttr(ExecState* exec, JSValue slotBase, const Identifier&) 364 { 365 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 366 UNUSED_PARAM(exec); 367 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 368 JSValue result = jsString(exec, imp->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr)); 369 return result; 370 } 371 372 JSValue jsTestObjAttrWithGetterException(ExecState* exec, JSValue slotBase, const Identifier&) 373 { 374 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 375 ExceptionCode ec = 0; 376 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 377 JSC::JSValue result = jsNumber(exec, imp->attrWithGetterException(ec)); 378 setDOMException(exec, ec); 296 379 return result; 297 380 } … … 300 383 { 301 384 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 385 UNUSED_PARAM(exec); 386 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 387 JSValue result = jsNumber(exec, imp->attrWithSetterException()); 388 return result; 389 } 390 391 JSValue jsTestObjStringAttrWithGetterException(ExecState* exec, JSValue slotBase, const Identifier&) 392 { 393 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 302 394 ExceptionCode ec = 0; 303 395 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 304 JSC::JSValue result = js Number(exec, imp->attrWithSetterException(ec));396 JSC::JSValue result = jsString(exec, imp->stringAttrWithGetterException(ec)); 305 397 setDOMException(exec, ec); 306 398 return result; 307 399 } 308 400 309 JSValue jsTestObj AttrWithGetterException(ExecState* exec, JSValue slotBase, const Identifier&)310 { 311 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 312 UNUSED_PARAM(exec); 313 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 314 JSValue result = js Number(exec, imp->attrWithGetterException());401 JSValue jsTestObjStringAttrWithSetterException(ExecState* exec, JSValue slotBase, const Identifier&) 402 { 403 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 404 UNUSED_PARAM(exec); 405 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 406 JSValue result = jsString(exec, imp->stringAttrWithSetterException()); 315 407 return result; 316 408 } … … 436 528 } 437 529 438 void setJSTestObjAttrWithException(ExecState* exec, JSObject* thisObject, JSValue value) 439 { 440 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 441 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 442 imp->setAttrWithException(value.toInt32(exec)); 530 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value) 531 { 532 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 533 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 534 imp->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, valueToStringWithNullCheck(exec, value)); 535 } 536 537 void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value) 538 { 539 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 540 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 541 imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, value.toInt32(exec)); 542 } 543 544 void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value) 545 { 546 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 547 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 548 imp->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, value.toBoolean(exec)); 549 } 550 551 void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* thisObject, JSValue value) 552 { 553 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 554 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 555 imp->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, valueToStringWithNullCheck(exec, value)); 556 } 557 558 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value) 559 { 560 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 561 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 562 imp->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, valueToStringWithNullCheck(exec, value)); 563 } 564 565 void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value) 566 { 567 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 568 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 569 imp->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, value.toInt32(exec)); 570 } 571 572 void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value) 573 { 574 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 575 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 576 imp->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, value.toBoolean(exec)); 577 } 578 579 void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* thisObject, JSValue value) 580 { 581 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 582 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 583 imp->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, valueToStringWithNullCheck(exec, value)); 584 } 585 586 void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value) 587 { 588 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 589 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 590 ExceptionCode ec = 0; 591 imp->setAttrWithGetterException(value.toInt32(exec), ec); 592 setDOMException(exec, ec); 443 593 } 444 594 … … 452 602 } 453 603 454 void setJSTestObj AttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)604 void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value) 455 605 { 456 606 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 457 607 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 458 608 ExceptionCode ec = 0; 459 imp->setAttrWithGetterException(value.toInt32(exec), ec); 609 imp->setStringAttrWithGetterException(ustringToString(value.toString(exec)), ec); 610 setDOMException(exec, ec); 611 } 612 613 void setJSTestObjStringAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value) 614 { 615 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 616 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 617 ExceptionCode ec = 0; 618 imp->setStringAttrWithSetterException(ustringToString(value.toString(exec)), ec); 460 619 setDOMException(exec, ec); 461 620 } … … 1017 1176 if (exec->argumentCount() == 1) 1018 1177 return jsTestObjPrototypeFunctionOverloadedMethod4(exec); 1019 return JSValue::encode(throwTypeError(exec));1178 return throwVMTypeError(exec); 1020 1179 } 1021 1180 -
trunk/WebCore/bindings/scripts/test/JS/JSTestObj.h
r61384 r61413 131 131 JSC::JSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 132 132 void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 133 JSC::JSValue jsTestObjAttrWithException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 134 void setJSTestObjAttrWithException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 133 JSC::JSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 134 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 135 JSC::JSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 136 void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 137 JSC::JSValue jsTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 138 void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 139 JSC::JSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 140 void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 141 JSC::JSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 142 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 143 JSC::JSValue jsTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 144 void setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 145 JSC::JSValue jsTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 146 void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 147 JSC::JSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 148 void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 149 JSC::JSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 150 void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 135 151 JSC::JSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 136 152 void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 137 JSC::JSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 138 void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 153 JSC::JSValue jsTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 154 void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 155 JSC::JSValue jsTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 156 void setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 139 157 JSC::JSValue jsTestObjCustomAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 140 158 void setJSTestObjCustomAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); -
trunk/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
r61384 r61413 48 48 - (DOMTestObj *)testObjAttr; 49 49 - (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr; 50 - (int)attrWithException; 51 - (void)setAttrWithException:(int)newAttrWithException; 50 - (NSString *)reflectedStringAttr; 51 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr; 52 - (int)reflectedIntegralAttr; 53 - (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr; 54 - (BOOL)reflectedBooleanAttr; 55 - (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr; 56 - (NSString *)reflectedURLAttr; 57 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr; 58 - (NSString *)reflectedStringAttr; 59 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr; 60 - (int)reflectedCustomIntegralAttr; 61 - (void)setReflectedCustomIntegralAttr:(int)newReflectedCustomIntegralAttr; 62 - (BOOL)reflectedCustomBooleanAttr; 63 - (void)setReflectedCustomBooleanAttr:(BOOL)newReflectedCustomBooleanAttr; 64 - (NSString *)reflectedURLAttr; 65 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr; 66 - (int)attrWithGetterException; 67 - (void)setAttrWithGetterException:(int)newAttrWithGetterException; 52 68 - (int)attrWithSetterException; 53 69 - (void)setAttrWithSetterException:(int)newAttrWithSetterException; 54 - (int)attrWithGetterException; 55 - (void)setAttrWithGetterException:(int)newAttrWithGetterException; 70 - (NSString *)stringAttrWithGetterException; 71 - (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException; 72 - (NSString *)stringAttrWithSetterException; 73 - (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException; 56 74 - (int)customAttr; 57 75 - (void)setCustomAttr:(int)newCustomAttr; -
trunk/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
r61384 r61413 40 40 #import "EventListener.h" 41 41 #import "ExceptionHandlers.h" 42 #import "HTMLNames.h" 42 43 #import "JSMainThreadExecState.h" 43 44 #import "KURL.h" … … 152 153 } 153 154 154 - (int)attrWithException 155 { 156 WebCore::JSMainThreadNullState state; 157 return IMPL->attrWithException(); 158 } 159 160 - (void)setAttrWithException:(int)newAttrWithException 161 { 162 WebCore::JSMainThreadNullState state; 163 IMPL->setAttrWithException(newAttrWithException); 155 - (NSString *)reflectedStringAttr 156 { 157 WebCore::JSMainThreadNullState state; 158 return IMPL->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr); 159 } 160 161 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr 162 { 163 WebCore::JSMainThreadNullState state; 164 IMPL->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, newReflectedStringAttr); 165 } 166 167 - (int)reflectedIntegralAttr 168 { 169 WebCore::JSMainThreadNullState state; 170 return IMPL->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr); 171 } 172 173 - (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr 174 { 175 WebCore::JSMainThreadNullState state; 176 IMPL->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr); 177 } 178 179 - (BOOL)reflectedBooleanAttr 180 { 181 WebCore::JSMainThreadNullState state; 182 return IMPL->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr); 183 } 184 185 - (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr 186 { 187 WebCore::JSMainThreadNullState state; 188 IMPL->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, newReflectedBooleanAttr); 189 } 190 191 - (NSString *)reflectedURLAttr 192 { 193 WebCore::JSMainThreadNullState state; 194 return IMPL->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr); 195 } 196 197 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr 198 { 199 WebCore::JSMainThreadNullState state; 200 IMPL->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, newReflectedURLAttr); 201 } 202 203 - (NSString *)reflectedStringAttr 204 { 205 WebCore::JSMainThreadNullState state; 206 return IMPL->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr); 207 } 208 209 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr 210 { 211 WebCore::JSMainThreadNullState state; 212 IMPL->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, newReflectedStringAttr); 213 } 214 215 - (int)reflectedCustomIntegralAttr 216 { 217 WebCore::JSMainThreadNullState state; 218 return IMPL->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr); 219 } 220 221 - (void)setReflectedCustomIntegralAttr:(int)newReflectedCustomIntegralAttr 222 { 223 WebCore::JSMainThreadNullState state; 224 IMPL->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, newReflectedCustomIntegralAttr); 225 } 226 227 - (BOOL)reflectedCustomBooleanAttr 228 { 229 WebCore::JSMainThreadNullState state; 230 return IMPL->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr); 231 } 232 233 - (void)setReflectedCustomBooleanAttr:(BOOL)newReflectedCustomBooleanAttr 234 { 235 WebCore::JSMainThreadNullState state; 236 IMPL->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, newReflectedCustomBooleanAttr); 237 } 238 239 - (NSString *)reflectedURLAttr 240 { 241 WebCore::JSMainThreadNullState state; 242 return IMPL->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr); 243 } 244 245 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr 246 { 247 WebCore::JSMainThreadNullState state; 248 IMPL->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, newReflectedURLAttr); 249 } 250 251 - (int)attrWithGetterException 252 { 253 WebCore::JSMainThreadNullState state; 254 WebCore::ExceptionCode ec = 0; 255 int result = IMPL->attrWithGetterException(ec); 256 WebCore::raiseOnDOMError(ec); 257 return result; 258 } 259 260 - (void)setAttrWithGetterException:(int)newAttrWithGetterException 261 { 262 WebCore::JSMainThreadNullState state; 263 WebCore::ExceptionCode ec = 0; 264 IMPL->setAttrWithGetterException(newAttrWithGetterException, ec); 265 WebCore::raiseOnDOMError(ec); 164 266 } 165 267 … … 167 269 { 168 270 WebCore::JSMainThreadNullState state; 169 WebCore::ExceptionCode ec = 0; 170 int result = IMPL->attrWithSetterException(ec); 271 return IMPL->attrWithSetterException(); 272 } 273 274 - (void)setAttrWithSetterException:(int)newAttrWithSetterException 275 { 276 WebCore::JSMainThreadNullState state; 277 WebCore::ExceptionCode ec = 0; 278 IMPL->setAttrWithSetterException(newAttrWithSetterException, ec); 279 WebCore::raiseOnDOMError(ec); 280 } 281 282 - (NSString *)stringAttrWithGetterException 283 { 284 WebCore::JSMainThreadNullState state; 285 WebCore::ExceptionCode ec = 0; 286 NSString *result = IMPL->stringAttrWithGetterException(ec); 171 287 WebCore::raiseOnDOMError(ec); 172 288 return result; 173 289 } 174 290 175 - (void)set AttrWithSetterException:(int)newAttrWithSetterException176 { 177 WebCore::JSMainThreadNullState state; 178 WebCore::ExceptionCode ec = 0; 179 IMPL->set AttrWithSetterException(newAttrWithSetterException, ec);180 WebCore::raiseOnDOMError(ec); 181 } 182 183 - ( int)attrWithGetterException184 { 185 WebCore::JSMainThreadNullState state; 186 return IMPL-> attrWithGetterException();187 } 188 189 - (void)set AttrWithGetterException:(int)newAttrWithGetterException190 { 191 WebCore::JSMainThreadNullState state; 192 WebCore::ExceptionCode ec = 0; 193 IMPL->set AttrWithGetterException(newAttrWithGetterException, ec);291 - (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException 292 { 293 WebCore::JSMainThreadNullState state; 294 WebCore::ExceptionCode ec = 0; 295 IMPL->setStringAttrWithGetterException(newStringAttrWithGetterException, ec); 296 WebCore::raiseOnDOMError(ec); 297 } 298 299 - (NSString *)stringAttrWithSetterException 300 { 301 WebCore::JSMainThreadNullState state; 302 return IMPL->stringAttrWithSetterException(); 303 } 304 305 - (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException 306 { 307 WebCore::JSMainThreadNullState state; 308 WebCore::ExceptionCode ec = 0; 309 IMPL->setStringAttrWithSetterException(newStringAttrWithSetterException, ec); 194 310 WebCore::raiseOnDOMError(ec); 195 311 } -
trunk/WebCore/bindings/scripts/test/TestObj.idl
r61384 r61413 41 41 attribute TestObj testObjAttr; 42 42 43 // Reflected DOM attributes 44 attribute [Reflect] DOMString reflectedStringAttr; 45 attribute [Reflect] long reflectedIntegralAttr; 46 attribute [Reflect] boolean reflectedBooleanAttr; 47 attribute [ReflectURL] DOMString reflectedURLAttr; 48 attribute [Reflect=customContentStringAttr] DOMString reflectedStringAttr; 49 attribute [Reflect=customContentIntegralAttr] long reflectedCustomIntegralAttr; 50 attribute [Reflect=customContentBooleanAttr] boolean reflectedCustomBooleanAttr; 51 attribute [ReflectURL=customContentURLAttr] DOMString reflectedURLAttr; 52 43 53 // Methods 44 54 void voidMethod(); … … 56 66 57 67 // Exceptions 58 void methodWithException() raises(DOMException); 59 attribute long attrWithException raises(DOMException); 60 attribute long attrWithSetterException getter raises(DOMException); 61 attribute long attrWithGetterException setter raises(DOMException); 68 void methodWithException() raises(DOMException); 69 attribute long attrWithGetterException getter raises(DOMException); 70 attribute long attrWithSetterException setter raises(DOMException); 71 attribute DOMString stringAttrWithGetterException getter raises(DOMException); 72 attribute DOMString stringAttrWithSetterException setter raises(DOMException); 62 73 63 74 // 'Custom' extended attribute -
trunk/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
r61384 r61413 23 23 24 24 #include "ExceptionCode.h" 25 #include "HTMLNames.h" 25 26 #include "RuntimeEnabledFeatures.h" 26 27 #include "ScriptCallStack.h" … … 152 153 } 153 154 154 static v8::Handle<v8::Value> attrWithExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 155 { 156 INC_STATS("DOM.TestObj.attrWithException._get"); 157 TestObj* imp = V8TestObj::toNative(info.Holder()); 158 return v8::Integer::New(imp->attrWithException()); 159 } 160 161 static void attrWithExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 162 { 163 INC_STATS("DOM.TestObj.attrWithException._set"); 155 static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 156 { 157 INC_STATS("DOM.TestObj.reflectedStringAttr._get"); 158 TestObj* imp = V8TestObj::toNative(info.Holder()); 159 return v8String(imp->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr)); 160 } 161 162 static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 163 { 164 INC_STATS("DOM.TestObj.reflectedStringAttr._set"); 165 TestObj* imp = V8TestObj::toNative(info.Holder()); 166 V8Parameter<WithNullCheck> v = value; 167 imp->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, v); 168 return; 169 } 170 171 static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 172 { 173 INC_STATS("DOM.TestObj.reflectedIntegralAttr._get"); 174 TestObj* imp = V8TestObj::toNative(info.Holder()); 175 return v8::Integer::New(imp->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr)); 176 } 177 178 static void reflectedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 179 { 180 INC_STATS("DOM.TestObj.reflectedIntegralAttr._set"); 164 181 TestObj* imp = V8TestObj::toNative(info.Holder()); 165 182 int v = toInt32(value); 166 imp->setAttrWithException(v); 167 return; 168 } 169 170 static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 171 { 172 INC_STATS("DOM.TestObj.attrWithSetterException._get"); 183 imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, v); 184 return; 185 } 186 187 static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 188 { 189 INC_STATS("DOM.TestObj.reflectedBooleanAttr._get"); 190 TestObj* imp = V8TestObj::toNative(info.Holder()); 191 return v8Boolean(imp->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr)); 192 } 193 194 static void reflectedBooleanAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 195 { 196 INC_STATS("DOM.TestObj.reflectedBooleanAttr._set"); 197 TestObj* imp = V8TestObj::toNative(info.Holder()); 198 bool v = value->BooleanValue(); 199 imp->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, v); 200 return; 201 } 202 203 static v8::Handle<v8::Value> reflectedURLAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 204 { 205 INC_STATS("DOM.TestObj.reflectedURLAttr._get"); 206 TestObj* imp = V8TestObj::toNative(info.Holder()); 207 return v8String(imp->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr)); 208 } 209 210 static void reflectedURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 211 { 212 INC_STATS("DOM.TestObj.reflectedURLAttr._set"); 213 TestObj* imp = V8TestObj::toNative(info.Holder()); 214 V8Parameter<WithNullCheck> v = value; 215 imp->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, v); 216 return; 217 } 218 219 static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 220 { 221 INC_STATS("DOM.TestObj.reflectedStringAttr._get"); 222 TestObj* imp = V8TestObj::toNative(info.Holder()); 223 return v8String(imp->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr)); 224 } 225 226 static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 227 { 228 INC_STATS("DOM.TestObj.reflectedStringAttr._set"); 229 TestObj* imp = V8TestObj::toNative(info.Holder()); 230 V8Parameter<WithNullCheck> v = value; 231 imp->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, v); 232 return; 233 } 234 235 static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 236 { 237 INC_STATS("DOM.TestObj.reflectedCustomIntegralAttr._get"); 238 TestObj* imp = V8TestObj::toNative(info.Holder()); 239 return v8::Integer::New(imp->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr)); 240 } 241 242 static void reflectedCustomIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 243 { 244 INC_STATS("DOM.TestObj.reflectedCustomIntegralAttr._set"); 245 TestObj* imp = V8TestObj::toNative(info.Holder()); 246 int v = toInt32(value); 247 imp->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, v); 248 return; 249 } 250 251 static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 252 { 253 INC_STATS("DOM.TestObj.reflectedCustomBooleanAttr._get"); 254 TestObj* imp = V8TestObj::toNative(info.Holder()); 255 return v8Boolean(imp->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr)); 256 } 257 258 static void reflectedCustomBooleanAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 259 { 260 INC_STATS("DOM.TestObj.reflectedCustomBooleanAttr._set"); 261 TestObj* imp = V8TestObj::toNative(info.Holder()); 262 bool v = value->BooleanValue(); 263 imp->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, v); 264 return; 265 } 266 267 static v8::Handle<v8::Value> reflectedURLAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 268 { 269 INC_STATS("DOM.TestObj.reflectedURLAttr._get"); 270 TestObj* imp = V8TestObj::toNative(info.Holder()); 271 return v8String(imp->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr)); 272 } 273 274 static void reflectedURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 275 { 276 INC_STATS("DOM.TestObj.reflectedURLAttr._set"); 277 TestObj* imp = V8TestObj::toNative(info.Holder()); 278 V8Parameter<WithNullCheck> v = value; 279 imp->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, v); 280 return; 281 } 282 283 static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 284 { 285 INC_STATS("DOM.TestObj.attrWithGetterException._get"); 173 286 TestObj* imp = V8TestObj::toNative(info.Holder()); 174 287 ExceptionCode ec = 0; 175 int v = imp->attrWith SetterException(ec);288 int v = imp->attrWithGetterException(ec); 176 289 if (UNLIKELY(ec)) { 177 290 V8Proxy::setDOMException(ec); … … 179 292 } 180 293 return v8::Integer::New(v); 294 } 295 296 static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 297 { 298 INC_STATS("DOM.TestObj.attrWithGetterException._set"); 299 TestObj* imp = V8TestObj::toNative(info.Holder()); 300 int v = toInt32(value); 301 ExceptionCode ec = 0; 302 imp->setAttrWithGetterException(v, ec); 303 if (UNLIKELY(ec)) 304 V8Proxy::setDOMException(ec); 305 return; 306 } 307 308 static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 309 { 310 INC_STATS("DOM.TestObj.attrWithSetterException._get"); 311 TestObj* imp = V8TestObj::toNative(info.Holder()); 312 return v8::Integer::New(imp->attrWithSetterException()); 181 313 } 182 314 … … 193 325 } 194 326 195 static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 196 { 197 INC_STATS("DOM.TestObj.attrWithGetterException._get"); 198 TestObj* imp = V8TestObj::toNative(info.Holder()); 199 return v8::Integer::New(imp->attrWithGetterException()); 200 } 201 202 static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 203 { 204 INC_STATS("DOM.TestObj.attrWithGetterException._set"); 205 TestObj* imp = V8TestObj::toNative(info.Holder()); 206 int v = toInt32(value); 327 static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 328 { 329 INC_STATS("DOM.TestObj.stringAttrWithGetterException._get"); 330 TestObj* imp = V8TestObj::toNative(info.Holder()); 207 331 ExceptionCode ec = 0; 208 imp->setAttrWithGetterException(v, ec); 332 String v = imp->stringAttrWithGetterException(ec); 333 if (UNLIKELY(ec)) { 334 V8Proxy::setDOMException(ec); 335 return v8::Handle<v8::Value>(); 336 } 337 return v8String(v); 338 } 339 340 static void stringAttrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 341 { 342 INC_STATS("DOM.TestObj.stringAttrWithGetterException._set"); 343 TestObj* imp = V8TestObj::toNative(info.Holder()); 344 V8Parameter<> v = value; 345 ExceptionCode ec = 0; 346 imp->setStringAttrWithGetterException(v, ec); 347 if (UNLIKELY(ec)) 348 V8Proxy::setDOMException(ec); 349 return; 350 } 351 352 static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 353 { 354 INC_STATS("DOM.TestObj.stringAttrWithSetterException._get"); 355 TestObj* imp = V8TestObj::toNative(info.Holder()); 356 return v8String(imp->stringAttrWithSetterException()); 357 } 358 359 static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 360 { 361 INC_STATS("DOM.TestObj.stringAttrWithSetterException._set"); 362 TestObj* imp = V8TestObj::toNative(info.Holder()); 363 V8Parameter<> v = value; 364 ExceptionCode ec = 0; 365 imp->setStringAttrWithSetterException(v, ec); 209 366 if (UNLIKELY(ec)) 210 367 V8Proxy::setDOMException(ec); … … 716 873 if (args.Length() == 1) 717 874 return overloadedMethod4Callback(args); 718 V8Proxy:: setDOMException(SYNTAX_ERR);875 V8Proxy::throwTypeError(); 719 876 return notHandledByInterceptor(); 720 877 } … … 739 896 // Attribute 'testObjAttr' (Type: 'attribute' ExtAttr: '') 740 897 {"testObjAttr", TestObjInternal::testObjAttrAttrGetter, TestObjInternal::testObjAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 741 // Attribute 'attrWithException' (Type: 'attribute' ExtAttr: '') 742 {"attrWithException", TestObjInternal::attrWithExceptionAttrGetter, TestObjInternal::attrWithExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 898 // Attribute 'reflectedStringAttr' (Type: 'attribute' ExtAttr: 'Reflect') 899 {"reflectedStringAttr", TestObjInternal::reflectedStringAttrAttrGetter, TestObjInternal::reflectedStringAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 900 // Attribute 'reflectedIntegralAttr' (Type: 'attribute' ExtAttr: 'Reflect') 901 {"reflectedIntegralAttr", TestObjInternal::reflectedIntegralAttrAttrGetter, TestObjInternal::reflectedIntegralAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 902 // Attribute 'reflectedBooleanAttr' (Type: 'attribute' ExtAttr: 'Reflect') 903 {"reflectedBooleanAttr", TestObjInternal::reflectedBooleanAttrAttrGetter, TestObjInternal::reflectedBooleanAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 904 // Attribute 'reflectedURLAttr' (Type: 'attribute' ExtAttr: 'ReflectURL') 905 {"reflectedURLAttr", TestObjInternal::reflectedURLAttrAttrGetter, TestObjInternal::reflectedURLAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 906 // Attribute 'reflectedStringAttr' (Type: 'attribute' ExtAttr: 'Reflect') 907 {"reflectedStringAttr", TestObjInternal::reflectedStringAttrAttrGetter, TestObjInternal::reflectedStringAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 908 // Attribute 'reflectedCustomIntegralAttr' (Type: 'attribute' ExtAttr: 'Reflect') 909 {"reflectedCustomIntegralAttr", TestObjInternal::reflectedCustomIntegralAttrAttrGetter, TestObjInternal::reflectedCustomIntegralAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 910 // Attribute 'reflectedCustomBooleanAttr' (Type: 'attribute' ExtAttr: 'Reflect') 911 {"reflectedCustomBooleanAttr", TestObjInternal::reflectedCustomBooleanAttrAttrGetter, TestObjInternal::reflectedCustomBooleanAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 912 // Attribute 'reflectedURLAttr' (Type: 'attribute' ExtAttr: 'ReflectURL') 913 {"reflectedURLAttr", TestObjInternal::reflectedURLAttrAttrGetter, TestObjInternal::reflectedURLAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 914 // Attribute 'attrWithGetterException' (Type: 'attribute' ExtAttr: '') 915 {"attrWithGetterException", TestObjInternal::attrWithGetterExceptionAttrGetter, TestObjInternal::attrWithGetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 743 916 // Attribute 'attrWithSetterException' (Type: 'attribute' ExtAttr: '') 744 917 {"attrWithSetterException", TestObjInternal::attrWithSetterExceptionAttrGetter, TestObjInternal::attrWithSetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 745 // Attribute 'attrWithGetterException' (Type: 'attribute' ExtAttr: '') 746 {"attrWithGetterException", TestObjInternal::attrWithGetterExceptionAttrGetter, TestObjInternal::attrWithGetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 918 // Attribute 'stringAttrWithGetterException' (Type: 'attribute' ExtAttr: '') 919 {"stringAttrWithGetterException", TestObjInternal::stringAttrWithGetterExceptionAttrGetter, TestObjInternal::stringAttrWithGetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 920 // Attribute 'stringAttrWithSetterException' (Type: 'attribute' ExtAttr: '') 921 {"stringAttrWithSetterException", TestObjInternal::stringAttrWithSetterExceptionAttrGetter, TestObjInternal::stringAttrWithSetterExceptionAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 747 922 // Attribute 'customAttr' (Type: 'attribute' ExtAttr: 'Custom') 748 923 {"customAttr", V8TestObj::customAttrAccessorGetter, V8TestObj::customAttrAccessorSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, -
trunk/WebCore/dom/Element.cpp
r61384 r61413 5 5 * (C) 2001 Dirk Mueller (mueller@kde.org) 6 6 * (C) 2007 David Smith (catfish.man@gmail.com) 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 8 8 * (C) 2007 Eric Seidel (eric@webkit.org) 9 9 * … … 1532 1532 } 1533 1533 1534 int Element::getIntegralAttribute(const QualifiedName& attributeName) const 1535 { 1536 return getAttribute(attributeName).string().toInt(); 1537 } 1538 1539 void Element::setIntegralAttribute(const QualifiedName& attributeName, int value) 1540 { 1541 // FIXME: Need an AtomicString version of String::number. 1542 ExceptionCode ec; 1543 setAttribute(attributeName, String::number(value), ec); 1544 } 1545 1546 unsigned Element::getUnsignedIntegralAttribute(const QualifiedName& attributeName) const 1547 { 1548 return getAttribute(attributeName).string().toUInt(); 1549 } 1550 1551 void Element::setUnsignedIntegralAttribute(const QualifiedName& attributeName, unsigned value) 1552 { 1553 // FIXME: Need an AtomicString version of String::number. 1554 ExceptionCode ec; 1555 setAttribute(attributeName, String::number(value), ec); 1556 } 1557 1534 1558 } // namespace WebCore -
trunk/WebCore/dom/Element.h
r61384 r61413 102 102 void removeAttribute(const QualifiedName&, ExceptionCode&); 103 103 104 // Typed getters and setters for language bindings. 105 int getIntegralAttribute(const QualifiedName& attributeName) const; 106 void setIntegralAttribute(const QualifiedName& attributeName, int value); 107 unsigned getUnsignedIntegralAttribute(const QualifiedName& attributeName) const; 108 void setUnsignedIntegralAttribute(const QualifiedName& attributeName, unsigned value); 109 104 110 // Call this to get the value of an attribute that is known not to be the style 105 111 // attribute or one of the SVG animatable attributes. -
trunk/WebCore/html/HTMLAnchorElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLAnchorElement : HTMLElement { 24 attribute [ ConvertNullToNullString, Reflect=accesskey] DOMString accessKey;25 attribute [ ConvertNullToNullString,Reflect] DOMString charset;26 attribute [ ConvertNullToNullString,Reflect] DOMString coords;27 attribute [ ConvertNullToNullString,ReflectURL] DOMString href;28 attribute [ ConvertNullToNullString,Reflect] DOMString hreflang;29 attribute [ ConvertNullToNullString,Reflect] DOMString name;30 attribute [ ConvertNullToNullString,Reflect] DOMString rel;31 attribute [ ConvertNullToNullString,Reflect] DOMString rev;32 attribute [ ConvertNullToNullString,Reflect] DOMString shape;33 attribute [ ConvertNullToNullString,Reflect] DOMString target;34 attribute [ ConvertNullToNullString,Reflect] DOMString type;24 attribute [Reflect] DOMString accessKey; 25 attribute [Reflect] DOMString charset; 26 attribute [Reflect] DOMString coords; 27 attribute [ReflectURL] DOMString href; 28 attribute [Reflect] DOMString hreflang; 29 attribute [Reflect] DOMString name; 30 attribute [Reflect] DOMString rel; 31 attribute [Reflect] DOMString rev; 32 attribute [Reflect] DOMString shape; 33 attribute [Reflect] DOMString target; 34 attribute [Reflect] DOMString type; 35 35 36 36 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C -
trunk/WebCore/html/HTMLAppletElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 26 26 CustomCall 27 27 ] HTMLAppletElement : HTMLElement { 28 attribute [ConvertNullToNullString,Reflect] DOMString align;29 attribute [ConvertNullToNullString,Reflect] DOMString alt;30 attribute [ConvertNullToNullString,Reflect] DOMString archive;31 attribute [ConvertNullToNullString,Reflect] DOMString code;32 attribute [ConvertNullToNullString, Reflect=codebase] DOMString codeBase;33 attribute [ConvertNullToNullString,Reflect] DOMString height;28 attribute [Reflect] DOMString align; 29 attribute [Reflect] DOMString alt; 30 attribute [Reflect] DOMString archive; 31 attribute [Reflect] DOMString code; 32 attribute [Reflect] DOMString codeBase; 33 attribute [Reflect] DOMString height; 34 34 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 35 attribute [ConvertNullToNullString,Reflect] DOMString hspace;35 attribute [Reflect] DOMString hspace; 36 36 #else 37 attribute [ConvertFromString] long hspace;37 attribute [Reflect] long hspace; 38 38 #endif 39 attribute [ConvertNullToNullString,Reflect] DOMString name;40 attribute [ConvertNullToNullString,Reflect] DOMString object;39 attribute [Reflect] DOMString name; 40 attribute [Reflect] DOMString object; 41 41 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 42 attribute [ConvertNullToNullString,Reflect] DOMString vspace;42 attribute [Reflect] DOMString vspace; 43 43 #else 44 attribute [ConvertFromString] long vspace;44 attribute [Reflect] long vspace; 45 45 #endif 46 attribute [ConvertNullToNullString,Reflect] DOMString width;46 attribute [Reflect] DOMString width; 47 47 }; 48 48 -
trunk/WebCore/html/HTMLAreaElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLAreaElement : HTMLElement { 24 attribute [ ConvertNullToNullString, Reflect=accesskey] DOMString accessKey;25 attribute [ ConvertNullToNullString,Reflect] DOMString alt;26 attribute [ ConvertNullToNullString,Reflect] DOMString coords;27 attribute [ ConvertNullToNullString,ReflectURL] DOMString href;28 attribute boolean noHref;29 attribute [ ConvertNullToNullString,Reflect] DOMString shape;30 attribute [ ConvertNullToNullString,Reflect] DOMString target;24 attribute [Reflect] DOMString accessKey; 25 attribute [Reflect] DOMString alt; 26 attribute [Reflect] DOMString coords; 27 attribute [ReflectURL] DOMString href; 28 attribute [Reflect] boolean noHref; 29 attribute [Reflect] DOMString shape; 30 attribute [Reflect] DOMString target; 31 31 32 32 // IE Extensions -
trunk/WebCore/html/HTMLBRElement.idl
r61384 r61413 21 21 22 22 interface HTMLBRElement : HTMLElement { 23 attribute [ ConvertNullToNullString,Reflect] DOMString clear;23 attribute [Reflect] DOMString clear; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLBaseElement.idl
r61384 r61413 21 21 22 22 interface HTMLBaseElement : HTMLElement { 23 attribute [ ConvertNullToNullString,Reflect] DOMString href;24 attribute [ ConvertNullToNullString,Reflect] DOMString target;23 attribute [Reflect] DOMString href; 24 attribute [Reflect] DOMString target; 25 25 }; 26 26 -
trunk/WebCore/html/HTMLBaseFontElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLBaseFontElement : HTMLElement { 23 attribute [ ConvertNullToNullString,Reflect] DOMString color;24 attribute [ ConvertNullToNullString,Reflect] DOMString face;23 attribute [Reflect] DOMString color; 24 attribute [Reflect] DOMString face; 25 25 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C 26 26 attribute [ConvertToString] DOMString size; // this changed to a long, but our existing API is a string 27 27 #else 28 attribute long size;28 attribute [Reflect] long size; 29 29 #endif 30 30 }; -
trunk/WebCore/html/HTMLBlockquoteElement.idl
r61384 r61413 21 21 22 22 interface HTMLBlockquoteElement : HTMLElement { 23 attribute [ ConvertNullToNullString,Reflect] DOMString cite;23 attribute [Reflect] DOMString cite; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLBodyElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLBodyElement : HTMLElement { 24 attribute [ ConvertNullToNullString, Reflect=alink] DOMString aLink;25 attribute [ ConvertNullToNullString,Reflect] DOMString background;26 attribute [ ConvertNullToNullString, Reflect=bgcolor] DOMString bgColor;27 attribute [ ConvertNullToNullString,Reflect] DOMString link;28 attribute [ ConvertNullToNullString,Reflect] DOMString text;29 attribute [ ConvertNullToNullString, Reflect=vlink] DOMString vLink;24 attribute [Reflect] DOMString aLink; 25 attribute [Reflect] DOMString background; 26 attribute [Reflect] DOMString bgColor; 27 attribute [Reflect] DOMString link; 28 attribute [Reflect] DOMString text; 29 attribute [Reflect] DOMString vLink; 30 30 31 31 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C -
trunk/WebCore/html/HTMLButtonElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLButtonElement : HTMLElement { 24 readonly attribute HTMLFormElement form; 25 attribute boolean formNoValidate; 26 readonly attribute ValidityState validity; 27 attribute [ConvertNullToNullString] DOMString accessKey; 28 attribute boolean disabled; 29 attribute boolean autofocus; 30 attribute [ConvertNullToNullString] DOMString name; 31 readonly attribute DOMString type; 32 attribute [ConvertNullToNullString] DOMString value; 33 readonly attribute boolean willValidate; 34 readonly attribute DOMString validationMessage; 35 boolean checkValidity(); 24 readonly attribute HTMLFormElement form; 25 26 attribute [Reflect] boolean formNoValidate; 27 readonly attribute ValidityState validity; 28 29 attribute [Reflect] DOMString accessKey; 30 attribute [Reflect] boolean disabled; 31 attribute [Reflect] boolean autofocus; 32 attribute [Reflect] DOMString name; 33 readonly attribute DOMString type; 34 attribute [Reflect] DOMString value; 35 36 readonly attribute boolean willValidate; 37 readonly attribute DOMString validationMessage; 38 boolean checkValidity(); 36 39 void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error); 40 37 41 void click(); 38 readonly attribute NodeList labels; 42 43 readonly attribute NodeList labels; 39 44 }; 40 45 -
trunk/WebCore/html/HTMLDListElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLDListElement : HTMLElement { 23 attribute boolean compact;23 attribute [Reflect] boolean compact; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLDirectoryElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLDirectoryElement : HTMLElement { 23 attribute boolean compact;23 attribute [Reflect] boolean compact; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLDivElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLDivElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString align;23 attribute [Reflect] DOMString align; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLElement.idl
r61384 r61413 27 27 // iht.com relies on id returning the empty string when no id is present. 28 28 // Other browsers do this as well. So we don't convert null to JS null. 29 attribute [ ConvertNullToNullString,Reflect] DOMString id;30 attribute [ ConvertNullToNullString,Reflect] DOMString title;31 attribute [ ConvertNullToNullString,Reflect] DOMString lang;32 attribute [ ConvertNullToNullString,Reflect] DOMString dir;33 attribute [ ConvertNullToNullString,Reflect=class] DOMString className;29 attribute [Reflect] DOMString id; 30 attribute [Reflect] DOMString title; 31 attribute [Reflect] DOMString lang; 32 attribute [Reflect] DOMString dir; 33 attribute [Reflect=class] DOMString className; 34 34 35 35 attribute long tabIndex; -
trunk/WebCore/html/HTMLEmbedElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 26 26 CustomCall 27 27 ] HTMLEmbedElement : HTMLElement { 28 attribute [ConvertNullToNullString,Reflect] DOMString align;28 attribute [Reflect] DOMString align; 29 29 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 30 attribute [ConvertNullToNullString,Reflect] DOMString height;30 attribute [Reflect] DOMString height; 31 31 #else 32 attribute [ConvertFromString] long height;32 attribute [Reflect] long height; 33 33 #endif 34 attribute [ConvertNullToNullString,Reflect] DOMString name;35 attribute [ConvertNullToNullString,Reflect] DOMString src;36 attribute [ConvertNullToNullString,Reflect] DOMString type;34 attribute [Reflect] DOMString name; 35 attribute [Reflect] DOMString src; 36 attribute [Reflect] DOMString type; 37 37 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 38 attribute [ConvertNullToNullString,Reflect] DOMString width;38 attribute [Reflect] DOMString width; 39 39 #else 40 attribute [ConvertFromString] long width;40 attribute [Reflect] long width; 41 41 #endif 42 42 43 43 #if defined(ENABLE_SVG) && ENABLE_SVG 44 44 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C || defined(ENABLE_SVG_DOM_OBJC_BINDINGS) && ENABLE_SVG_DOM_OBJC_BINDINGS 45 [SVGCheckSecurityDocument] SVGDocument getSVGDocument() 46 raises(DOMException); 45 [SVGCheckSecurityDocument] SVGDocument getSVGDocument() raises(DOMException); 47 46 #endif 48 47 #endif -
trunk/WebCore/html/HTMLFontElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLFontElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString color;24 attribute [ ConvertNullToNullString] DOMString face;25 attribute [ ConvertNullToNullString] DOMString size;23 attribute [Reflect] DOMString color; 24 attribute [Reflect] DOMString face; 25 attribute [Reflect] DOMString size; 26 26 }; 27 27 -
trunk/WebCore/html/HTMLFormElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 25 25 HasOverridingNameGetter 26 26 ] HTMLFormElement : HTMLElement { 27 readonly attribute HTMLCollection elements; 28 readonly attribute long length; 29 attribute [ConvertNullToNullString] DOMString name; 30 attribute boolean noValidate; 31 attribute [ConvertNullToNullString] DOMString acceptCharset; 32 attribute [ConvertNullToNullString] DOMString action; 33 attribute [ConvertNullToNullString] DOMString encoding; /* Netscape/Firefox legacy attribute. Same as enctype. */ 34 attribute [ConvertNullToNullString] DOMString enctype; 35 attribute [ConvertNullToNullString] DOMString method; 36 attribute [ConvertNullToNullString] DOMString target; 27 readonly attribute HTMLCollection elements; 28 readonly attribute long length; 29 30 attribute [Reflect] DOMString name; 31 attribute [Reflect] boolean noValidate; 32 attribute [Reflect=accept_charset] DOMString acceptCharset; 33 attribute [Reflect] DOMString action; 34 attribute [ConvertNullToNullString] DOMString encoding; /* Netscape/Firefox legacy attribute. Same as enctype. */ 35 attribute [ConvertNullToNullString] DOMString enctype; 36 attribute [Reflect] DOMString method; 37 attribute [Reflect] DOMString target; 37 38 38 39 [CallWith=DynamicFrame] void submit(); 39 40 void reset(); 40 boolean 41 boolean checkValidity(); 41 42 }; 42 43 } -
trunk/WebCore/html/HTMLFrameElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 23 23 interface HTMLFrameElement : HTMLElement { 24 24 25 attribute [ConvertNullToNullString, Reflect=frameborder] DOMStringframeBorder;26 attribute [ConvertNullToNullString, Reflect=longdesc] DOMStringlongDesc;27 attribute [ConvertNullToNullString, Reflect=marginheight] DOMStringmarginHeight;28 attribute [ConvertNullToNullString, Reflect=marginwidth] DOMStringmarginWidth;29 attribute [ConvertNullToNullString, Reflect] DOMStringname;30 attribute booleannoResize;31 attribute [ConvertNullToNullString, Reflect] DOMStringscrolling;32 attribute [ConvertNullToNullString, CustomSetter, ReflectURL] DOMStringsrc;25 attribute [Reflect] DOMString frameBorder; 26 attribute [Reflect] DOMString longDesc; 27 attribute [Reflect] DOMString marginHeight; 28 attribute [Reflect] DOMString marginWidth; 29 attribute [Reflect] DOMString name; 30 attribute [Reflect] boolean noResize; 31 attribute [Reflect] DOMString scrolling; 32 attribute [ReflectURL, CustomSetter] DOMString src; 33 33 34 34 // Introduced in DOM Level 2: 35 readonly attribute [CheckFrameSecurity] Document 35 readonly attribute [CheckFrameSecurity] Document contentDocument; 36 36 37 37 // Extensions … … 45 45 #endif 46 46 47 attribute [ConvertNullToNullString, CustomSetter] DOMString location; 48 readonly attribute long width; 49 readonly attribute long height; 47 attribute [ConvertNullToNullString, CustomSetter] DOMString location; 48 49 readonly attribute long width; 50 readonly attribute long height; 50 51 51 52 }; -
trunk/WebCore/html/HTMLFrameSetElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserve2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserve 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 24 24 HasOverridingNameGetter 25 25 ] HTMLFrameSetElement : HTMLElement { 26 attribute [ ConvertNullToNullString] DOMString cols;27 attribute [ ConvertNullToNullString] DOMString rows;26 attribute [Reflect] DOMString cols; 27 attribute [Reflect] DOMString rows; 28 28 29 29 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C -
trunk/WebCore/html/HTMLHRElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLHRElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString align;24 attribute boolean noShade;25 attribute [ ConvertNullToNullString] DOMString size;26 attribute [ ConvertNullToNullString] DOMString width;23 attribute [Reflect] DOMString align; 24 attribute [Reflect] boolean noShade; 25 attribute [Reflect] DOMString size; 26 attribute [Reflect] DOMString width; 27 27 }; 28 28 -
trunk/WebCore/html/HTMLHeadElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLHeadElement : HTMLElement { 23 attribute [ConvertNullToNullString] DOMStringprofile;23 attribute [Reflect] DOMString profile; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLHeadingElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLHeadingElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString align;23 attribute [Reflect] DOMString align; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLHtmlElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLHtmlElement : HTMLElement { 23 24 attribute [ConvertNullToNullString] DOMString version; 25 23 attribute [Reflect] DOMString version; 26 24 }; 27 25 -
trunk/WebCore/html/HTMLIFrameElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLIFrameElement : HTMLElement { 24 25 attribute [ConvertNullToNullString, Reflect] DOMString align; 26 attribute [ConvertNullToNullString, Reflect=frameborder] DOMString frameBorder; 27 attribute [ConvertNullToNullString, Reflect] DOMString height; 28 attribute [ConvertNullToNullString, Reflect=longdesc] DOMString longDesc; 29 attribute [ConvertNullToNullString, Reflect=marginheight] DOMString marginHeight; 30 attribute [ConvertNullToNullString, Reflect=marginwidth] DOMString marginWidth; 31 attribute [ConvertNullToNullString, Reflect] DOMString name; 32 attribute [ConvertNullToNullString, Reflect] DOMString sandbox; 33 attribute [ConvertNullToNullString, Reflect] DOMString scrolling; 34 attribute [ConvertNullToNullString, CustomSetter, Reflect] DOMString src; 35 attribute [ConvertNullToNullString, Reflect] DOMString width; 24 attribute [Reflect] DOMString align; 25 attribute [Reflect] DOMString frameBorder; 26 attribute [Reflect] DOMString height; 27 attribute [Reflect] DOMString longDesc; 28 attribute [Reflect] DOMString marginHeight; 29 attribute [Reflect] DOMString marginWidth; 30 attribute [Reflect] DOMString name; 31 attribute [Reflect] DOMString sandbox; 32 attribute [Reflect] DOMString scrolling; 33 attribute [CustomSetter, Reflect] DOMString src; 34 attribute [Reflect] DOMString width; 36 35 37 36 // Introduced in DOM Level 2: 38 readonly attribute [CheckFrameSecurity] Document 37 readonly attribute [CheckFrameSecurity] Document contentDocument; 39 38 40 39 // Extensions … … 47 46 #endif 48 47 #endif 49 50 48 }; 51 49 -
trunk/WebCore/html/HTMLImageElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 24 24 GenerateNativeConverter 25 25 ] HTMLImageElement : HTMLElement { 26 attribute [ConvertNullToNullString,Reflect] DOMString name;27 attribute [ConvertNullToNullString,Reflect] DOMString align;28 attribute [ConvertNullToNullString,Reflect] DOMString alt;29 attribute [ConvertNullToNullString,Reflect] DOMString border;30 31 attributelong hspace;32 attributeboolean isMap;33 attribute [ConvertNullToNullString,ReflectURL=longdesc] DOMString longDesc;34 attribute [ConvertNullToNullString,ReflectURL] DOMString src;35 attribute [ConvertNullToNullString, Reflect=usemap] DOMString useMap;36 attributelong vspace;37 26 attribute [Reflect] DOMString name; 27 attribute [Reflect] DOMString align; 28 attribute [Reflect] DOMString alt; 29 attribute [Reflect] DOMString border; 30 attribute long height; 31 attribute [Reflect] long hspace; 32 attribute [Reflect] boolean isMap; 33 attribute [ReflectURL=longdesc] DOMString longDesc; 34 attribute [ReflectURL] DOMString src; 35 attribute [Reflect] DOMString useMap; 36 attribute [Reflect] long vspace; 37 attribute long width; 38 38 39 39 // Extensions 40 40 readonly attribute boolean complete; 41 attribute [ConvertNullToNullString,ReflectURL] DOMString lowsrc;41 attribute [ReflectURL] DOMString lowsrc; 42 42 readonly attribute long naturalHeight; 43 43 readonly attribute long naturalWidth; -
trunk/WebCore/html/HTMLInputElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLInputElement : HTMLElement { 24 25 attribute booleandefaultChecked;24 attribute [ConvertNullToNullString] DOMString defaultValue; 25 attribute [Reflect=checked] boolean defaultChecked; 26 26 readonly attribute HTMLFormElement form; 27 attribute booleanformNoValidate;28 readonly attribute ValidityState 29 attribute [ConvertNullToNullString] DOMString accept;30 attribute [ConvertNullToNullString] DOMString accessKey;31 attribute [ConvertNullToNullString] DOMString align;32 attribute [ConvertNullToNullString] DOMString alt;33 attribute booleanchecked;34 attribute booleandisabled;35 attribute booleanautofocus;27 attribute [Reflect] boolean formNoValidate; 28 readonly attribute ValidityState validity; 29 attribute [Reflect] DOMString accept; 30 attribute [Reflect] DOMString accessKey; 31 attribute [Reflect] DOMString align; 32 attribute [Reflect] DOMString alt; 33 attribute boolean checked; 34 attribute [Reflect] boolean disabled; 35 attribute [Reflect] boolean autofocus; 36 36 #if defined(ENABLE_DATALIST) && ENABLE_DATALIST 37 37 readonly attribute HTMLElement list; 38 38 #endif 39 attribute [ConvertNullToNullString, Reflect] DOMString max; 40 attribute long maxLength 41 setter raises(DOMException); 42 attribute [ConvertNullToNullString, Reflect] DOMString min; 43 attribute boolean multiple; 44 attribute [ConvertNullToNullString] DOMString name; 45 attribute [ConvertNullToNullString, Reflect] DOMString pattern; 46 attribute DOMString placeholder; 47 attribute boolean readOnly; 48 attribute boolean required; 39 attribute [Reflect] DOMString max; 40 attribute long maxLength setter raises(DOMException); 41 attribute [Reflect] DOMString min; 42 attribute [Reflect] boolean multiple; 43 attribute [Reflect] DOMString name; 44 attribute [Reflect] DOMString pattern; 45 attribute [Reflect] DOMString placeholder; 46 attribute [Reflect] boolean readOnly; 47 attribute [Reflect] boolean required; 49 48 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C 50 49 attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string 51 50 #else 52 // FIXME: the spec says this should be a long, not an unsigned long53 attribute unsigned longsize; // Changed string -> long as part of DOM level 251 // FIXME: The spec says this should be a long, not an unsigned long. 52 attribute unsigned long size; // Changed string -> long as part of DOM level 2 54 53 #endif 55 attribute [ConvertNullToNullString] DOMString src;56 attribute [ConvertNullToNullString,Reflect] DOMString step;57 58 attribute [ConvertNullToNullString] DOMString useMap;59 54 attribute [ReflectURL] DOMString src; 55 attribute [Reflect] DOMString step; 56 attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2 57 attribute [Reflect] DOMString useMap; 58 attribute [ConvertNullToNullString] DOMString value; 60 59 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP 61 attribute DatevalueAsDate setter raises(DOMException);60 attribute Date valueAsDate setter raises(DOMException); 62 61 #endif 63 attribute doublevalueAsNumber setter raises(DOMException);62 attribute double valueAsNumber setter raises(DOMException); 64 63 #if defined(ENABLE_DATALIST) && ENABLE_DATALIST 65 64 readonly attribute HTMLOptionElement selectedOption; 66 65 #endif 67 66 68 void stepUp(in [Optional] long n) 69 raises(DOMException); 70 void stepDown(in [Optional] long n) 71 raises(DOMException); 67 void stepUp(in [Optional] long n) raises(DOMException); 68 void stepDown(in [Optional] long n) raises(DOMException); 72 69 73 readonly attribute boolean 74 readonly attribute DOMString 75 boolean 76 void 77 void 78 void 70 readonly attribute boolean willValidate; 71 readonly attribute DOMString validationMessage; 72 boolean checkValidity(); 73 void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error); 74 void select(); 75 void click(); 79 76 80 77 #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT 81 void 78 void setValueForUser(in [ConvertNullToNullString] DOMString value); 82 79 #endif 83 80 84 81 // WinIE extension: 85 attribute booleanindeterminate;82 attribute boolean indeterminate; 86 83 87 84 // WinIE & FireFox extension: 88 85 89 90 86 attribute [Custom] long selectionStart; 87 attribute [Custom] long selectionEnd; 91 88 [Custom] void setSelectionRange(in long start, in long end); 92 89 93 90 #if defined(LANGUAGE_OBJECTIVE_C) 94 91 // Objective-C extension: 95 readonly attribute DOMString 96 readonly attribute URL 92 readonly attribute DOMString altDisplayString; 93 readonly attribute URL absoluteImageURL; 97 94 #endif 98 95 99 96 readonly attribute FileList files; 100 readonly attribute NodeListlabels;97 readonly attribute NodeList labels; 101 98 }; 102 99 -
trunk/WebCore/html/HTMLIsIndexElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 22 22 interface HTMLIsIndexElement : HTMLInputElement { 23 23 readonly attribute HTMLFormElement form; 24 attribute [ ConvertNullToNullString] DOMString prompt;24 attribute [Reflect] DOMString prompt; 25 25 }; 26 26 -
trunk/WebCore/html/HTMLLIElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLLIElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString type;24 attribute long value;23 attribute [Reflect] DOMString type; 24 attribute [Reflect] long value; 25 25 }; 26 26 -
trunk/WebCore/html/HTMLLabelElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 23 23 interface HTMLLabelElement : HTMLElement { 24 24 readonly attribute HTMLFormElement form; 25 attribute [ ConvertNullToNullString] DOMString accessKey;26 attribute [ ConvertNullToNullString] DOMString htmlFor;25 attribute [Reflect] DOMString accessKey; 26 attribute [Reflect=for] DOMString htmlFor; 27 27 readonly attribute HTMLElement control; 28 28 }; -
trunk/WebCore/html/HTMLLegendElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 23 23 interface HTMLLegendElement : HTMLElement { 24 24 readonly attribute HTMLFormElement form; 25 attribute [ ConvertNullToNullString] DOMString accessKey;26 attribute [ ConvertNullToNullString] DOMString align;25 attribute [Reflect] DOMString accessKey; 26 attribute [Reflect] DOMString align; 27 27 }; 28 28 -
trunk/WebCore/html/HTMLLinkElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLLinkElement : HTMLElement { 24 attribute booleandisabled;25 attribute [ConvertNullToNullString] DOMStringcharset;26 attribute [ConvertNullToNullString] DOMStringhref;27 attribute [ConvertNullToNullString] DOMStringhreflang;28 attribute [ConvertNullToNullString] DOMStringmedia;29 attribute [ConvertNullToNullString] DOMStringrel;30 attribute [ConvertNullToNullString] DOMStringrev;31 attribute [ConvertNullToNullString] DOMStringtarget;32 attribute [ConvertNullToNullString] DOMStringtype;24 attribute [Reflect] boolean disabled; 25 attribute [Reflect] DOMString charset; 26 attribute [ReflectURL] DOMString href; 27 attribute [Reflect] DOMString hreflang; 28 attribute [Reflect] DOMString media; 29 attribute [Reflect] DOMString rel; 30 attribute [Reflect] DOMString rev; 31 attribute [Reflect] DOMString target; 32 attribute [Reflect] DOMString type; 33 33 34 34 // DOM Level 2 Style 35 readonly attribute StyleSheet 35 readonly attribute StyleSheet sheet; 36 36 37 37 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C -
trunk/WebCore/html/HTMLMapElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 23 23 interface HTMLMapElement : HTMLElement { 24 24 readonly attribute HTMLCollection areas; 25 attribute [ ConvertNullToNullString] DOMString name;25 attribute [Reflect] DOMString name; 26 26 }; 27 27 -
trunk/WebCore/html/HTMLMediaElement.cpp
r60657 r61413 2075 2075 } 2076 2076 2077 bool HTMLMediaElement::isURLAttribute(Attribute* attribute) const 2078 { 2079 return attribute->name() == srcAttr; 2080 } 2081 2077 2082 } 2078 2083 -
trunk/WebCore/html/HTMLMediaElement.h
r59773 r61413 175 175 176 176 virtual void parseMappedAttribute(Attribute*); 177 virtual bool isURLAttribute(Attribute*) const; 177 178 virtual void attach(); 178 179 -
trunk/WebCore/html/HTMLMediaElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2007 Apple Inc.All rights reserved.2 * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 32 32 // network state 33 attribute DOMString src;33 attribute [ReflectURL] DOMString src; 34 34 readonly attribute DOMString currentSrc; 35 35 … … 67 67 readonly attribute TimeRanges seekable; 68 68 readonly attribute boolean ended; 69 attribute boolean autoplay;70 attribute boolean loop;69 attribute [Reflect] boolean autoplay; 70 attribute [Reflect] boolean loop; 71 71 [NeedsUserGestureCheck] void play(); 72 72 [NeedsUserGestureCheck] void pause(); -
trunk/WebCore/html/HTMLMenuElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLMenuElement : HTMLElement { 23 attribute boolean compact;23 attribute [Reflect] boolean compact; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLMetaElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLMetaElement : HTMLElement { 23 attribute [ConvertNullToNullString] DOMStringcontent;24 attribute [ConvertNullToNullString] DOMStringhttpEquiv;25 attribute [ConvertNullToNullString] DOMStringname;26 attribute [ConvertNullToNullString] DOMStringscheme;23 attribute [Reflect] DOMString content; 24 attribute [Reflect=http_equiv] DOMString httpEquiv; 25 attribute [Reflect] DOMString name; 26 attribute [Reflect] DOMString scheme; 27 27 }; 28 28 -
trunk/WebCore/html/HTMLModElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLModElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString cite;24 attribute [ ConvertNullToNullString] DOMString dateTime;23 attribute [Reflect] DOMString cite; 24 attribute [Reflect] DOMString dateTime; 25 25 }; 26 26 -
trunk/WebCore/html/HTMLOListElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLOListElement : HTMLElement { 23 attribute boolean compact;23 attribute [Reflect] boolean compact; 24 24 attribute long start; 25 attribute [ ConvertNullToNullString] DOMString type;25 attribute [Reflect] DOMString type; 26 26 }; 27 27 -
trunk/WebCore/html/HTMLObjectElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 27 27 ] HTMLObjectElement : HTMLElement { 28 28 readonly attribute HTMLFormElement form; 29 attribute [ConvertNullToNullString, Reflect] DOMStringcode;30 attribute [ConvertNullToNullString, Reflect] DOMStringalign;31 attribute [ConvertNullToNullString, Reflect] DOMStringarchive;32 attribute [ConvertNullToNullString, Reflect] DOMStringborder;33 attribute [ConvertNullToNullString, Reflect=codebase] DOMStringcodeBase;34 attribute [ConvertNullToNullString, Reflect=codetype] DOMStringcodeType;35 attribute [ConvertNullToNullString, ReflectURL] DOMStringdata;36 attribute booleandeclare;37 attribute [ConvertNullToNullString, Reflect] DOMStringheight;38 attribute longhspace;39 attribute [ConvertNullToNullString, Reflect] DOMStringname;40 attribute [ConvertNullToNullString, Reflect] DOMStringstandby;41 attribute [ConvertNullToNullString, Reflect] DOMStringtype;42 attribute [ConvertNullToNullString, Reflect=usemap] DOMStringuseMap;43 attribute longvspace;44 attribute [ConvertNullToNullString, Reflect] DOMStringwidth;45 readonly attribute boolean 29 attribute [Reflect] DOMString code; 30 attribute [Reflect] DOMString align; 31 attribute [Reflect] DOMString archive; 32 attribute [Reflect] DOMString border; 33 attribute [Reflect] DOMString codeBase; 34 attribute [Reflect] DOMString codeType; 35 attribute [ReflectURL] DOMString data; 36 attribute [Reflect] boolean declare; 37 attribute [Reflect] DOMString height; 38 attribute [Reflect] long hspace; 39 attribute [Reflect] DOMString name; 40 attribute [Reflect] DOMString standby; 41 attribute [Reflect] DOMString type; 42 attribute [Reflect] DOMString useMap; 43 attribute [Reflect] long vspace; 44 attribute [Reflect] DOMString width; 45 readonly attribute boolean willValidate; 46 46 47 47 // Introduced in DOM Level 2: 48 readonly attribute [CheckFrameSecurity] Document 48 readonly attribute [CheckFrameSecurity] Document contentDocument; 49 49 50 50 #if defined(ENABLE_SVG) && ENABLE_SVG 51 51 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C || defined(ENABLE_SVG_DOM_OBJC_BINDINGS) && ENABLE_SVG_DOM_OBJC_BINDINGS 52 [SVGCheckSecurityDocument] SVGDocument getSVGDocument() 53 raises(DOMException); 52 [SVGCheckSecurityDocument] SVGDocument getSVGDocument() raises(DOMException); 54 53 #endif 55 54 #endif … … 57 56 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C 58 57 // Objective-C extension: 59 readonly attribute URL 58 readonly attribute URL absoluteImageURL; 60 59 #endif 61 60 }; -
trunk/WebCore/html/HTMLOptGroupElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLOptGroupElement : HTMLElement { 23 attribute booleandisabled;24 attribute [ConvertNullToNullString] DOMStringlabel;23 attribute [Reflect] boolean disabled; 24 attribute [Reflect] DOMString label; 25 25 }; 26 26 -
trunk/WebCore/html/HTMLOptionElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple, Inc.2 * Copyright (C) 2006, 2007, 2010 Apple, Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 24 24 GenerateNativeConverter 25 25 ] HTMLOptionElement : HTMLElement { 26 readonly attribute HTMLFormElementform;27 attribute booleandefaultSelected;26 readonly attribute HTMLFormElement form; 27 attribute [Reflect=selected] boolean defaultSelected; 28 28 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 29 attribute [ConvertNullToNullString] DOMString text 30 setter raises(DOMException); 29 attribute [ConvertNullToNullString] DOMString text setter raises(DOMException); 31 30 #else 32 readonly attribute DOMStringtext;31 readonly attribute DOMString text; 33 32 #endif 34 readonly attribute longindex;35 attribute booleandisabled;36 attribute [ConvertNullToNullString] DOMStringlabel;37 attribute booleanselected;38 attribute [ConvertNullToNullString] DOMStringvalue;33 readonly attribute long index; 34 attribute [Reflect] boolean disabled; 35 attribute [Reflect] DOMString label; 36 attribute boolean selected; 37 attribute [ConvertNullToNullString] DOMString value; 39 38 }; 40 39 -
trunk/WebCore/html/HTMLParagraphElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLParagraphElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString align;23 attribute [Reflect] DOMString align; 24 24 }; 25 25 -
trunk/WebCore/html/HTMLParamElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLParamElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString name;24 attribute [ ConvertNullToNullString] DOMString type;25 attribute [ ConvertNullToNullString] DOMString value;26 attribute [ ConvertNullToNullString] DOMString valueType;23 attribute [Reflect] DOMString name; 24 attribute [Reflect] DOMString type; 25 attribute [Reflect] DOMString value; 26 attribute [Reflect] DOMString valueType; 27 27 }; 28 28 -
trunk/WebCore/html/HTMLPreElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All right reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 24 24 // FIXME: DOM spec says that width should be of type DOMString 25 25 // see http://bugs.webkit.org/show_bug.cgi?id=8992 26 attribute long width;26 attribute [Reflect] long width; 27 27 28 28 // Extensions 29 attribute boolean wrap;29 attribute [Reflect] boolean wrap; 30 30 }; 31 31 -
trunk/WebCore/html/HTMLQuoteElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 21 21 22 22 interface HTMLQuoteElement : HTMLElement { 23 attribute [ ConvertNullToNullString] DOMString cite;23 attribute [Reflect] DOMString cite; 24 24 }; 25 25 } -
trunk/WebCore/html/HTMLScriptElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 22 22 interface HTMLScriptElement : HTMLElement { 23 23 attribute [ConvertNullToNullString] DOMString text; 24 attribute [ ConvertNullToNullString] DOMString htmlFor;25 attribute [ ConvertNullToNullString] DOMString event;26 attribute [ ConvertNullToNullString] DOMString charset;27 attribute boolean defer;28 attribute [ ConvertNullToNullString] DOMString src;29 attribute [ ConvertNullToNullString] DOMString type;24 attribute [Reflect=for] DOMString htmlFor; 25 attribute [Reflect] DOMString event; 26 attribute [Reflect] DOMString charset; 27 attribute [Reflect] boolean defer; 28 attribute [ReflectURL] DOMString src; 29 attribute [Reflect] DOMString type; 30 30 }; 31 31 } -
trunk/WebCore/html/HTMLStyleElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLStyleElement : HTMLElement { 24 attribute booleandisabled;25 attribute [ConvertNullToNullString] DOMStringmedia;26 attribute [ConvertNullToNullString] DOMStringtype;24 attribute boolean disabled; 25 attribute [Reflect] DOMString media; 26 attribute [Reflect] DOMString type; 27 27 28 28 // DOM Level 2 Style -
trunk/WebCore/html/HTMLTableCaptionElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 24 24 GenerateNativeConverter 25 25 ] HTMLTableCaptionElement : HTMLElement { 26 27 attribute [ConvertNullToNullString] DOMString align; 28 26 attribute [Reflect] DOMString align; 29 27 }; 30 28 -
trunk/WebCore/html/HTMLTableCellElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLTableCellElement : HTMLElement { 24 25 readonly attribute long cellIndex; 26 attribute [ConvertNullToNullString] DOMString abbr; 27 attribute [ConvertNullToNullString] DOMString align; 28 attribute [ConvertNullToNullString] DOMString axis; 29 attribute [ConvertNullToNullString] DOMString bgColor; 30 attribute [ConvertNullToNullString] DOMString ch; 31 attribute [ConvertNullToNullString] DOMString chOff; 32 attribute long colSpan; 33 attribute [ConvertNullToNullString] DOMString headers; 34 attribute [ConvertNullToNullString] DOMString height; 35 attribute boolean noWrap; 36 attribute long rowSpan; 37 attribute [ConvertNullToNullString] DOMString scope; 38 attribute [ConvertNullToNullString] DOMString vAlign; 39 attribute [ConvertNullToNullString] DOMString width; 40 24 readonly attribute long cellIndex; 25 attribute [Reflect] DOMString abbr; 26 attribute [Reflect] DOMString align; 27 attribute [Reflect] DOMString axis; 28 attribute [Reflect] DOMString bgColor; 29 attribute [Reflect=char] DOMString ch; 30 attribute [Reflect=charoff] DOMString chOff; 31 attribute long colSpan; 32 attribute [Reflect] DOMString headers; 33 attribute [Reflect] DOMString height; 34 attribute boolean noWrap; 35 attribute long rowSpan; 36 attribute [Reflect] DOMString scope; 37 attribute [Reflect] DOMString vAlign; 38 attribute [Reflect] DOMString width; 41 39 }; 42 40 -
trunk/WebCore/html/HTMLTableColElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLTableColElement : HTMLElement { 24 25 attribute [ConvertNullToNullString] DOMString align; 26 attribute [ConvertNullToNullString] DOMString ch; 27 attribute [ConvertNullToNullString] DOMString chOff; 28 attribute long span; 29 attribute [ConvertNullToNullString] DOMString vAlign; 30 attribute [ConvertNullToNullString] DOMString width; 31 24 attribute [Reflect] DOMString align; 25 attribute [Reflect=char] DOMString ch; 26 attribute [Reflect=charoff] DOMString chOff; 27 attribute long span; 28 attribute [Reflect] DOMString vAlign; 29 attribute [Reflect] DOMString width; 32 30 }; 33 31 -
trunk/WebCore/html/HTMLTableElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLTableElement : HTMLElement { 24 25 // could raise excepetions on setting. 26 attribute HTMLTableCaptionElement caption 27 setter raises(DOMException); 28 attribute HTMLTableSectionElement tHead 29 setter raises(DOMException); 30 attribute HTMLTableSectionElement tFoot 31 setter raises(DOMException); 24 attribute HTMLTableCaptionElement caption setter raises(DOMException); 25 attribute HTMLTableSectionElement tHead setter raises(DOMException); 26 attribute HTMLTableSectionElement tFoot setter raises(DOMException); 32 27 33 28 readonly attribute HTMLCollection rows; 34 29 readonly attribute HTMLCollection tBodies; 35 attribute [ConvertNullToNullString] DOMString align;36 attribute [ConvertNullToNullString] DOMString bgColor;37 attribute [ConvertNullToNullString] DOMString border;38 attribute [ConvertNullToNullString] DOMString cellPadding;39 attribute [ConvertNullToNullString] DOMString cellSpacing;30 attribute [Reflect] DOMString align; 31 attribute [Reflect] DOMString bgColor; 32 attribute [Reflect] DOMString border; 33 attribute [Reflect] DOMString cellPadding; 34 attribute [Reflect] DOMString cellSpacing; 40 35 41 // FIXME: the obj-c attribute is called frameBorders 42 attribute [ConvertNullToNullString] DOMString frame; 36 attribute [Reflect] DOMString frame; 43 37 44 attribute [ConvertNullToNullString] DOMString rules;45 attribute [ConvertNullToNullString] DOMString summary;46 attribute [ConvertNullToNullString] DOMString width;38 attribute [Reflect] DOMString rules; 39 attribute [Reflect] DOMString summary; 40 attribute [Reflect] DOMString width; 47 41 48 HTMLElement 49 void 42 HTMLElement createTHead(); 43 void deleteTHead(); 50 44 HTMLElement createTFoot(); 51 void 52 HTMLElement 53 void 45 void deleteTFoot(); 46 HTMLElement createCaption(); 47 void deleteCaption(); 54 48 55 HTMLElement insertRow(in long index) 56 raises(DOMException); 57 58 void deleteRow(in long index) 59 raises(DOMException); 60 49 HTMLElement insertRow(in long index) raises(DOMException); 50 void deleteRow(in long index) raises(DOMException); 61 51 }; 62 52 -
trunk/WebCore/html/HTMLTableRowElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. ALl rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLTableRowElement : HTMLElement { 24 25 readonly attribute long rowIndex; 26 readonly attribute long sectionRowIndex; 27 readonly attribute HTMLCollection cells; 28 attribute [ConvertNullToNullString] DOMString align; 29 attribute [ConvertNullToNullString] DOMString bgColor; 30 attribute [ConvertNullToNullString] DOMString ch; 31 attribute [ConvertNullToNullString] DOMString chOff; 32 attribute [ConvertNullToNullString] DOMString vAlign; 33 34 HTMLElement insertCell(in long index) 35 raises(DOMException); 36 void deleteCell(in long index) 37 raises(DOMException); 38 24 readonly attribute long rowIndex; 25 readonly attribute long sectionRowIndex; 26 readonly attribute HTMLCollection cells; 27 attribute [Reflect] DOMString align; 28 attribute [Reflect] DOMString bgColor; 29 attribute [Reflect=char] DOMString ch; 30 attribute [Reflect=charoff] DOMString chOff; 31 attribute [Reflect] DOMString vAlign; 32 HTMLElement insertCell(in long index) raises(DOMException); 33 void deleteCell(in long index) raises(DOMException); 39 34 }; 40 35 -
trunk/WebCore/html/HTMLTableSectionElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 24 24 GenerateNativeConverter 25 25 ] HTMLTableSectionElement : HTMLElement { 26 27 attribute [ConvertNullToNullString] DOMString align; 28 attribute [ConvertNullToNullString] DOMString ch; 29 attribute [ConvertNullToNullString] DOMString chOff; 30 attribute [ConvertNullToNullString] DOMString vAlign; 31 readonly attribute HTMLCollection rows; 32 33 HTMLElement insertRow(in long index) 34 raises(DOMException); 35 void deleteRow(in long index) 36 raises(DOMException); 37 26 attribute [Reflect] DOMString align; 27 attribute [Reflect=char] DOMString ch; 28 attribute [Reflect=charoff] DOMString chOff; 29 attribute [Reflect] DOMString vAlign; 30 readonly attribute HTMLCollection rows; 31 HTMLElement insertRow(in long index) raises(DOMException); 32 void deleteRow(in long index) raises(DOMException); 38 33 }; 39 34 -
trunk/WebCore/html/HTMLTextAreaElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 22 22 23 23 interface HTMLTextAreaElement : HTMLElement { 24 attribute [ConvertNullToNullString] DOMString defaultValue; 25 readonly attribute HTMLFormElement form; 26 readonly attribute ValidityState validity; 27 attribute [ConvertNullToNullString] DOMString accessKey; 28 attribute long cols; 29 attribute boolean disabled; 30 attribute boolean autofocus; 31 attribute long maxLength 32 setter raises(DOMException); 33 attribute [ConvertNullToNullString] DOMString name; 34 attribute [ConvertNullToNullString, Reflect] DOMString placeholder; 35 attribute boolean readOnly; 36 attribute boolean required; 37 attribute long rows; 38 readonly attribute DOMString type; 39 attribute [ConvertNullToNullString] DOMString value; 40 readonly attribute unsigned long textLength; 41 42 void select(); 24 attribute [ConvertNullToNullString] DOMString defaultValue; 25 readonly attribute HTMLFormElement form; 26 readonly attribute ValidityState validity; 27 attribute [Reflect] DOMString accessKey; 28 attribute long cols; 29 attribute boolean disabled; 30 attribute boolean autofocus; 31 attribute long maxLength setter raises(DOMException); 32 attribute [ConvertNullToNullString] DOMString name; 33 attribute [Reflect] DOMString placeholder; 34 attribute boolean readOnly; 35 attribute boolean required; 36 attribute long rows; 37 readonly attribute DOMString type; 38 attribute [ConvertNullToNullString] DOMString value; 39 readonly attribute unsigned long textLength; 43 40 44 readonly attribute boolean willValidate; 45 readonly attribute DOMString validationMessage; 46 boolean checkValidity(); 47 void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error); 41 void select(); 48 42 49 // WinIE & FireFox extension: 50 attribute long selectionStart; 51 attribute long selectionEnd; 43 readonly attribute boolean willValidate; 44 readonly attribute DOMString validationMessage; 45 boolean checkValidity(); 46 void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error); 47 48 // WinIE & FireFox extension: 49 attribute long selectionStart; 50 attribute long selectionEnd; 52 51 void setSelectionRange(in long start, in long end); 53 readonly attribute NodeListlabels;52 readonly attribute NodeList labels; 54 53 }; 55 54 -
trunk/WebCore/html/HTMLUListElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 22 22 interface HTMLUListElement : HTMLElement { 23 23 attribute boolean compact; 24 attribute [ ConvertNullToNullString] DOMString type;24 attribute [Reflect] DOMString type; 25 25 }; 26 26 -
trunk/WebCore/html/HTMLVideoElement.cpp
r61293 r61413 178 178 } 179 179 180 bool HTMLVideoElement::isURLAttribute(Attribute* attr) const 181 { 182 return attr->name() == posterAttr; 180 bool HTMLVideoElement::isURLAttribute(Attribute* attribute) const 181 { 182 return HTMLMediaElement::isURLAttribute(attribute) 183 || attribute->name() == posterAttr; 183 184 } 184 185 … … 259 260 260 261 } 261 #endif 262 263 #endif -
trunk/WebCore/html/HTMLVideoElement.idl
r61384 r61413 1 1 /* 2 * Copyright (C) 2007 Apple Inc.All rights reserved.2 * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 GenerateNativeConverter 30 30 ] HTMLVideoElement : HTMLMediaElement { 31 attribute unsigned long width;32 attribute unsigned long height;31 attribute [Reflect] unsigned long width; 32 attribute [Reflect] unsigned long height; 33 33 readonly attribute unsigned long videoWidth; 34 34 readonly attribute unsigned long videoHeight; 35 attribute [ConvertNullToNullString] DOMString poster;35 attribute [ReflectURL] DOMString poster; 36 36 37 37 readonly attribute boolean webkitSupportsFullscreen; 38 38 readonly attribute boolean webkitDisplayingFullscreen; 39 39 40 [NeedsUserGestureCheck] void webkitEnterFullscreen() 41 raises (DOMException); 40 [NeedsUserGestureCheck] void webkitEnterFullscreen() raises (DOMException); 42 41 void webkitExitFullscreen(); 43 42 44 [NeedsUserGestureCheck] void webkitEnterFullScreen() 45 raises (DOMException); 43 [NeedsUserGestureCheck] void webkitEnterFullScreen() raises (DOMException); 46 44 void webkitExitFullScreen(); 47 48 45 }; 49 46 } -
trunk/WebCore/svg/SVGElement.idl
r61384 r61413 24 24 25 25 interface [GenerateNativeConverter, Conditional=SVG] SVGElement : Element { 26 attribute [ConvertNullToNullString, Reflect] DOMString id 27 setter raises(DOMException); 28 attribute [ConvertNullToNullString] DOMString xmlbase 29 setter raises(DOMException); 26 attribute [Reflect] DOMString id setter raises(DOMException); 27 attribute [ConvertNullToNullString] DOMString xmlbase setter raises(DOMException); 30 28 readonly attribute SVGSVGElement ownerSVGElement; 31 29 readonly attribute SVGElement viewportElement;
Note: See TracChangeset
for help on using the changeset viewer.