From 32b26b25cd59ce59705e0326dacaec8541813178 Mon Sep 17 00:00:00 2001 From: "xan@webkit.org" Date: Mon, 26 Sep 2011 22:28:31 +0000 Subject: [PATCH] [GTK] Do not ignore 'Replaceable' attributes in the DOM bindings https://bugs.webkit.org/show_bug.cgi?id=68837 Reviewed by Martin Robinson. * bindings/scripts/CodeGeneratorGObject.pm: add getters (but not setters) for 'Replaceable' attributes. Punt for the future actually making them settable, since it seems non trivial. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96009 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 11 +++++++++++ Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm | 17 +++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 9b30e81..b9d95c1 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,14 @@ +2011-09-26 Xan Lopez + + [GTK] Do not ignore 'Replaceable' attributes in the DOM bindings + https://bugs.webkit.org/show_bug.cgi?id=68837 + + Reviewed by Martin Robinson. + + * bindings/scripts/CodeGeneratorGObject.pm: add getters (but not + setters) for 'Replaceable' attributes. Punt for the future + actually making them settable, since it seems non trivial. + 2011-09-26 Ryosuke Niwa Leopard build fix. diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm b/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm index 0af0bcf..743c906 100644 --- a/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm +++ b/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm @@ -155,11 +155,10 @@ sub SkipAttribute { my $attribute = shift; if ($attribute->signature->extendedAttributes->{"CustomGetter"} || - $attribute->signature->extendedAttributes->{"CustomSetter"} || - $attribute->signature->extendedAttributes->{"Replaceable"}) { + $attribute->signature->extendedAttributes->{"CustomSetter"}) { return 1; } - + my $propType = $attribute->signature->type; if ($propType =~ /Constructor$/) { return 1; @@ -307,7 +306,10 @@ sub GetWriteableProperties { $gtype eq "uint64" || $gtype eq "ulong" || $gtype eq "long" || $gtype eq "uint" || $gtype eq "ushort" || $gtype eq "uchar" || $gtype eq "char" || $gtype eq "string"); - if ($writeable && $hasGtypeSignature) { + # FIXME: We are not generating setters for 'Replaceable' + # attributes now, but we should somehow. + my $replaceable = $property->signature->extendedAttributes->{"Replaceable"}; + if ($writeable && $hasGtypeSignature && !$replaceable) { push(@result, $property); } } @@ -1039,8 +1041,11 @@ sub GenerateFunctions { $function->signature($attribute->signature); $function->raisesExceptions($attribute->getterExceptions); $object->GenerateFunction($interfaceName, $function, "get_"); - - if ($attribute->type =~ /^readonly/) { + + # FIXME: We are not generating setters for 'Replaceable' + # attributes now, but we should somehow. + if ($attribute->type =~ /^readonly/ || + $attribute->signature->extendedAttributes->{"Replaceable"}) { next TOP; } -- 2.7.4