WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
133983
[GTK] Add support for constants in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=133983
Summary
[GTK] Add support for constants in GObject DOM bindings
Carlos Garcia Campos
Reported
2014-06-17 08:16:40 PDT
We don't expose any constant.
Attachments
Patch
(6.36 KB, patch)
2014-06-17 08:19 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Updated patch
(14.54 KB, patch)
2014-06-20 01:57 PDT
,
Carlos Garcia Campos
mrobinson
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2014-06-17 08:19:17 PDT
Created
attachment 233230
[details]
Patch The support for constants in .symbols files and the docs is added in
bug #93002
, I'll update this patch once that bug is fixed.
Carlos Garcia Campos
Comment 2
2014-06-20 01:57:53 PDT
Created
attachment 233415
[details]
Updated patch Patch updated now that both
bug #133726
and #93002 are fixed.
Martin Robinson
Comment 3
2014-06-25 09:29:01 PDT
Comment on
attachment 233415
[details]
Updated patch View in context:
https://bugs.webkit.org/attachment.cgi?id=233415&action=review
> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:896 > + push(@hBody, $implContent); > + > + if ($isStableClass) { > + push(@symbols, "GType ${lowerCaseIfaceName}_get_type(void)\n"); > + } > + > + if (@{$interface->constants}) { > + my @constants = @{$interface->constants}; > + foreach my $constant (@constants) { > + my $conditionalString = $codeGenerator->GenerateConditionalString($constant); > + my $constantName = "WEBKIT_DOM_${clsCaps}_" . $constant->name; > + my $constantValue = $constant->value; > + my $isStableSymbol = grep {$_ eq $constantName} @stableSymbols; > + if ($isStableSymbol) { > + push(@symbols, "$constantName\n"); > + } > + > + my @constantHeader = (); > + push(@constantHeader, "#if ${conditionalString}") if $conditionalString; > + push(@constantHeader, "/**"); > + push(@constantHeader, " * ${constantName}:"); > + push(@constantHeader, " */"); > + push(@constantHeader, "#define $constantName $constantValue"); > + push(@constantHeader, "#endif /* ${conditionalString} */") if $conditionalString; > + push(@constantHeader, "\n"); > + > + if ($isStableSymbol or !$isStableClass) { > + push(@hBody, join("\n", @constantHeader)); > + } else { > + push(@hBodyUnstable, join("\n", @constantHeader)); > + } > + } > + } > +
I think it makes sense to move this to a helper. We don't do that a lot, but these files need serious cleanup.
Carlos Garcia Campos
Comment 4
2014-06-26 00:46:12 PDT
Committed
r170475
: <
http://trac.webkit.org/changeset/170475
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug