Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (115377 => 115378)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-04-26 22:10:07 UTC (rev 115377)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-04-26 22:25:35 UTC (rev 115378)
@@ -1,3 +1,24 @@
+2012-04-26 Zan Dobersek <[email protected]>
+
+ [Gtk] WebKitGTK+ 1.8.1 fails to build when disabling HTML Video feature
+ https://bugs.webkit.org/show_bug.cgi?id=84838
+
+ Reviewed by Martin Robinson.
+
+ Wrap WebCore objects and functions in GObject property setters and getters
+ with conditional guards (if present) to avoid compilation errors.
+
+ No new tests - changes covered by existing bindings tests.
+
+ * bindings/scripts/CodeGeneratorGObject.pm:
+ (GenerateProperty):
+ (GenerateProperties):
+ * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Rebaseline.
+ (webkit_dom_test_interface_set_property):
+ (webkit_dom_test_interface_get_property):
+ * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: Ditto.
+ (webkit_dom_test_serialized_script_value_interface_get_property):
+
2012-04-22 Martin Robinson <[email protected]>
REGRESSION(113604): [Soup] Some pages that use synchronous XMLHttpRequests freeze the browser
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (115377 => 115378)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2012-04-26 22:10:07 UTC (rev 115377)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2012-04-26 22:25:35 UTC (rev 115378)
@@ -380,8 +380,11 @@
my $attribute = shift;
my $interfaceName = shift;
my @writeableProperties = @{shift @_};
+ my $parentNode = shift;
my $conditionalString = GenerateConditionalString($attribute->signature);
+ my $parentConditionalString = GenerateConditionalString($parentNode);
+ my @parentConditionalWarn = GenerateConditionalWarning($parentNode);
my $camelPropName = $attribute->signature->name;
my $setPropNameFunction = $codeGenerator->WK_ucfirst($camelPropName);
my $getPropNameFunction = $codeGenerator->WK_lcfirst($camelPropName);
@@ -443,14 +446,19 @@
if (grep {$_ eq $attribute} @writeableProperties) {
push(@txtSetProps, "#if ${conditionalString}\n") if $conditionalString;
push(@txtSetProps, " case ${propEnum}:\n {\n");
+ push(@txtSetProps, "#if ${parentConditionalString}\n") if $parentConditionalString;
push(@txtSetProps, " WebCore::ExceptionCode ec = 0;\n") if @{$attribute->setterExceptions};
push(@txtSetProps, " ${setterFunctionName}(" . join(", ", @setterArguments) . ");\n");
+ push(@txtSetProps, "#else\n") if $parentConditionalString;
+ push(@txtSetProps, @parentConditionalWarn) if scalar(@parentConditionalWarn);
+ push(@txtSetProps, "#endif /* ${parentConditionalString} */\n") if $parentConditionalString;
push(@txtSetProps, " break;\n }\n");
push(@txtSetProps, "#endif /* ${conditionalString} */\n") if $conditionalString;
}
push(@txtGetProps, "#if ${conditionalString}\n") if $conditionalString;
push(@txtGetProps, " case ${propEnum}:\n {\n");
+ push(@txtGetProps, "#if ${parentConditionalString}\n") if $parentConditionalString;
push(@txtGetProps, " WebCore::ExceptionCode ec = 0;\n") if @{$attribute->getterExceptions};
my $postConvertFunction = "";
@@ -480,6 +488,9 @@
}
}
+ push(@txtGetProps, "#else\n") if $parentConditionalString;
+ push(@txtGetProps, @parentConditionalWarn) if scalar(@parentConditionalWarn);
+ push(@txtGetProps, "#endif /* ${parentConditionalString} */\n") if $parentConditionalString;
push(@txtGetProps, " break;\n }\n");
push(@txtGetProps, "#endif /* ${conditionalString} */\n") if $conditionalString;
@@ -551,7 +562,9 @@
${className}* self = WEBKIT_DOM_${clsCaps}(object);
$privFunction
EOF
+ push(@txtGetProps, "$conditionGuardStart\n") if $conditionGuardStart;
push(@txtGetProps, $txtGetProp);
+ push(@txtGetProps, "$conditionGuardEnd\n") if $conditionGuardEnd;
}
$txtGetProp = << "EOF";
@@ -573,7 +586,9 @@
${className}* self = WEBKIT_DOM_${clsCaps}(object);
$privFunction
EOF
+ push(@txtSetProps, "$conditionGuardStart\n") if $conditionGuardStart;
push(@txtSetProps, $txtSetProps);
+ push(@txtSetProps, "$conditionGuardEnd\n") if $conditionGuardEnd;
}
$txtSetProps = << "EOF";
@@ -584,7 +599,7 @@
foreach my $attribute (@readableProperties) {
if ($attribute->signature->type ne "EventListener" &&
$attribute->signature->type ne "MediaQueryListListener") {
- GenerateProperty($attribute, $interfaceName, \@writeableProperties);
+ GenerateProperty($attribute, $interfaceName, \@writeableProperties, $dataNode);
}
}
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp (115377 => 115378)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp 2012-04-26 22:10:07 UTC (rev 115377)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp 2012-04-26 22:25:35 UTC (rev 115378)
@@ -114,13 +114,20 @@
static void webkit_dom_test_interface_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) || ENABLE(Condition2)
WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object);
WebCore::TestInterface* coreSelf = WebKit::core(self);
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
switch (prop_id) {
#if ENABLE(Condition11) || ENABLE(Condition12)
case PROP_SUPPLEMENTAL_STR2:
{
+#if ENABLE(Condition1) || ENABLE(Condition2)
TestSupplemental::setSupplementalStr2(coreSelf, WTF::String::fromUTF8(g_value_get_string(value)));
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
+#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
break;
}
#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
@@ -134,20 +141,32 @@
static void webkit_dom_test_interface_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) || ENABLE(Condition2)
WebKitDOMTestInterface* self = WEBKIT_DOM_TEST_INTERFACE(object);
WebCore::TestInterface* coreSelf = WebKit::core(self);
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
switch (prop_id) {
#if ENABLE(Condition11) || ENABLE(Condition12)
case PROP_SUPPLEMENTAL_STR1:
{
+#if ENABLE(Condition1) || ENABLE(Condition2)
g_value_take_string(value, convertToUTF8String(TestSupplemental::supplementalStr1(coreSelf)));
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
+#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
break;
}
#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
#if ENABLE(Condition11) || ENABLE(Condition12)
case PROP_SUPPLEMENTAL_STR2:
{
+#if ENABLE(Condition1) || ENABLE(Condition2)
g_value_take_string(value, convertToUTF8String(TestSupplemental::supplementalStr2(coreSelf)));
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
+#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
break;
}
#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp (115377 => 115378)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp 2012-04-26 22:10:07 UTC (rev 115377)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp 2012-04-26 22:25:35 UTC (rev 115378)
@@ -122,31 +122,53 @@
static void webkit_dom_test_serialized_script_value_interface_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
WebCore::JSMainThreadNullState state;
+#if ENABLE(Condition1) || ENABLE(Condition2)
WebKitDOMTestSerializedScriptValueInterface* self = WEBKIT_DOM_TEST_SERIALIZED_SCRIPT_VALUE_INTERFACE(object);
WebCore::TestSerializedScriptValueInterface* coreSelf = WebKit::core(self);
+#endif // ENABLE(Condition1) || ENABLE(Condition2)
switch (prop_id) {
case PROP_VALUE:
{
+#if ENABLE(Condition1) || ENABLE(Condition2)
RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->value();
g_value_set_object(value, WebKit::kit(ptr.get()));
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
+#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
break;
}
case PROP_READONLY_VALUE:
{
+#if ENABLE(Condition1) || ENABLE(Condition2)
RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->readonlyValue();
g_value_set_object(value, WebKit::kit(ptr.get()));
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
+#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
break;
}
case PROP_CACHED_VALUE:
{
+#if ENABLE(Condition1) || ENABLE(Condition2)
RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->cachedValue();
g_value_set_object(value, WebKit::kit(ptr.get()));
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
+#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
break;
}
case PROP_CACHED_READONLY_VALUE:
{
+#if ENABLE(Condition1) || ENABLE(Condition2)
RefPtr<WebCore::SerializedScriptValue> ptr = coreSelf->cachedReadonlyValue();
g_value_set_object(value, WebKit::kit(ptr.get()));
+#else
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
+ WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
+#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
break;
}
default: