[GTK] Readonly attributes installed as readwrite in GObject DOM bindings
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Apr 2014 07:28:14 +0000 (07:28 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Apr 2014 07:28:14 +0000 (07:28 +0000)
commite49dc1987fdf5187bcaec7b56c8fe972fe9a9fd9
tree0011ca1c4b45b34413570055bedefdc4c827d174
parent8b68ba2d604f8f2381bd6e953ef7d6158025f0f6
[GTK] Readonly attributes installed as readwrite in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=130978

Reviewed by Carlos Garcia Campos.

Unify how we decide if an attribute is readable or writeable and improve the code.
This results in some attributes now being marked as read-only which didn't have
corresponding case statements in the set_property switch statements and also correctly
installs set_property support for some more POD types.

* bindings/scripts/CodeGeneratorGObject.pm:
(IsPropertyReadable): Added this helper to simplify deciding if an attribute is readable.
(IsPropertyWriteable): Added this helper to simplify deciding if an attribute is writeable. Also
update the list of types to reflect the full list of types we can generate setters for.
(GenerateProperty): Use the IsPropertyWriteable helper instead of checking whether the attribute is read-only.
Also fix generation of the blurb by using $mutableString instead of $mutableStringconst which isn't used.
(GenerateProperties): Use grep and the new helpers to simplify the code.
(GetReadableProperties): Deleted.
(GetWriteableProperties): Deleted.
* bindings/scripts/test/GObject: Update results

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp