Changeset 58633 in webkit
- Timestamp:
- May 1, 2010 3:40:45 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r58631 r58633 1 2010-05-01 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Oliver Hunt. 4 5 [GTK] GObject DOM bindings 6 https://bugs.webkit.org/show_bug.cgi?id=33590 7 8 Unify more logic to skip functions into SkipFunction, and 9 whitelist the two [Custom] methods in HTMLCollection.idl. 10 11 * bindings/scripts/CodeGeneratorGObject.pm: 12 1 13 2010-05-01 Robert Hogan <robert@webkit.org> 2 14 -
trunk/WebCore/bindings/scripts/CodeGeneratorGObject.pm
r58510 r58633 178 178 sub SkipFunction { 179 179 my $function = shift; 180 181 # FIXME: skip all custom methods; is this ok? 182 if ($function->signature->extendedAttributes->{"Custom"}) { 180 my $decamelize = shift; 181 my $prefix = shift; 182 183 my $functionName = "webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name); 184 my $isCustomFunction = $function->signature->extendedAttributes->{"Custom"} || 185 $function->signature->extendedAttributes->{"CustomArgumentHandling"}; 186 187 if ($isCustomFunction && 188 $functionName ne "webkit_dom_node_replace_child" && 189 $functionName ne "webkit_dom_node_insert_before" && 190 $functionName ne "webkit_dom_node_replace_child" && 191 $functionName ne "webkit_dom_node_append_child" && 192 $functionName ne "webkit_dom_html_collection_item" && 193 $functionName ne "webkit_dom_html_collection_named_item") { 183 194 return 1; 184 195 } … … 679 690 my ($object, $interfaceName, $function, $prefix) = @_; 680 691 681 if (SkipFunction($function)) { 692 my $decamelize = FixUpDecamelizedName(decamelize($interfaceName)); 693 694 if (SkipFunction($function, $decamelize, $prefix)) { 682 695 return; 683 696 } … … 685 698 my $functionSigName = $function->signature->name; 686 699 my $functionSigType = $function->signature->type; 687 my $decamelize = FixUpDecamelizedName(decamelize($interfaceName));688 700 my $functionName = "webkit_dom_" . $decamelize . "_" . $prefix . decamelize($functionSigName); 689 701 my $returnType = GetGlibTypeName($functionSigType); … … 734 746 735 747 $implIncludes{"${functionSigType}.h"} = 1; 736 }737 738 # skip custom functions for now739 # but skip from here to allow some headers to be created740 # for a successful compile.741 if ($isCustomFunction &&742 $functionName ne "webkit_dom_node_remove_child" &&743 $functionName ne "webkit_dom_node_insert_before" &&744 $functionName ne "webkit_dom_node_replace_child" &&745 $functionName ne "webkit_dom_node_append_child") {746 push(@hBody, "\n/* TODO: custom function ${functionName} */\n\n");747 push(@cBody, "\n/* TODO: custom function ${functionName} */\n\n");748 return;749 748 } 750 749 … … 808 807 my $assignPost = ""; 809 808 810 if ($returnType ne "void" && !$isCustomFunction) { 809 # We need to special-case these Node methods because their C++ 810 # signature is different from what we'd expect given their IDL 811 # description; see Node.h. 812 my $functionHasCustomReturn = $functionName eq "webkit_dom_node_append_child" || 813 $functionName eq "webkit_dom_node_insert_before" || 814 $functionName eq "webkit_dom_node_replace_child" || 815 $functionName eq "webkit_dom_node_remove_child"; 816 817 if ($returnType ne "void" && !$functionHasCustomReturn) { 811 818 if ($returnValueIsGDOMType) { 812 819 $assign = "PassRefPtr<WebCore::${functionSigType}> g_res = "; … … 827 834 } 828 835 829 # We need to special-case these Node methods because their C++ signature is different 830 # from what we'd expect given their IDL description; see Node.h. 831 if ($functionName eq "webkit_dom_node_append_child" || 832 $functionName eq "webkit_dom_node_insert_before" || 833 $functionName eq "webkit_dom_node_replace_child" || 834 $functionName eq "webkit_dom_node_remove_child") { 836 if ($functionHasCustomReturn) { 835 837 my $customNodeAppendChild = << "EOF"; 836 838 bool ok = item->${functionSigName}(${callImplParams}${exceptions}); … … 899 901 } 900 902 901 if ($returnType ne "void" && !$ isCustomFunction) {903 if ($returnType ne "void" && !$functionHasCustomReturn) { 902 904 if ($functionSigType ne "DOMObject") { 903 905 if ($returnValueIsGDOMType) { -
trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
r58540 r58633 32 32 #include "webkit/WebKitDOMTestObj.h" 33 33 #include "webkit/WebKitDOMTestObjPrivate.h" 34 #include "webkit/WebKitDOMlog.h"35 #include "webkit/WebKitDOMlogPrivate.h"36 34 #include "webkitmarshal.h" 37 35 #include "webkitprivate.h" … … 152 150 153 151 } 154 155 156 /* TODO: custom function webkit_dom_test_obj_custom_args_and_exception */157 152 158 153 -
trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
r58504 r58633 70 70 WEBKIT_API void 71 71 webkit_dom_test_obj_method_with_exception (WebKitDOMTestObj *self, GError **error); 72 73 74 /* TODO: custom function webkit_dom_test_obj_custom_args_and_exception */75 72 76 73
Note: See TracChangeset
for help on using the changeset viewer.