Changeset 61413 in webkit


Ignore:
Timestamp:
Jun 18, 2010 9:47:54 AM (14 years ago)
Author:
Darin Adler
Message:

2010-06-18 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

Implement additional DOM attribute reflection for bindings
https://bugs.webkit.org/show_bug.cgi?id=39936

  • Added support for [Reflect] for long, unsigned long, and boolean attributes.
  • Fixed code that set attributes like this: <video controls="controls"> to instead set them like this: <video controls>.
  • Added lots more uses of [Reflect].
  • Removed now-unneeded [ConvertFromString].
  • Made [Reflect] imply [ConvertNullToNullString] so we can get rid of most uses of the latter.
  • Made [Reflect] automatically lowercase the name of the reflected content attribute to minimize the need to specify a custom content attribute name.

One thing this patch does *not* do is remove the unneeded functions
in the various DOM classes that are no longer used by the bindings.
We should do that in a followup.

  • bindings/scripts/CodeGenerator.pm: Added new functions so code can be shared across bindings, GetterExpressionPrefix and SetterExpressionPrefix. We can do a lot more refactoring like this in the future.
  • bindings/scripts/CodeGeneratorCPP.pm: Removed unneeded ConvertFromString handling, changed to use the new GetterExpressionPrefix and SetterExpressionPrefix functions to better handle reflected DOM attributes.
  • bindings/scripts/CodeGeneratorGObject.pm: Removed unneeded ConvertFromString handling, changed to use the new GetterExpressionPrefix and SetterExpressionPrefix functions to better handle reflected DOM attributes. Fixed a few things in the output so the .cpp file will have more WebKit style. The .h file should be GTK style, but the .cpp file can be the standard WebKit style eventually.
  • bindings/scripts/CodeGeneratorJS.pm: Changed to use the new GetterExpressionPrefix and SetterExpressionPrefix functions and removed a now-unneeded IsSVGAnimatedType special case since the new functions take care of it. Made reflected attributes automatically convert null to the null string without a separate ConvertNullToNullString attribute.
  • bindings/scripts/CodeGeneratorObjC.pm: Changed to use the new GetterExpressionPrefix and SetterExpressionPrefix functions and removed a now-unneeded IsSVGAnimatedType special case since the new functions take care of it. Redid the special cases for ownerDocument and for operator to fit better with the new code paths. Removed unneeded ConvertFromString handling.
  • bindings/scripts/CodeGeneratorV8.pm: Changed to use the new GetterExpressionPrefix and SetterExpressionPrefix functions and removed a now-unneeded IsSVGAnimatedType special case since the new functions take care of it. Made reflected attributes automatically convert null to the null string without a separate ConvertNullToNullString attribute.
  • bindings/scripts/test/TestObj.idl: Added some test cases for content attribute reflection and for exceptions in string-typed attributes.
  • bindings/scripts/test/CPP/WebKitDOMTestObj.cpp: Updated.
  • bindings/scripts/test/CPP/WebKitDOMTestObj.h: Ditto.
  • bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
  • bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
  • bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
  • bindings/scripts/test/JS/JSTestObj.h: Ditto.
  • bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
  • bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
  • bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
  • dom/Element.cpp: (WebCore::Element::getIntegralAttribute): Added. (WebCore::Element::setIntegralAttribute): Added. (WebCore::Element::getUnsignedIntegralAttribute): Added. (WebCore::Element::setUnsignedIntegralAttribute): Added.
  • dom/Element.h: Added new attribute get/set functions for bindings.
  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::isURLAttribute): Added. Returns true for srcAttr.
  • html/HTMLMediaElement.h: Added isURLAttribute.
  • html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::isURLAttribute): Changed to call HTMLMediaElement::isURLAttribute before checking for posterAttr.
  • html/HTMLAnchorElement.idl:
  • html/HTMLAppletElement.idl:
  • html/HTMLAreaElement.idl:
  • html/HTMLBRElement.idl:
  • html/HTMLBaseElement.idl:
  • html/HTMLBaseFontElement.idl:
  • html/HTMLBlockquoteElement.idl:
  • html/HTMLBodyElement.idl:
  • html/HTMLButtonElement.idl:
  • html/HTMLDListElement.idl:
  • html/HTMLDirectoryElement.idl:
  • html/HTMLDivElement.idl:
  • html/HTMLElement.idl:
  • html/HTMLEmbedElement.idl:
  • html/HTMLFontElement.idl:
  • html/HTMLFormElement.idl:
  • html/HTMLFrameElement.idl:
  • html/HTMLFrameSetElement.idl:
  • html/HTMLHRElement.idl:
  • html/HTMLHeadElement.idl:
  • html/HTMLHeadingElement.idl:
  • html/HTMLHtmlElement.idl:
  • html/HTMLIFrameElement.idl:
  • html/HTMLImageElement.idl:
  • html/HTMLInputElement.idl:
  • html/HTMLIsIndexElement.idl:
  • html/HTMLLIElement.idl:
  • html/HTMLLabelElement.idl:
  • html/HTMLLegendElement.idl:
  • html/HTMLLinkElement.idl:
  • html/HTMLMapElement.idl:
  • html/HTMLMediaElement.idl:
  • html/HTMLMenuElement.idl:
  • html/HTMLMetaElement.idl:
  • html/HTMLModElement.idl:
  • html/HTMLOListElement.idl:
  • html/HTMLObjectElement.idl:
  • html/HTMLOptGroupElement.idl:
  • html/HTMLOptionElement.idl:
  • html/HTMLParagraphElement.idl:
  • html/HTMLParamElement.idl:
  • html/HTMLPreElement.idl:
  • html/HTMLQuoteElement.idl:
  • html/HTMLScriptElement.idl:
  • html/HTMLStyleElement.idl:
  • html/HTMLTableCaptionElement.idl:
  • html/HTMLTableCellElement.idl:
  • html/HTMLTableColElement.idl:
  • html/HTMLTableElement.idl:
  • html/HTMLTableRowElement.idl:
  • html/HTMLTableSectionElement.idl:
  • html/HTMLTextAreaElement.idl:
  • html/HTMLUListElement.idl:
  • html/HTMLVideoElement.idl:
  • svg/SVGElement.idl: Added more uses of [Reflect]. Got rid of uses of [ConvertNullToNullString] that are now unneeded since [Reflect] now implies that. Changed formatting to be simpler and consistent without all the lining up and multiple lines.
Location:
trunk/WebCore
Files:
78 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r61412 r61413  
     12010-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
    11522010-06-17  Dumitru Daniliuc  <dumi@chromium.org>
    2153
  • trunk/WebCore/bindings/scripts/CodeGenerator.pm

    r61384 r61413  
    382382}
    383383
     384sub 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
     400sub 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
     416sub 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
     442sub 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}
    384465
    3854661;
  • trunk/WebCore/bindings/scripts/CodeGeneratorCPP.pm

    r61384 r61413  
    680680            my $getterSig = "$attributeType $className\:\:$attributeName() const\n";
    681681            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);
    694683            my $getterContentTail = ")";
    695684
     
    699688                $getterContentHead = "WebCore::String::number(" . $getterContentHead;
    700689                $getterContentTail .= ")";
    701             } elsif ($attribute->signature->extendedAttributes->{"ConvertFromString"}) {
    702                 $getterContentTail .= ".toInt()";
    703690            } elsif ($attribute->signature->type eq "SerializedScriptValue") {
    704691                $getterContentHead = "$getterContentHead";
     
    751738                my $arg = GetCPPTypeGetter($argName, $idlType);
    752739
    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"}) {
    757742                    $arg = "WebCore::String($arg).toInt()";
    758743                }
     
    763748                push(@implContent, AddEarlyReturnStatement());
    764749
    765                 my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};
    766                 my $reflectURL = $attribute->signature->extendedAttributes->{"ReflectURL"};
    767750                push(@implContent, "    $exceptionInit\n") if $hasSetterException;
    768751                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");
    777754                push(@implContent, "    $exceptionRaiseOnError\n") if $hasSetterException;
    778755                push(@implContent, "}\n\n");
  • trunk/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r61384 r61413  
    362362    if ($gtype eq "string") {
    363363        $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))";
    383371
    384372    if (grep {$_ eq $attribute} @writeableProperties) {
     
    414402        push(@txtGetProps, $txtGetProp);
    415403        $done = 1;
    416     }
    417 
    418     if($attribute->signature->extendedAttributes->{"ConvertFromString"}) {
    419         # TODO: Add other conversion functions for different types.  Current
    420         # 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         }
    427404    }
    428405
     
    816793        }
    817794        if ($paramIsGDOMType || ($paramIDLType eq "DOMString") || ($paramIDLType eq "CompareHow")) {
    818             $paramName = "_g_" . $paramName;
     795            $paramName = "converted_" . $paramName;
    819796        }
    820797        if ($callImplParams) {
     
    854831    if ($returnType ne "void") {
    855832        # TODO: return proper default result
    856         push(@cBody, "    g_return_val_if_fail (self, 0);\n");
     833        push(@cBody, "    g_return_val_if_fail(self, 0);\n");
    857834    } else {
    858         push(@cBody, "    g_return_if_fail (self);\n");
     835        push(@cBody, "    g_return_if_fail(self);\n");
    859836    }
    860837
     
    871848            if ($returnType ne "void") {
    872849                # TODO: return proper default result
    873                 push(@cBody, "    g_return_val_if_fail ($paramName, 0);\n");
     850                push(@cBody, "    g_return_val_if_fail($paramName, 0);\n");
    874851            } else {
    875                 push(@cBody, "    g_return_if_fail ($paramName);\n");
     852                push(@cBody, "    g_return_if_fail($paramName);\n");
    876853            }
    877854        }
     
    885862        my $paramIsGDOMType = IsGDOMClassType($paramIDLType);
    886863        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");
    888865        } 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");
    890867        } elsif ($paramIsGDOMType) {
    891             push(@cBody, "    WebCore::${paramIDLType} * _g_${paramName} = WebKit::core($paramName);\n");
     868            push(@cBody, "    WebCore::${paramIDLType} * converted_${paramName} = WebKit::core($paramName);\n");
    892869            if ($returnType ne "void") {
    893870                # 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");
    895872            } else {
    896                 push(@cBody, "    g_return_if_fail (_g_${paramName});\n");
     873                push(@cBody, "    g_return_if_fail(converted_${paramName});\n");
    897874            }
    898875        }
    899         $returnParamName = "_g_".$paramName if $param->extendedAttributes->{"Return"};
     876        $returnParamName = "converted_".$paramName if $param->extendedAttributes->{"Return"};
    900877    }
    901878
     
    956933    } elsif ($functionSigType eq "DOMString") {
    957934        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";
    966938        } else {
    967939            $getterContentHead = "${assign}convertToUTF8String(item->${functionSigName}(${callImplParams}${exceptions}));\n";
    968940        }
    969 
    970941        push(@cBody, "    ${getterContentHead}");
    971942    } 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";
    982950        } 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}");
    987954       
    988955        if(@{$function->raisesExceptions}) {
     
    10491016            # according to GObject conventions.  Skip this for now.
    10501017            || $attribute->signature->name eq "URL"     # TODO: handle this
    1051             || $attribute->signature->extendedAttributes->{"ConvertFromString"}    # TODO: handle this
    10521018            ) {
    10531019            next TOP;
     
    10791045       
    10801046        $function->signature(new domSignature());
    1081         $function->signature->name($setname);
     1047        $function->signature->name($attribute->signature->name);
    10821048        $function->signature->type("void");
    10831049        $function->signature->extendedAttributes($attribute->signature->extendedAttributes);
     
    10931059        $function->raisesExceptions($attribute->setterExceptions);
    10941060       
    1095         $object->GenerateFunction($interfaceName, $function, "");
     1061        $object->GenerateFunction($interfaceName, $function, "set_");
    10961062    }
    10971063}
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r61384 r61413  
    44# Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org>
    55# 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.
    77# Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
    88# Copyright (C) Research In Motion Limited 2010. All rights reserved.
     
    15711571                        }
    15721572                    } else {
     1573                        my $getterExpression = "imp->" . $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute) . ")";
     1574                        my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, $getterExpression, "castedThis");
    15731575                        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");
    15871576                        if ($codeGenerator->IsSVGAnimatedType($type)) {
    15881577                            push(@implContent, "    RefPtr<$type> obj = $jsType;\n");
     
    17351724                            } else {
    17361725                                my $nativeValue = JSValueToNative($attribute->signature, "value");
     1726                                my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute);
     1727
    17371728                                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");
    17481730                                push(@implContent, ", ec") if @{$attribute->setterExceptions};
    17491731                                push(@implContent, ");\n");
     
    23312313
    23322314    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"};
    23342316        return "valueToStringWithUndefinedOrNullCheck(exec, $value)" if $signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"};
    23352317        return "ustringToString($value.toString(exec))";
     
    24232405            return "toJS(exec, $globalObject, JSSVGDynamicPODTypeWrapperCache<$nativeType, $implClassNameForValueConversion>::lookupOrCreateWrapper(imp, &${implClassNameForValueConversion}::$getter, &${implClassNameForValueConversion}::$setter).get(), JSSVGContextCache::svgContextForDOMObject(castedThis));"
    24242406        }
    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()";
    24322407    }
    24332408
  • trunk/WebCore/bindings/scripts/CodeGeneratorObjC.pm

    r61384 r61413  
    44# Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org>
    55# 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.
    77# Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
    88# Copyright (C) 2010 Google Inc.
     
    11761176                # Special case attribute frame to be frameBorders.
    11771177                $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";
    11851181            }
    11861182
     
    11901186            my $getterSig = "- ($attributeType)$attributeInterfaceName\n";
    11911187
    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/;
    11951193
    11961194            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";
    12091196            my $getterContentTail = ")";
    12101197
     
    12571244                $getterContentHead = "WebCore::String::number(" . $getterContentHead;
    12581245                $getterContentTail .= ")";
    1259             } elsif ($attribute->signature->extendedAttributes->{"ConvertFromString"}) {
    1260                 $getterContentTail .= ".toInt()";
    12611246            } elsif ($codeGenerator->IsPodType($idlType) or $idlType eq "Date") {
    12621247                $getterContentHead = "kit($getterContentHead";
     
    13171302                my $arg = GetObjCTypeGetter($argName, $idlType);
    13181303
    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"}) {
    13231306                    $arg = "WebCore::String($arg).toInt()";
    13241307                }
     
    13471330                    }
    13481331                } 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" : "";
    13511334                    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");
    13611336                    push(@implContent, "    $exceptionRaiseOnError\n") if $hasSetterException;
    13621337                }
  • trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r61384 r61413  
    678678        if ($getterStringUsesImp && $reflect && IsNodeSubType($dataNode) && $codeGenerator->IsStringType($attrType)) {
    679679            # 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;
    681681            my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName);
    682682            $implIncludes{"${namespace}.h"} = 1;
     
    709709    }
    710710
    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 
    719711    my $returnType = GetTypeFromSignature($attribute->signature);
    720712
    721713    my $getterString;
    722714    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);
    734716        $getterString .= "ec" if $useExceptions;
    735717        $getterString .= ")";
    736         if ($nativeType eq "int" and $attribute->signature->extendedAttributes->{"ConvertFromString"}) {
    737             $getterString .= ".toInt()";
    738         }
    739718    } else {
    740719        $getterString = "impInstance";
     
    888867        if (($reflect || $reflectURL) && IsNodeSubType($dataNode) && $codeGenerator->IsStringType($attrType)) {
    889868            # 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);
    891870            my $namespace = $codeGenerator->NamespaceForAttributeName($interfaceName, $contentAttributeName);
    892871            $implIncludes{"${namespace}.h"} = 1;
     
    913892    }
    914893
    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";
    923895    my $returnType = GetTypeFromSignature($attribute->signature);
    924896    if (IsRefPtrType($returnType)) {
     
    936908        push(@implContentDecls, "    *imp = $result;\n");
    937909    } 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);
    947912            $implIncludes{"V8AbstractEventListener.h"} = 1;
    948913            push(@implContentDecls, "    transferHiddenDependency(info.Holder(), imp->$attrName(), value, V8${interfaceName}::eventListenerCacheIndex);\n");
     
    955920            }
    956921        } else {
    957             push(@implContentDecls, "    imp->set$implSetterFunctionName($result");
     922            my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute);
     923            push(@implContentDecls, "    imp->$setterExpressionPrefix$result");
    958924        }
    959925        push(@implContentDecls, ", ec") if $useExceptions;
     
    27132679        if ($signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"}) {
    27142680            $mode = "WithUndefinedOrNullCheck";
    2715         } elsif ($signature->extendedAttributes->{"ConvertNullToNullString"}) {
     2681        } elsif ($signature->extendedAttributes->{"ConvertNullToNullString"} || $signature->extendedAttributes->{"Reflect"} || $signature->extendedAttributes->{"ReflectURL"}) {
    27162682            $mode = "WithNullCheck";
    27172683        }
  • trunk/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp

    r61384 r61413  
    2323
    2424#include "AtomicString.h"
     25#include "HTMLNames.h"
    2526#include "KURL.h"
    2627#include "SerializedScriptValue.h"
     
    174175}
    175176
    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);
     177WebDOMString 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
     185void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr)
     186{
     187    if (!impl())
     188        return;
     189
     190    impl()->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, newReflectedStringAttr);
     191}
     192
     193int WebDOMTestObj::reflectedIntegralAttr() const
     194{
     195    if (!impl())
     196        return 0;
     197
     198    return impl()->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr);
     199}
     200
     201void WebDOMTestObj::setReflectedIntegralAttr(int newReflectedIntegralAttr)
     202{
     203    if (!impl())
     204        return;
     205
     206    impl()->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr);
     207}
     208
     209bool WebDOMTestObj::reflectedBooleanAttr() const
     210{
     211    if (!impl())
     212        return false;
     213
     214    return impl()->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr);
     215}
     216
     217void WebDOMTestObj::setReflectedBooleanAttr(bool newReflectedBooleanAttr)
     218{
     219    if (!impl())
     220        return;
     221
     222    impl()->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, newReflectedBooleanAttr);
     223}
     224
     225WebDOMString 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
     233void WebDOMTestObj::setReflectedURLAttr(const WebDOMString& newReflectedURLAttr)
     234{
     235    if (!impl())
     236        return;
     237
     238    impl()->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, newReflectedURLAttr);
     239}
     240
     241WebDOMString 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
     249void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr)
     250{
     251    if (!impl())
     252        return;
     253
     254    impl()->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, newReflectedStringAttr);
     255}
     256
     257int WebDOMTestObj::reflectedCustomIntegralAttr() const
     258{
     259    if (!impl())
     260        return 0;
     261
     262    return impl()->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr);
     263}
     264
     265void WebDOMTestObj::setReflectedCustomIntegralAttr(int newReflectedCustomIntegralAttr)
     266{
     267    if (!impl())
     268        return;
     269
     270    impl()->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, newReflectedCustomIntegralAttr);
     271}
     272
     273bool WebDOMTestObj::reflectedCustomBooleanAttr() const
     274{
     275    if (!impl())
     276        return false;
     277
     278    return impl()->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr);
     279}
     280
     281void WebDOMTestObj::setReflectedCustomBooleanAttr(bool newReflectedCustomBooleanAttr)
     282{
     283    if (!impl())
     284        return;
     285
     286    impl()->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, newReflectedCustomBooleanAttr);
     287}
     288
     289WebDOMString 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
     297void WebDOMTestObj::setReflectedURLAttr(const WebDOMString& newReflectedURLAttr)
     298{
     299    if (!impl())
     300        return;
     301
     302    impl()->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, newReflectedURLAttr);
     303}
     304
     305int 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
     316void 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));
    190324}
    191325
     
    195329        return 0;
    196330
    197     WebCore::ExceptionCode ec = 0;
    198     int result = impl()->attrWithSetterException(ec);
    199     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    200     return result;
     331    return impl()->attrWithSetterException();
    201332}
    202333
     
    211342}
    212343
    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);
     344WebDOMString 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
     355void 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
     365WebDOMString WebDOMTestObj::stringAttrWithSetterException() const
     366{
     367    if (!impl())
     368        return WebDOMString();
     369
     370    return static_cast<const WebCore::String&>(impl()->stringAttrWithSetterException());
     371}
     372
     373void WebDOMTestObj::setStringAttrWithSetterException(const WebDOMString& newStringAttrWithSetterException)
     374{
     375    if (!impl())
     376        return;
     377
     378    WebCore::ExceptionCode ec = 0;
     379    impl()->setStringAttrWithSetterException(newStringAttrWithSetterException, ec);
    228380    webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    229381}
  • trunk/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h

    r61384 r61413  
    5555    WebDOMTestObj testObjAttr() const;
    5656    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);
    5975    int attrWithSetterException() const;
    6076    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&);
    6381    int customAttr() const;
    6482    void setCustomAttr(int);
  • trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp

    r61384 r61413  
    5858webkit_dom_test_callback_callback_with_class1param(WebKitDOMTestCallback* self, WebKitDOMClass1*  class1param)
    5959{
    60     g_return_val_if_fail (self, 0);
     60    g_return_val_if_fail(self, 0);
    6161    WebCore::TestCallback * item = WebKit::core(self);
    62     g_return_val_if_fail (class1param, 0);
    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);
    6666    return res;
    6767}
     
    7070webkit_dom_test_callback_callback_with_class2param(WebKitDOMTestCallback* self, WebKitDOMClass2*  class2param, gchar*  str_arg)
    7171{
    72     g_return_val_if_fail (self, 0);
     72    g_return_val_if_fail(self, 0);
    7373    WebCore::TestCallback * item = WebKit::core(self);
    74     g_return_val_if_fail (class2param, 0);
    75     g_return_val_if_fail (str_arg, 0);
    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);
    8080    return res;
    8181}
     
    8484webkit_dom_test_callback_callback_with_non_bool_return_type(WebKitDOMTestCallback* self, WebKitDOMClass3*  class3param)
    8585{
    86     g_return_val_if_fail (self, 0);
     86    g_return_val_if_fail(self, 0);
    8787    WebCore::TestCallback * item = WebKit::core(self);
    88     g_return_val_if_fail (class3param, 0);
    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);
    9292    return res;
    9393}
  • trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp

    r61384 r61413  
    2525#include <wtf/RefPtr.h>
    2626#include "ExceptionCode.h"
     27#include "HTMLNames.h"
    2728#include "TestObj.h"
    2829#include "WebKitDOMBinding.h"
     
    5253webkit_dom_test_obj_void_method(WebKitDOMTestObj* self)
    5354{
    54     g_return_if_fail (self);
     55    g_return_if_fail(self);
    5556    WebCore::TestObj * item = WebKit::core(self);
    5657    item->voidMethod();
     
    6061webkit_dom_test_obj_void_method_with_args(WebKitDOMTestObj* self, glong int_arg, gchar*  str_arg, WebKitDOMTestObj*  obj_arg)
    6162{
    62     g_return_if_fail (self);
    63     WebCore::TestObj * item = WebKit::core(self);
    64     g_return_if_fail (str_arg);
    65     g_return_if_fail (obj_arg);
    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);
    7071}
    7172
     
    7374webkit_dom_test_obj_int_method(WebKitDOMTestObj* self)
    7475{
    75     g_return_val_if_fail (self, 0);
     76    g_return_val_if_fail(self, 0);
    7677    WebCore::TestObj * item = WebKit::core(self);
    7778    glong res = item->intMethod();
     
    8283webkit_dom_test_obj_int_method_with_args(WebKitDOMTestObj* self, glong int_arg, gchar*  str_arg, WebKitDOMTestObj*  obj_arg)
    8384{
    84     g_return_val_if_fail (self, 0);
    85     WebCore::TestObj * item = WebKit::core(self);
    86     g_return_val_if_fail (str_arg, 0);
    87     g_return_val_if_fail (obj_arg, 0);
    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);
    9293    return res;
    9394}
     
    9697webkit_dom_test_obj_obj_method(WebKitDOMTestObj* self)
    9798{
    98     g_return_val_if_fail (self, 0);
     99    g_return_val_if_fail(self, 0);
    99100    WebCore::TestObj * item = WebKit::core(self);
    100101    PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethod());
     
    106107webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg, gchar*  str_arg, WebKitDOMTestObj*  obj_arg)
    107108{
    108     g_return_val_if_fail (self, 0);
    109     WebCore::TestObj * item = WebKit::core(self);
    110     g_return_val_if_fail (str_arg, 0);
    111     g_return_val_if_fail (obj_arg, 0);
    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));
    116117    WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
    117118    return res;
     
    121122webkit_dom_test_obj_method_that_requires_all_args(WebKitDOMTestObj* self, gchar*  str_arg, WebKitDOMTestObj*  obj_arg)
    122123{
    123     g_return_val_if_fail (self, 0);
    124     WebCore::TestObj * item = WebKit::core(self);
    125     g_return_val_if_fail (str_arg, 0);
    126     g_return_val_if_fail (obj_arg, 0);
    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));
    131132    WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
    132133    return res;
     
    136137webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* self, gchar*  str_arg, WebKitDOMTestObj*  obj_arg, GError **error)
    137138{
    138     g_return_val_if_fail (self, 0);
    139     WebCore::TestObj * item = WebKit::core(self);
    140     g_return_val_if_fail (str_arg, 0);
    141     g_return_val_if_fail (obj_arg, 0);
    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);
    145146    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));
    147148    if (ec) {
    148149        WebCore::ExceptionCodeDescription ecdesc;
     
    157158webkit_dom_test_obj_serialized_value(WebKitDOMTestObj* self, WebKitDOMSerializedScriptValue*  serialized_arg)
    158159{
    159     g_return_if_fail (self);
    160     WebCore::TestObj * item = WebKit::core(self);
    161     g_return_if_fail (serialized_arg);
    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);
    165166}
    166167
     
    168169webkit_dom_test_obj_method_with_exception(WebKitDOMTestObj* self, GError **error)
    169170{
    170     g_return_if_fail (self);
     171    g_return_if_fail(self);
    171172    WebCore::TestObj * item = WebKit::core(self);
    172173    WebCore::ExceptionCode ec = 0;
     
    188189webkit_dom_test_obj_with_dynamic_frame(WebKitDOMTestObj* self)
    189190{
    190     g_return_if_fail (self);
     191    g_return_if_fail(self);
    191192    WebCore::TestObj * item = WebKit::core(self);
    192193    item->withDynamicFrame();
     
    196197webkit_dom_test_obj_with_dynamic_frame_and_arg(WebKitDOMTestObj* self, glong int_arg)
    197198{
    198     g_return_if_fail (self);
     199    g_return_if_fail(self);
    199200    WebCore::TestObj * item = WebKit::core(self);
    200201    item->withDynamicFrameAndArg(int_arg);
     
    204205webkit_dom_test_obj_with_dynamic_frame_and_optional_arg(WebKitDOMTestObj* self, glong int_arg, glong optional_arg)
    205206{
    206     g_return_if_fail (self);
     207    g_return_if_fail(self);
    207208    WebCore::TestObj * item = WebKit::core(self);
    208209    item->withDynamicFrameAndOptionalArg(int_arg, optional_arg);
     
    212213webkit_dom_test_obj_with_dynamic_frame_and_user_gesture(WebKitDOMTestObj* self, glong int_arg)
    213214{
    214     g_return_if_fail (self);
     215    g_return_if_fail(self);
    215216    WebCore::TestObj * item = WebKit::core(self);
    216217    item->withDynamicFrameAndUserGesture(int_arg);
     
    220221webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad(WebKitDOMTestObj* self, glong int_arg, glong optional_arg)
    221222{
    222     g_return_if_fail (self);
     223    g_return_if_fail(self);
    223224    WebCore::TestObj * item = WebKit::core(self);
    224225    item->withDynamicFrameAndUserGestureASAD(int_arg, optional_arg);
     
    228229webkit_dom_test_obj_with_script_state_void(WebKitDOMTestObj* self)
    229230{
    230     g_return_if_fail (self);
     231    g_return_if_fail(self);
    231232    WebCore::TestObj * item = WebKit::core(self);
    232233    item->withScriptStateVoid();
     
    236237webkit_dom_test_obj_with_script_state_obj(WebKitDOMTestObj* self)
    237238{
    238     g_return_val_if_fail (self, 0);
     239    g_return_val_if_fail(self, 0);
    239240    WebCore::TestObj * item = WebKit::core(self);
    240241    PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObj());
     
    246247webkit_dom_test_obj_with_script_state_void_exception(WebKitDOMTestObj* self, GError **error)
    247248{
    248     g_return_if_fail (self);
     249    g_return_if_fail(self);
    249250    WebCore::TestObj * item = WebKit::core(self);
    250251    WebCore::ExceptionCode ec = 0;
     
    260261webkit_dom_test_obj_with_script_state_obj_exception(WebKitDOMTestObj* self, GError **error)
    261262{
    262     g_return_val_if_fail (self, 0);
     263    g_return_val_if_fail(self, 0);
    263264    WebCore::TestObj * item = WebKit::core(self);
    264265    WebCore::ExceptionCode ec = 0;
     
    276277webkit_dom_test_obj_with_script_execution_context(WebKitDOMTestObj* self)
    277278{
    278     g_return_if_fail (self);
     279    g_return_if_fail(self);
    279280    WebCore::TestObj * item = WebKit::core(self);
    280281    item->withScriptExecutionContext();
     
    284285webkit_dom_test_obj_method_with_optional_arg(WebKitDOMTestObj* self, glong opt)
    285286{
    286     g_return_if_fail (self);
     287    g_return_if_fail(self);
    287288    WebCore::TestObj * item = WebKit::core(self);
    288289    item->methodWithOptionalArg(opt);
     
    292293webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg(WebKitDOMTestObj* self, glong non_opt, glong opt)
    293294{
    294     g_return_if_fail (self);
     295    g_return_if_fail(self);
    295296    WebCore::TestObj * item = WebKit::core(self);
    296297    item->methodWithNonOptionalArgAndOptionalArg(non_opt, opt);
     
    300301webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args(WebKitDOMTestObj* self, glong non_opt, glong opt1, glong opt2)
    301302{
    302     g_return_if_fail (self);
     303    g_return_if_fail(self);
    303304    WebCore::TestObj * item = WebKit::core(self);
    304305    item->methodWithNonOptionalArgAndTwoOptionalArgs(non_opt, opt1, opt2);
     
    308309webkit_dom_test_obj_get_read_only_int_attr(WebKitDOMTestObj* self)
    309310{
    310     g_return_val_if_fail (self, 0);
     311    g_return_val_if_fail(self, 0);
    311312    WebCore::TestObj * item = WebKit::core(self);
    312313    glong res = item->readOnlyIntAttr();
     
    317318webkit_dom_test_obj_get_read_only_string_attr(WebKitDOMTestObj* self)
    318319{
    319     g_return_val_if_fail (self, 0);
     320    g_return_val_if_fail(self, 0);
    320321    WebCore::TestObj * item = WebKit::core(self);
    321322    gchar*  res = convertToUTF8String(item->readOnlyStringAttr());
     
    326327webkit_dom_test_obj_get_read_only_test_obj_attr(WebKitDOMTestObj* self)
    327328{
    328     g_return_val_if_fail (self, 0);
     329    g_return_val_if_fail(self, 0);
    329330    WebCore::TestObj * item = WebKit::core(self);
    330331    PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->readOnlyTestObjAttr());
     
    336337webkit_dom_test_obj_get_int_attr(WebKitDOMTestObj* self)
    337338{
    338     g_return_val_if_fail (self, 0);
     339    g_return_val_if_fail(self, 0);
    339340    WebCore::TestObj * item = WebKit::core(self);
    340341    glong res = item->intAttr();
     
    345346webkit_dom_test_obj_set_int_attr(WebKitDOMTestObj* self, glong value)
    346347{
    347     g_return_if_fail (self);
     348    g_return_if_fail(self);
    348349    WebCore::TestObj * item = WebKit::core(self);
    349350    item->setIntAttr(value);
     
    353354webkit_dom_test_obj_get_long_long_attr(WebKitDOMTestObj* self)
    354355{
    355     g_return_val_if_fail (self, 0);
     356    g_return_val_if_fail(self, 0);
    356357    WebCore::TestObj * item = WebKit::core(self);
    357358    gint64 res = item->longLongAttr();
     
    362363webkit_dom_test_obj_set_long_long_attr(WebKitDOMTestObj* self, gint64 value)
    363364{
    364     g_return_if_fail (self);
     365    g_return_if_fail(self);
    365366    WebCore::TestObj * item = WebKit::core(self);
    366367    item->setLongLongAttr(value);
     
    370371webkit_dom_test_obj_get_unsigned_long_long_attr(WebKitDOMTestObj* self)
    371372{
    372     g_return_val_if_fail (self, 0);
     373    g_return_val_if_fail(self, 0);
    373374    WebCore::TestObj * item = WebKit::core(self);
    374375    guint64 res = item->unsignedLongLongAttr();
     
    379380webkit_dom_test_obj_set_unsigned_long_long_attr(WebKitDOMTestObj* self, guint64 value)
    380381{
    381     g_return_if_fail (self);
     382    g_return_if_fail(self);
    382383    WebCore::TestObj * item = WebKit::core(self);
    383384    item->setUnsignedLongLongAttr(value);
     
    387388webkit_dom_test_obj_get_string_attr(WebKitDOMTestObj* self)
    388389{
    389     g_return_val_if_fail (self, 0);
     390    g_return_val_if_fail(self, 0);
    390391    WebCore::TestObj * item = WebKit::core(self);
    391392    gchar*  res = convertToUTF8String(item->stringAttr());
     
    396397webkit_dom_test_obj_set_string_attr(WebKitDOMTestObj* self, gchar*  value)
    397398{
    398     g_return_if_fail (self);
    399     WebCore::TestObj * item = WebKit::core(self);
    400     g_return_if_fail (value);
    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);
    403404}
    404405
     
    406407webkit_dom_test_obj_get_test_obj_attr(WebKitDOMTestObj* self)
    407408{
    408     g_return_val_if_fail (self, 0);
     409    g_return_val_if_fail(self, 0);
    409410    WebCore::TestObj * item = WebKit::core(self);
    410411    PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->testObjAttr());
     
    416417webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj*  value)
    417418{
    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
     427gchar*
     428webkit_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
     436void
     437webkit_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);
    424444}
    425445
    426446glong
    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);
     447webkit_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
     455void
     456webkit_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
     463gboolean
     464webkit_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
     472void
     473webkit_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
     480gchar*
     481webkit_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
     489void
     490webkit_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
     499gchar*
     500webkit_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
     508void
     509webkit_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);
    441516}
    442517
    443518glong
    444 webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self, GError **error)
    445 {
    446     g_return_val_if_fail (self, 0);
     519webkit_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
     527void
     528webkit_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
     535gboolean
     536webkit_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
     544void
     545webkit_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
     552gchar*
     553webkit_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
     561void
     562webkit_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
     571glong
     572webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error)
     573{
     574    g_return_val_if_fail(self, 0);
    447575    WebCore::TestObj * item = WebKit::core(self);
    448576    WebCore::ExceptionCode ec = 0;
    449     glong res = item->attrWithSetterException(ec);
     577    glong res = item->attrWithGetterException(ec);
    450578    if (ec) {
    451579        WebCore::ExceptionCodeDescription ecdesc;
     
    457585
    458586void
     587webkit_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
     600glong
     601webkit_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
     609void
    459610webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong value, GError **error)
    460611{
    461     g_return_if_fail (self);
     612    g_return_if_fail(self);
    462613    WebCore::TestObj * item = WebKit::core(self);
    463614    WebCore::ExceptionCode ec = 0;
     
    470621}
    471622
    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);
     623gchar*
     624webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error)
     625{
     626    g_return_val_if_fail(self, 0);
    485627    WebCore::TestObj * item = WebKit::core(self);
    486628    WebCore::ExceptionCode ec = 0;
    487     item->setAttrWithGetterException(value, ec);
     629    gchar*  res = convertToUTF8String(item->stringAttrWithGetterException(ec));
     630    return res;
     631}
     632
     633void
     634webkit_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);
    488642    if (ec) {
    489643        WebCore::ExceptionCodeDescription ecdesc;
     
    494648
    495649gchar*
     650webkit_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
     658void
     659webkit_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
     674gchar*
    496675webkit_dom_test_obj_get_script_string_attr(WebKitDOMTestObj* self)
    497676{
    498     g_return_val_if_fail (self, 0);
     677    g_return_val_if_fail(self, 0);
    499678    WebCore::TestObj * item = WebKit::core(self);
    500679    gchar*  res = convertToUTF8String(item->scriptStringAttr());
     
    506685webkit_dom_test_obj_get_conditional_attr1(WebKitDOMTestObj* self)
    507686{
    508     g_return_val_if_fail (self, 0);
     687    g_return_val_if_fail(self, 0);
    509688    WebCore::TestObj * item = WebKit::core(self);
    510689    glong res = item->conditionalAttr1();
     
    517696webkit_dom_test_obj_set_conditional_attr1(WebKitDOMTestObj* self, glong value)
    518697{
    519     g_return_if_fail (self);
     698    g_return_if_fail(self);
    520699    WebCore::TestObj * item = WebKit::core(self);
    521700    item->setConditionalAttr1(value);
     
    527706webkit_dom_test_obj_get_conditional_attr2(WebKitDOMTestObj* self)
    528707{
    529     g_return_val_if_fail (self, 0);
     708    g_return_val_if_fail(self, 0);
    530709    WebCore::TestObj * item = WebKit::core(self);
    531710    glong res = item->conditionalAttr2();
     
    538717webkit_dom_test_obj_set_conditional_attr2(WebKitDOMTestObj* self, glong value)
    539718{
    540     g_return_if_fail (self);
     719    g_return_if_fail(self);
    541720    WebCore::TestObj * item = WebKit::core(self);
    542721    item->setConditionalAttr2(value);
     
    548727webkit_dom_test_obj_get_conditional_attr3(WebKitDOMTestObj* self)
    549728{
    550     g_return_val_if_fail (self, 0);
     729    g_return_val_if_fail(self, 0);
    551730    WebCore::TestObj * item = WebKit::core(self);
    552731    glong res = item->conditionalAttr3();
     
    559738webkit_dom_test_obj_set_conditional_attr3(WebKitDOMTestObj* self, glong value)
    560739{
    561     g_return_if_fail (self);
     740    g_return_if_fail(self);
    562741    WebCore::TestObj * item = WebKit::core(self);
    563742    item->setConditionalAttr3(value);
     
    568747webkit_dom_test_obj_get_description(WebKitDOMTestObj* self)
    569748{
    570     g_return_val_if_fail (self, 0);
     749    g_return_val_if_fail(self, 0);
    571750    WebCore::TestObj * item = WebKit::core(self);
    572751    glong res = item->description();
     
    577756webkit_dom_test_obj_get_id(WebKitDOMTestObj* self)
    578757{
    579     g_return_val_if_fail (self, 0);
     758    g_return_val_if_fail(self, 0);
    580759    WebCore::TestObj * item = WebKit::core(self);
    581760    glong res = item->id();
     
    586765webkit_dom_test_obj_set_id(WebKitDOMTestObj* self, glong value)
    587766{
    588     g_return_if_fail (self);
     767    g_return_if_fail(self);
    589768    WebCore::TestObj * item = WebKit::core(self);
    590769    item->setId(value);
     
    594773webkit_dom_test_obj_get_hash(WebKitDOMTestObj* self)
    595774{
    596     g_return_val_if_fail (self, 0);
     775    g_return_val_if_fail(self, 0);
    597776    WebCore::TestObj * item = WebKit::core(self);
    598777    gchar*  res = convertToUTF8String(item->hash());
     
    626805    PROP_STRING_ATTR,
    627806    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,
    629816    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,
    631819    PROP_CUSTOM_ATTR,
    632820    PROP_SCRIPT_STRING_ATTR,
     
    682870        break;
    683871    }
    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);
    687916        break;
    688917    }
     
    693922        break;
    694923    }
    695     case PROP_ATTR_WITH_GETTER_EXCEPTION:
     924    case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION:
    696925    {
    697926        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);
    699934        break;
    700935    }
     
    7791014        break;
    7801015    }
    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));
    7841060        break;
    7851061    }
    7861062    case PROP_ATTR_WITH_SETTER_EXCEPTION:
    7871063    {
     1064        g_value_set_long(value, coreSelf->attrWithSetterException());
     1065        break;
     1066    }
     1067    case PROP_STRING_ATTR_WITH_GETTER_EXCEPTION:
     1068    {
    7881069        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()));
    7951076        break;
    7961077    }
     
    9151196                                                           WEBKIT_PARAM_READWRITE));
    9161197    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 */
     1210G_MAXLONG, /* max */
     12110, /* 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 */
     1240G_MAXLONG, /* max */
     12410, /* 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 */
    9211262                                                           G_MINLONG, /* min */
    9221263G_MAXLONG, /* max */
     
    9331274                                                           WEBKIT_PARAM_READWRITE));
    9341275    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 */
    9421288                                                           WEBKIT_PARAM_READWRITE));
    9431289    g_object_class_install_property(gobjectClass,
  • trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h

    r61384 r61413  
    161161webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj*  value);
    162162
    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);
     163WEBKIT_API gchar*
     164webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self);
     165
     166WEBKIT_API void
     167webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, gchar*  value);
     168
     169WEBKIT_API glong
     170webkit_dom_test_obj_get_reflected_integral_attr(WebKitDOMTestObj* self);
     171
     172WEBKIT_API void
     173webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong value);
     174
     175WEBKIT_API gboolean
     176webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self);
     177
     178WEBKIT_API void
     179webkit_dom_test_obj_set_reflected_boolean_attr(WebKitDOMTestObj* self, gboolean value);
     180
     181WEBKIT_API gchar*
     182webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self);
     183
     184WEBKIT_API void
     185webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, gchar*  value);
     186
     187WEBKIT_API gchar*
     188webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self);
     189
     190WEBKIT_API void
     191webkit_dom_test_obj_set_reflected_string_attr(WebKitDOMTestObj* self, gchar*  value);
     192
     193WEBKIT_API glong
     194webkit_dom_test_obj_get_reflected_custom_integral_attr(WebKitDOMTestObj* self);
     195
     196WEBKIT_API void
     197webkit_dom_test_obj_set_reflected_custom_integral_attr(WebKitDOMTestObj* self, glong value);
     198
     199WEBKIT_API gboolean
     200webkit_dom_test_obj_get_reflected_custom_boolean_attr(WebKitDOMTestObj* self);
     201
     202WEBKIT_API void
     203webkit_dom_test_obj_set_reflected_custom_boolean_attr(WebKitDOMTestObj* self, gboolean value);
     204
     205WEBKIT_API gchar*
     206webkit_dom_test_obj_get_reflected_url_attr(WebKitDOMTestObj* self);
     207
     208WEBKIT_API void
     209webkit_dom_test_obj_set_reflected_url_attr(WebKitDOMTestObj* self, gchar*  value);
     210
     211WEBKIT_API glong
     212webkit_dom_test_obj_get_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error);
     213
     214WEBKIT_API void
     215webkit_dom_test_obj_set_attr_with_getter_exception(WebKitDOMTestObj* self, glong value, GError **error);
     216
     217WEBKIT_API glong
     218webkit_dom_test_obj_get_attr_with_setter_exception(WebKitDOMTestObj* self);
    171219
    172220WEBKIT_API void
    173221webkit_dom_test_obj_set_attr_with_setter_exception(WebKitDOMTestObj* self, glong value, GError **error);
    174222
    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);
     223WEBKIT_API gchar*
     224webkit_dom_test_obj_get_string_attr_with_getter_exception(WebKitDOMTestObj* self, GError **error);
     225
     226WEBKIT_API void
     227webkit_dom_test_obj_set_string_attr_with_getter_exception(WebKitDOMTestObj* self, gchar*  value, GError **error);
     228
     229WEBKIT_API gchar*
     230webkit_dom_test_obj_get_string_attr_with_setter_exception(WebKitDOMTestObj* self);
     231
     232WEBKIT_API void
     233webkit_dom_test_obj_set_string_attr_with_setter_exception(WebKitDOMTestObj* self, gchar*  value, GError **error);
    180234
    181235WEBKIT_API gchar*
  • trunk/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r61384 r61413  
    2222#include "JSTestObj.h"
    2323
     24#include "HTMLNames.h"
    2425#include "JSEventListener.h"
    2526#include "JSTestObj.h"
     
    4748#endif
    4849
    49 static const HashTableValue JSTestObjTableValues[21] =
     50static const HashTableValue JSTestObjTableValues[30] =
    5051{
    5152    { "readOnlyIntAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyIntAttr), (intptr_t)0 THUNK_GENERATOR(0) },
     
    5758    { "stringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t)setJSTestObjStringAttr THUNK_GENERATOR(0) },
    5859    { "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) },
    6069    { "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) },
    6272    { "customAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCustomAttr), (intptr_t)setJSTestObjCustomAttr THUNK_GENERATOR(0) },
    6373    { "scriptStringAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjScriptStringAttr), (intptr_t)0 THUNK_GENERATOR(0) },
     
    7989
    8090#undef THUNK_GENERATOR
    81 static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 66, 63, JSTestObjTableValues, 0 };
     91static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 69, 63, JSTestObjTableValues, 0 };
    8292/* Hash table for constructor */
    8393#if ENABLE(JIT)
     
    288298}
    289299
    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());
     300JSValue 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
     309JSValue 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
     318JSValue 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
     327JSValue 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
     336JSValue 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
     345JSValue 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
     354JSValue 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
     363JSValue 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
     372JSValue 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);
    296379    return result;
    297380}
     
    300383{
    301384    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
     391JSValue jsTestObjStringAttrWithGetterException(ExecState* exec, JSValue slotBase, const Identifier&)
     392{
     393    JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
    302394    ExceptionCode ec = 0;
    303395    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
    304     JSC::JSValue result = jsNumber(exec, imp->attrWithSetterException(ec));
     396    JSC::JSValue result = jsString(exec, imp->stringAttrWithGetterException(ec));
    305397    setDOMException(exec, ec);
    306398    return result;
    307399}
    308400
    309 JSValue jsTestObjAttrWithGetterException(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->attrWithGetterException());
     401JSValue 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());
    315407    return result;
    316408}
     
    436528}
    437529
    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));
     530void 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
     537void 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
     544void 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
     551void 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
     558void 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
     565void 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
     572void 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
     579void 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
     586void 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);
    443593}
    444594
     
    452602}
    453603
    454 void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
     604void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
    455605{
    456606    JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
    457607    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
    458608    ExceptionCode ec = 0;
    459     imp->setAttrWithGetterException(value.toInt32(exec), ec);
     609    imp->setStringAttrWithGetterException(ustringToString(value.toString(exec)), ec);
     610    setDOMException(exec, ec);
     611}
     612
     613void 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);
    460619    setDOMException(exec, ec);
    461620}
     
    10171176    if (exec->argumentCount() == 1)
    10181177        return jsTestObjPrototypeFunctionOverloadedMethod4(exec);
    1019     return JSValue::encode(throwTypeError(exec));
     1178    return throwVMTypeError(exec);
    10201179}
    10211180
  • trunk/WebCore/bindings/scripts/test/JS/JSTestObj.h

    r61384 r61413  
    131131JSC::JSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
    132132void 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);
     133JSC::JSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     134void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     135JSC::JSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     136void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     137JSC::JSValue jsTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     138void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     139JSC::JSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     140void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     141JSC::JSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     142void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     143JSC::JSValue jsTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     144void setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     145JSC::JSValue jsTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     146void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     147JSC::JSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     148void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     149JSC::JSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     150void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
    135151JSC::JSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
    136152void 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);
     153JSC::JSValue jsTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     154void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     155JSC::JSValue jsTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     156void setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
    139157JSC::JSValue jsTestObjCustomAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
    140158void setJSTestObjCustomAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
  • trunk/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h

    r61384 r61413  
    4848- (DOMTestObj *)testObjAttr;
    4949- (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;
    5268- (int)attrWithSetterException;
    5369- (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;
    5674- (int)customAttr;
    5775- (void)setCustomAttr:(int)newCustomAttr;
  • trunk/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm

    r61384 r61413  
    4040#import "EventListener.h"
    4141#import "ExceptionHandlers.h"
     42#import "HTMLNames.h"
    4243#import "JSMainThreadExecState.h"
    4344#import "KURL.h"
     
    152153}
    153154
    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);
    164266}
    165267
     
    167269{
    168270    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);
    171287    WebCore::raiseOnDOMError(ec);
    172288    return result;
    173289}
    174290
    175 - (void)setAttrWithSetterException:(int)newAttrWithSetterException
    176 {
    177     WebCore::JSMainThreadNullState state;
    178     WebCore::ExceptionCode ec = 0;
    179     IMPL->setAttrWithSetterException(newAttrWithSetterException, ec);
    180     WebCore::raiseOnDOMError(ec);
    181 }
    182 
    183 - (int)attrWithGetterException
    184 {
    185     WebCore::JSMainThreadNullState state;
    186     return IMPL->attrWithGetterException();
    187 }
    188 
    189 - (void)setAttrWithGetterException:(int)newAttrWithGetterException
    190 {
    191     WebCore::JSMainThreadNullState state;
    192     WebCore::ExceptionCode ec = 0;
    193     IMPL->setAttrWithGetterException(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);
    194310    WebCore::raiseOnDOMError(ec);
    195311}
  • trunk/WebCore/bindings/scripts/test/TestObj.idl

    r61384 r61413  
    4141        attribute TestObj                  testObjAttr;
    4242
     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
    4353        // Methods
    4454        void    voidMethod();
     
    5666
    5767        // 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);
    6273
    6374        // 'Custom' extended attribute
  • trunk/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

    r61384 r61413  
    2323
    2424#include "ExceptionCode.h"
     25#include "HTMLNames.h"
    2526#include "RuntimeEnabledFeatures.h"
    2627#include "ScriptCallStack.h"
     
    152153}
    153154
    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");
     155static 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
     162static 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
     171static 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
     178static void reflectedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
     179{
     180    INC_STATS("DOM.TestObj.reflectedIntegralAttr._set");
    164181    TestObj* imp = V8TestObj::toNative(info.Holder());
    165182    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
     187static 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
     194static 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
     203static 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
     210static 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
     219static 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
     226static 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
     235static 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
     242static 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
     251static 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
     258static 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
     267static 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
     274static 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
     283static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
     284{
     285    INC_STATS("DOM.TestObj.attrWithGetterException._get");
    173286    TestObj* imp = V8TestObj::toNative(info.Holder());
    174287    ExceptionCode ec = 0;
    175     int v = imp->attrWithSetterException(ec);
     288    int v = imp->attrWithGetterException(ec);
    176289    if (UNLIKELY(ec)) {
    177290        V8Proxy::setDOMException(ec);
     
    179292    }
    180293    return v8::Integer::New(v);
     294}
     295
     296static 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
     308static 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());
    181313}
    182314
     
    193325}
    194326
    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);
     327static 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());
    207331    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
     340static 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
     352static 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
     359static 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);
    209366    if (UNLIKELY(ec))
    210367        V8Proxy::setDOMException(ec);
     
    716873    if (args.Length() == 1)
    717874        return overloadedMethod4Callback(args);
    718     V8Proxy::setDOMException(SYNTAX_ERR);
     875    V8Proxy::throwTypeError();
    719876    return notHandledByInterceptor();
    720877}
     
    739896    // Attribute 'testObjAttr' (Type: 'attribute' ExtAttr: '')
    740897    {"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 */},
    743916    // Attribute 'attrWithSetterException' (Type: 'attribute' ExtAttr: '')
    744917    {"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 */},
    747922    // Attribute 'customAttr' (Type: 'attribute' ExtAttr: 'Custom')
    748923    {"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  
    55 *           (C) 2001 Dirk Mueller (mueller@kde.org)
    66 *           (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.
    88 *           (C) 2007 Eric Seidel (eric@webkit.org)
    99 *
     
    15321532}
    15331533
     1534int Element::getIntegralAttribute(const QualifiedName& attributeName) const
     1535{
     1536    return getAttribute(attributeName).string().toInt();
     1537}
     1538
     1539void 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
     1546unsigned Element::getUnsignedIntegralAttribute(const QualifiedName& attributeName) const
     1547{
     1548    return getAttribute(attributeName).string().toUInt();
     1549}
     1550
     1551void 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
    15341558} // namespace WebCore
  • trunk/WebCore/dom/Element.h

    r61384 r61413  
    102102    void removeAttribute(const QualifiedName&, ExceptionCode&);
    103103
     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
    104110    // Call this to get the value of an attribute that is known not to be the style
    105111    // attribute or one of the SVG animatable attributes.
  • trunk/WebCore/html/HTMLAnchorElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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;
    3535
    3636#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
  • trunk/WebCore/html/HTMLAppletElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2626        CustomCall
    2727    ] 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;
    3434#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    35                  attribute [ConvertNullToNullString, Reflect] DOMString hspace;
     35        attribute [Reflect] DOMString hspace;
    3636#else
    37                  attribute [ConvertFromString] long hspace;
     37        attribute [Reflect] long hspace;
    3838#endif
    39                  attribute [ConvertNullToNullString, Reflect] DOMString name;
    40                  attribute [ConvertNullToNullString, Reflect] DOMString object;
     39        attribute [Reflect] DOMString name;
     40        attribute [Reflect] DOMString object;
    4141#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    42                  attribute [ConvertNullToNullString, Reflect] DOMString vspace;
     42        attribute [Reflect] DOMString vspace;
    4343#else
    44                  attribute [ConvertFromString] long vspace;
     44        attribute [Reflect] long vspace;
    4545#endif
    46                  attribute [ConvertNullToNullString, Reflect] DOMString width;
     46        attribute [Reflect] DOMString width;
    4747    };
    4848
  • trunk/WebCore/html/HTMLAreaElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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;
    3131
    3232        // IE Extensions
  • trunk/WebCore/html/HTMLBRElement.idl

    r61384 r61413  
    2121
    2222    interface HTMLBRElement : HTMLElement {
    23         attribute [ConvertNullToNullString, Reflect] DOMString clear;
     23        attribute [Reflect] DOMString clear;
    2424    };
    2525
  • trunk/WebCore/html/HTMLBaseElement.idl

    r61384 r61413  
    2121
    2222    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;
    2525    };
    2626
  • trunk/WebCore/html/HTMLBaseFontElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    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;
    2525#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
    2626        attribute [ConvertToString] DOMString size; // this changed to a long, but our existing API is a string
    2727#else
    28         attribute long size;
     28        attribute [Reflect] long size;
    2929#endif
    3030    };
  • trunk/WebCore/html/HTMLBlockquoteElement.idl

    r61384 r61413  
    2121
    2222    interface HTMLBlockquoteElement : HTMLElement {
    23         attribute [ConvertNullToNullString, Reflect] DOMString cite;
     23        attribute [Reflect] DOMString cite;
    2424    };
    2525
  • trunk/WebCore/html/HTMLBodyElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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;
    3030
    3131#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
  • trunk/WebCore/html/HTMLButtonElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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();
    3639        void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
     40
    3741        void click();
    38         readonly attribute  NodeList              labels;
     42
     43        readonly attribute NodeList labels;
    3944    };
    4045
  • trunk/WebCore/html/HTMLDListElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLDListElement : HTMLElement {
    23         attribute boolean compact;
     23        attribute [Reflect] boolean compact;
    2424    };
    2525
  • trunk/WebCore/html/HTMLDirectoryElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLDirectoryElement : HTMLElement {
    23         attribute boolean compact;
     23        attribute [Reflect] boolean compact;
    2424    };
    2525
  • trunk/WebCore/html/HTMLDivElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLDivElement : HTMLElement {
    23         attribute [ConvertNullToNullString] DOMString align;
     23        attribute [Reflect] DOMString align;
    2424    };
    2525
  • trunk/WebCore/html/HTMLElement.idl

    r61384 r61413  
    2727                 // iht.com relies on id returning the empty string when no id is present.
    2828                 // 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;
    3434
    3535                 attribute long            tabIndex;
  • trunk/WebCore/html/HTMLEmbedElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2626        CustomCall
    2727    ] HTMLEmbedElement : HTMLElement {
    28                  attribute [ConvertNullToNullString, Reflect] DOMString align;
     28    attribute [Reflect] DOMString align;
    2929#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    30                  attribute [ConvertNullToNullString, Reflect] DOMString height;
     30    attribute [Reflect] DOMString height;
    3131#else
    32                  attribute [ConvertFromString] long height;
     32    attribute [Reflect] long height;
    3333#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;
    3737#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    38                  attribute [ConvertNullToNullString, Reflect] DOMString width;
     38    attribute [Reflect] DOMString width;
    3939#else
    40                  attribute [ConvertFromString] long width;
     40    attribute [Reflect] long width;
    4141#endif
    4242
    4343#if defined(ENABLE_SVG) && ENABLE_SVG
    4444#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);
    4746#endif
    4847#endif
  • trunk/WebCore/html/HTMLFontElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    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;
    2626    };
    2727
  • trunk/WebCore/html/HTMLFormElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2525        HasOverridingNameGetter
    2626    ] 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;
    3738       
    3839        [CallWith=DynamicFrame] void submit();
    3940        void reset();
    40         boolean  checkValidity();
     41        boolean checkValidity();
    4142    };
    4243}
  • trunk/WebCore/html/HTMLFrameElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2323    interface HTMLFrameElement : HTMLElement {
    2424
    25                  attribute [ConvertNullToNullString, Reflect=frameborder] DOMString      frameBorder;
    26                  attribute [ConvertNullToNullString, Reflect=longdesc] DOMString      longDesc;
    27                  attribute [ConvertNullToNullString, Reflect=marginheight] DOMString      marginHeight;
    28                  attribute [ConvertNullToNullString, Reflect=marginwidth] DOMString      marginWidth;
    29                  attribute [ConvertNullToNullString, Reflect] DOMString      name;
    30                  attribute boolean        noResize;
    31                  attribute [ConvertNullToNullString, Reflect] DOMString      scrolling;
    32                  attribute [ConvertNullToNullString, CustomSetter, ReflectURL] DOMString      src;
     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;
    3333
    3434        // Introduced in DOM Level 2:
    35         readonly attribute [CheckFrameSecurity] Document        contentDocument;
     35        readonly attribute [CheckFrameSecurity] Document contentDocument;
    3636
    3737        // Extensions
     
    4545#endif
    4646
    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;
    5051
    5152    };
  • trunk/WebCore/html/HTMLFrameSetElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserve
     2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserve
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2424        HasOverridingNameGetter
    2525    ] HTMLFrameSetElement : HTMLElement {
    26         attribute [ConvertNullToNullString] DOMString cols;
    27         attribute [ConvertNullToNullString] DOMString rows;
     26        attribute [Reflect] DOMString cols;
     27        attribute [Reflect] DOMString rows;
    2828
    2929#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
  • trunk/WebCore/html/HTMLHRElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    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;
    2727    };
    2828
  • trunk/WebCore/html/HTMLHeadElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLHeadElement : HTMLElement {
    23         attribute  [ConvertNullToNullString] DOMString            profile;
     23        attribute [Reflect] DOMString profile;
    2424    };
    2525
  • trunk/WebCore/html/HTMLHeadingElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLHeadingElement : HTMLElement {
    23         attribute [ConvertNullToNullString] DOMString align;
     23        attribute [Reflect] DOMString align;
    2424    };
    2525
  • trunk/WebCore/html/HTMLHtmlElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLHtmlElement : HTMLElement {
    23 
    24         attribute [ConvertNullToNullString] DOMString version;
    25 
     23        attribute [Reflect] DOMString version;
    2624    };
    2725
  • trunk/WebCore/html/HTMLIFrameElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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;
    3635
    3736        // Introduced in DOM Level 2:
    38         readonly attribute [CheckFrameSecurity] Document        contentDocument;
     37        readonly attribute [CheckFrameSecurity] Document contentDocument;
    3938
    4039        // Extensions
     
    4746#endif
    4847#endif
    49 
    5048    };
    5149
  • trunk/WebCore/html/HTMLImageElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2009, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2424        GenerateNativeConverter
    2525    ] 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                  attribute long height;
    31                  attribute long hspace;
    32                  attribute boolean isMap;
    33                  attribute [ConvertNullToNullString, ReflectURL=longdesc] DOMString longDesc;
    34                  attribute [ConvertNullToNullString, ReflectURL] DOMString src;
    35                  attribute [ConvertNullToNullString, Reflect=usemap] DOMString useMap;
    36                  attribute long vspace;
    37                  attribute long width;
     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;
    3838       
    3939        // Extensions
    4040        readonly attribute boolean complete;
    41                  attribute [ConvertNullToNullString, ReflectURL] DOMString lowsrc;
     41        attribute [ReflectURL] DOMString lowsrc;
    4242        readonly attribute long naturalHeight;
    4343        readonly attribute long naturalWidth;
  • trunk/WebCore/html/HTMLInputElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    interface HTMLInputElement : HTMLElement {
    24                  attribute [ConvertNullToNullString] DOMString defaultValue;
    25                  attribute boolean        defaultChecked;
     24        attribute [ConvertNullToNullString] DOMString defaultValue;
     25        attribute [Reflect=checked] boolean defaultChecked;
    2626        readonly attribute HTMLFormElement form;
    27                  attribute boolean        formNoValidate;
    28         readonly attribute ValidityState   validity;
    29                  attribute [ConvertNullToNullString] DOMString accept;
    30                  attribute [ConvertNullToNullString] DOMString accessKey;
    31                  attribute [ConvertNullToNullString] DOMString align;
    32                  attribute [ConvertNullToNullString] DOMString alt;
    33                  attribute boolean        checked;
    34                  attribute boolean        disabled;
    35                  attribute boolean        autofocus;
     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;
    3636#if defined(ENABLE_DATALIST) && ENABLE_DATALIST
    3737        readonly attribute HTMLElement     list;
    3838#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;
    4948#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
    50                  attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string
     49        attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string
    5150#else
    52                  // FIXME: the spec says this should be a long, not an unsigned long
    53                  attribute unsigned long  size; // Changed string -> long as part of DOM level 2
     51        // 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
    5453#endif
    55                  attribute [ConvertNullToNullString] DOMString src;
    56                  attribute [ConvertNullToNullString, Reflect] DOMString step;
    57                  attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2
    58                  attribute [ConvertNullToNullString] DOMString useMap;
    59                  attribute [ConvertNullToNullString] DOMString value;
     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;
    6059#if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
    61                  attribute Date            valueAsDate setter raises(DOMException);
     60        attribute Date valueAsDate setter raises(DOMException);
    6261#endif
    63                  attribute double          valueAsNumber setter raises(DOMException);
     62        attribute double valueAsNumber setter raises(DOMException);
    6463#if defined(ENABLE_DATALIST) && ENABLE_DATALIST
    6564        readonly attribute HTMLOptionElement selectedOption;
    6665#endif
    6766
    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);
    7269
    73         readonly attribute boolean         willValidate;
    74         readonly attribute DOMString       validationMessage;
    75         boolean            checkValidity();
    76         void               setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
    77         void               select();
    78         void               click();
     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();
    7976
    8077#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
    81         void               setValueForUser(in [ConvertNullToNullString] DOMString value);
     78        void setValueForUser(in [ConvertNullToNullString] DOMString value);
    8279#endif
    8380
    8481        // WinIE extension:
    85                  attribute boolean        indeterminate;
     82        attribute boolean indeterminate;
    8683
    8784        // WinIE & FireFox extension:
    8885
    89                  attribute [Custom] long selectionStart;
    90                  attribute [Custom] long selectionEnd;
     86        attribute [Custom] long selectionStart;
     87        attribute [Custom] long selectionEnd;
    9188        [Custom] void setSelectionRange(in long start, in long end);
    9289
    9390#if defined(LANGUAGE_OBJECTIVE_C)
    9491        // Objective-C extension:
    95         readonly attribute DOMString       altDisplayString;
    96         readonly attribute URL             absoluteImageURL;
     92        readonly attribute DOMString altDisplayString;
     93        readonly attribute URL absoluteImageURL;
    9794#endif
    9895
    9996        readonly attribute FileList files;
    100         readonly attribute  NodeList      labels;
     97        readonly attribute NodeList labels;
    10198    };
    10299
  • trunk/WebCore/html/HTMLIsIndexElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2222    interface HTMLIsIndexElement : HTMLInputElement {
    2323        readonly attribute HTMLFormElement form;
    24         attribute [ConvertNullToNullString] DOMString prompt;
     24        attribute [Reflect] DOMString prompt;
    2525    };
    2626
  • trunk/WebCore/html/HTMLLIElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLLIElement : HTMLElement {
    23         attribute [ConvertNullToNullString] DOMString type;
    24         attribute long value;   
     23        attribute [Reflect] DOMString type;
     24        attribute [Reflect] long value;   
    2525    };
    2626
  • trunk/WebCore/html/HTMLLabelElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2323    interface HTMLLabelElement : HTMLElement {
    2424        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;
    2727        readonly attribute HTMLElement control;
    2828    };
  • trunk/WebCore/html/HTMLLegendElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2323    interface HTMLLegendElement : HTMLElement {
    2424        readonly attribute HTMLFormElement form;
    25         attribute [ConvertNullToNullString] DOMString accessKey;
    26         attribute [ConvertNullToNullString] DOMString align;
     25        attribute [Reflect] DOMString accessKey;
     26        attribute [Reflect] DOMString align;
    2727    };
    2828
  • trunk/WebCore/html/HTMLLinkElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    interface HTMLLinkElement : HTMLElement {
    24         attribute  boolean              disabled;
    25         attribute  [ConvertNullToNullString] DOMString            charset;
    26         attribute  [ConvertNullToNullString] DOMString            href;
    27         attribute  [ConvertNullToNullString] DOMString            hreflang;
    28         attribute  [ConvertNullToNullString] DOMString            media;
    29         attribute  [ConvertNullToNullString] DOMString            rel;
    30         attribute  [ConvertNullToNullString] DOMString            rev;
    31         attribute  [ConvertNullToNullString] DOMString            target;
    32         attribute  [ConvertNullToNullString] DOMString            type;
     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;
    3333
    3434        // DOM Level 2 Style
    35         readonly attribute StyleSheet   sheet;
     35        readonly attribute StyleSheet sheet;
    3636
    3737#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
  • trunk/WebCore/html/HTMLMapElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2323    interface HTMLMapElement : HTMLElement {
    2424        readonly attribute HTMLCollection areas;
    25         attribute [ConvertNullToNullString] DOMString name;
     25        attribute [Reflect] DOMString name;
    2626    };
    2727
  • trunk/WebCore/html/HTMLMediaElement.cpp

    r60657 r61413  
    20752075}
    20762076
     2077bool HTMLMediaElement::isURLAttribute(Attribute* attribute) const
     2078{
     2079    return attribute->name() == srcAttr;
     2080}
     2081
    20772082}
    20782083
  • trunk/WebCore/html/HTMLMediaElement.h

    r59773 r61413  
    175175
    176176    virtual void parseMappedAttribute(Attribute*);
     177    virtual bool isURLAttribute(Attribute*) const;
    177178    virtual void attach();
    178179
  • trunk/WebCore/html/HTMLMediaElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2010 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3131
    3232    // network state
    33     attribute DOMString src;
     33    attribute [ReflectURL] DOMString src;
    3434    readonly attribute DOMString currentSrc;
    3535   
     
    6767    readonly attribute TimeRanges seekable;
    6868    readonly attribute boolean ended;
    69     attribute boolean autoplay;
    70     attribute boolean loop;
     69    attribute [Reflect] boolean autoplay;
     70    attribute [Reflect] boolean loop;
    7171    [NeedsUserGestureCheck] void play();
    7272    [NeedsUserGestureCheck] void pause();
  • trunk/WebCore/html/HTMLMenuElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLMenuElement : HTMLElement {
    23         attribute boolean compact;
     23        attribute [Reflect] boolean compact;
    2424    };
    2525
  • trunk/WebCore/html/HTMLMetaElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLMetaElement : HTMLElement {
    23         attribute  [ConvertNullToNullString] DOMString    content;
    24         attribute  [ConvertNullToNullString] DOMString    httpEquiv;
    25         attribute  [ConvertNullToNullString] DOMString    name;
    26         attribute  [ConvertNullToNullString] DOMString    scheme;
     23        attribute [Reflect] DOMString content;
     24        attribute [Reflect=http_equiv] DOMString httpEquiv;
     25        attribute [Reflect] DOMString name;
     26        attribute [Reflect] DOMString scheme;
    2727    };
    2828
  • trunk/WebCore/html/HTMLModElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLModElement : HTMLElement {
    23         attribute [ConvertNullToNullString] DOMString cite;
    24         attribute [ConvertNullToNullString] DOMString dateTime;
     23        attribute [Reflect] DOMString cite;
     24        attribute [Reflect] DOMString dateTime;
    2525    };
    2626   
  • trunk/WebCore/html/HTMLOListElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLOListElement : HTMLElement {
    23         attribute boolean compact;
     23        attribute [Reflect] boolean compact;
    2424        attribute long start;
    25         attribute [ConvertNullToNullString] DOMString type;
     25        attribute [Reflect] DOMString type;
    2626    };
    2727
  • trunk/WebCore/html/HTMLObjectElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2727    ] HTMLObjectElement : HTMLElement {
    2828        readonly attribute HTMLFormElement form;
    29                  attribute [ConvertNullToNullString, Reflect] DOMString      code;
    30                  attribute [ConvertNullToNullString, Reflect] DOMString      align;
    31                  attribute [ConvertNullToNullString, Reflect] DOMString      archive;
    32                  attribute [ConvertNullToNullString, Reflect] DOMString      border;
    33                  attribute [ConvertNullToNullString, Reflect=codebase] DOMString      codeBase;
    34                  attribute [ConvertNullToNullString, Reflect=codetype] DOMString      codeType;
    35                  attribute [ConvertNullToNullString, ReflectURL] DOMString      data;
    36                  attribute boolean        declare;
    37                  attribute [ConvertNullToNullString, Reflect] DOMString      height;
    38                  attribute long            hspace;
    39                  attribute [ConvertNullToNullString, Reflect] DOMString      name;
    40                  attribute [ConvertNullToNullString, Reflect] DOMString      standby;
    41                  attribute [ConvertNullToNullString, Reflect] DOMString      type;
    42                  attribute [ConvertNullToNullString, Reflect=usemap] DOMString      useMap;
    43                  attribute long            vspace;
    44                  attribute [ConvertNullToNullString, Reflect] DOMString      width;
    45         readonly attribute boolean         willValidate;
     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;
    4646
    4747        // Introduced in DOM Level 2:
    48         readonly attribute [CheckFrameSecurity] Document        contentDocument;
     48        readonly attribute [CheckFrameSecurity] Document contentDocument;
    4949
    5050#if defined(ENABLE_SVG) && ENABLE_SVG
    5151#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);
    5453#endif
    5554#endif
     
    5756#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
    5857        // Objective-C extension:
    59         readonly attribute URL             absoluteImageURL;
     58        readonly attribute URL absoluteImageURL;
    6059#endif
    6160    };
  • trunk/WebCore/html/HTMLOptGroupElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLOptGroupElement : HTMLElement {
    23         attribute  boolean              disabled;
    24         attribute  [ConvertNullToNullString] DOMString            label;
     23        attribute [Reflect] boolean disabled;
     24        attribute [Reflect] DOMString label;
    2525    };
    2626
  • trunk/WebCore/html/HTMLOptionElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple, Inc.
     2 * Copyright (C) 2006, 2007, 2010 Apple, Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2424        GenerateNativeConverter
    2525    ] HTMLOptionElement : HTMLElement {
    26         readonly attribute  HTMLFormElement      form;
    27                  attribute  boolean              defaultSelected;
     26        readonly attribute HTMLFormElement form;
     27        attribute [Reflect=selected] boolean defaultSelected;
    2828#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    29                  attribute  [ConvertNullToNullString] DOMString            text
    30                      setter raises(DOMException);
     29        attribute [ConvertNullToNullString] DOMString text setter raises(DOMException);
    3130#else
    32         readonly attribute  DOMString            text;
     31        readonly attribute DOMString text;
    3332#endif
    34         readonly attribute  long                index;
    35                  attribute  boolean              disabled;
    36                  attribute  [ConvertNullToNullString] DOMString            label;
    37                  attribute  boolean              selected;
    38                  attribute  [ConvertNullToNullString] DOMString            value;
     33        readonly attribute long index;
     34        attribute [Reflect] boolean disabled;
     35        attribute [Reflect] DOMString label;
     36        attribute boolean selected;
     37        attribute [ConvertNullToNullString] DOMString value;
    3938    };
    4039
  • trunk/WebCore/html/HTMLParagraphElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLParagraphElement : HTMLElement {
    23         attribute [ConvertNullToNullString] DOMString align;
     23        attribute [Reflect] DOMString align;
    2424    };
    2525
  • trunk/WebCore/html/HTMLParamElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    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;
    2727    };
    2828
  • trunk/WebCore/html/HTMLPreElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All right reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2424        // FIXME: DOM spec says that width should be of type DOMString
    2525        // see http://bugs.webkit.org/show_bug.cgi?id=8992
    26         attribute long width;
     26        attribute [Reflect] long width;
    2727       
    2828        // Extensions
    29         attribute boolean wrap;
     29        attribute [Reflect] boolean wrap;
    3030    };
    3131
  • trunk/WebCore/html/HTMLQuoteElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222    interface HTMLQuoteElement : HTMLElement {
    23         attribute [ConvertNullToNullString] DOMString cite;
     23        attribute [Reflect] DOMString cite;
    2424    };
    2525}
  • trunk/WebCore/html/HTMLScriptElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2222    interface HTMLScriptElement : HTMLElement {
    2323        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;
    3030    };
    3131}
  • trunk/WebCore/html/HTMLStyleElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    interface HTMLStyleElement : HTMLElement {
    24         attribute  boolean              disabled;
    25         attribute  [ConvertNullToNullString] DOMString            media;
    26         attribute  [ConvertNullToNullString] DOMString            type;
     24        attribute boolean disabled;
     25        attribute [Reflect] DOMString media;
     26        attribute [Reflect] DOMString type;
    2727
    2828        // DOM Level 2 Style
  • trunk/WebCore/html/HTMLTableCaptionElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc.
     2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2424        GenerateNativeConverter
    2525    ] HTMLTableCaptionElement : HTMLElement {
    26 
    27         attribute [ConvertNullToNullString] DOMString       align;
    28 
     26        attribute [Reflect] DOMString align;
    2927    };
    3028
  • trunk/WebCore/html/HTMLTableCellElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc.
     2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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;
    4139    };
    4240
  • trunk/WebCore/html/HTMLTableColElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc.
     2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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;
    3230    };
    3331
  • trunk/WebCore/html/HTMLTableElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc.
     2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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);
    3227
    3328        readonly attribute HTMLCollection rows;
    3429        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;
    4035
    41         // FIXME: the obj-c attribute is called frameBorders
    42                  attribute [ConvertNullToNullString] DOMString frame;
     36        attribute [Reflect] DOMString frame;
    4337
    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;
    4741
    48         HTMLElement        createTHead();
    49         void               deleteTHead();
     42        HTMLElement createTHead();
     43        void deleteTHead();
    5044        HTMLElement        createTFoot();
    51         void               deleteTFoot();
    52         HTMLElement        createCaption();
    53         void               deleteCaption();
     45        void deleteTFoot();
     46        HTMLElement createCaption();
     47        void deleteCaption();
    5448
    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);
    6151    };
    6252
  • trunk/WebCore/html/HTMLTableRowElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc.
     2 * Copyright (C) 2006, 2007, 2010 Apple Inc. ALl rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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);
    3934    };
    4035
  • trunk/WebCore/html/HTMLTableSectionElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc.
     2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2424        GenerateNativeConverter
    2525    ] 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);
    3833    };
    3934
  • trunk/WebCore/html/HTMLTextAreaElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    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;
    4340
    44         readonly attribute boolean         willValidate;
    45         readonly attribute DOMString       validationMessage;
    46         boolean  checkValidity();
    47         void     setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
     41        void select();
    4842
    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;
    5251        void setSelectionRange(in long start, in long end);
    53         readonly attribute  NodeList              labels;
     52        readonly attribute NodeList labels;
    5453    };
    5554
  • trunk/WebCore/html/HTMLUListElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2222    interface HTMLUListElement : HTMLElement {
    2323        attribute boolean compact;
    24         attribute [ConvertNullToNullString] DOMString type;
     24        attribute [Reflect] DOMString type;
    2525    };
    2626
  • trunk/WebCore/html/HTMLVideoElement.cpp

    r61293 r61413  
    178178}
    179179
    180 bool HTMLVideoElement::isURLAttribute(Attribute* attr) const
    181 {
    182     return attr->name() == posterAttr;
     180bool HTMLVideoElement::isURLAttribute(Attribute* attribute) const
     181{
     182    return HTMLMediaElement::isURLAttribute(attribute)
     183        || attribute->name() == posterAttr;
    183184}
    184185
     
    259260
    260261}
    261 #endif
     262
     263#endif
  • trunk/WebCore/html/HTMLVideoElement.idl

    r61384 r61413  
    11/*
    2  * Copyright (C) 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2010 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2929        GenerateNativeConverter
    3030    ] HTMLVideoElement : HTMLMediaElement {
    31         attribute unsigned long width;
    32         attribute unsigned long height;
     31        attribute [Reflect] unsigned long width;
     32        attribute [Reflect] unsigned long height;
    3333        readonly attribute unsigned long videoWidth;
    3434        readonly attribute unsigned long videoHeight;
    35                  attribute [ConvertNullToNullString] DOMString poster;
     35        attribute [ReflectURL] DOMString poster;
    3636
    3737        readonly attribute boolean webkitSupportsFullscreen;
    3838        readonly attribute boolean webkitDisplayingFullscreen;
    3939
    40         [NeedsUserGestureCheck] void webkitEnterFullscreen()
    41             raises (DOMException);
     40        [NeedsUserGestureCheck] void webkitEnterFullscreen() raises (DOMException);
    4241        void webkitExitFullscreen();
    4342   
    44         [NeedsUserGestureCheck] void webkitEnterFullScreen()
    45             raises (DOMException);
     43        [NeedsUserGestureCheck] void webkitEnterFullScreen() raises (DOMException);
    4644        void webkitExitFullScreen();
    47 
    4845    };
    4946}
  • trunk/WebCore/svg/SVGElement.idl

    r61384 r61413  
    2424
    2525    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);
    3028        readonly attribute SVGSVGElement ownerSVGElement;
    3129        readonly attribute SVGElement viewportElement;
Note: See TracChangeset for help on using the changeset viewer.