summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/make_settings.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/page/make_settings.pl')
-rwxr-xr-xSource/WebCore/page/make_settings.pl26
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/WebCore/page/make_settings.pl b/Source/WebCore/page/make_settings.pl
index b01c1f7b3..34c279f81 100755
--- a/Source/WebCore/page/make_settings.pl
+++ b/Source/WebCore/page/make_settings.pl
@@ -14,7 +14,7 @@
# THIS SOFTWARE IS PROVIDED BY GOOGLE, INC. `AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -24,6 +24,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
use strict;
+use FindBin;
+use lib "$FindBin::Bin/../bindings/scripts";
use InFilesCompiler;
@@ -239,12 +241,18 @@ sub printGetterAndSetter($$$$)
{
my ($file, $settingName, $type, $setNeedsStyleRecalcInAllFrames) = @_;
my $setterFunctionName = setterFunctionName($settingName);
+
+ my $webcoreExport = "";
+ if ($setNeedsStyleRecalcInAllFrames) {
+ $webcoreExport = "WEBCORE_EXPORT"; # Export is only needed if the definition is not in the header.
+ }
+
if (lc(substr($type, 0, 1)) eq substr($type, 0, 1)) {
print $file " $type $settingName() const { return m_$settingName; } \\\n";
- print $file " void $setterFunctionName($type $settingName)";
+ print $file " $webcoreExport void $setterFunctionName($type $settingName)";
} else {
- print $file " const $type& $settingName() { return m_$settingName; } \\\n";
- print $file " void $setterFunctionName(const $type& $settingName)";
+ print $file " const $type& $settingName() const { return m_$settingName; } \\\n";
+ print $file " $webcoreExport void $setterFunctionName(const $type& $settingName)";
}
if ($setNeedsStyleRecalcInAllFrames) {
print $file "; \\\n";
@@ -353,6 +361,7 @@ sub generateInternalSettingsIdlFile($)
print $file "[\n";
print $file " NoInterfaceObject,\n";
+ print $file " ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,\n";
print $file "] interface InternalSettingsGenerated {\n";
sub writeIdlSetter($$$) {
@@ -361,7 +370,7 @@ sub generateInternalSettingsIdlFile($)
my $type = $parsedItems{$settingName}{"type"};
my $idlType = $webcoreTypeToIdlType{$type};
my $setterFunctionName = setterFunctionName($settingName);
- print $file " void $setterFunctionName(in $idlType $settingName);\n";
+ print $file " void $setterFunctionName($idlType $settingName);\n";
};
enumerateParsedItems($file, $parsedItemsRef, \&writeIdlSetter);
@@ -380,11 +389,9 @@ sub generateInternalSettingsHeaderFile($)
print $file $InCompiler->license();
print $file <<EOF;
-#ifndef InternalSettingsGenerated_h
-#define InternalSettingsGenerated_h
+#pragma once
-#include "RefCountedSupplement.h"
-#include <wtf/PassRefPtr.h>
+#include "Supplementable.h"
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
@@ -432,7 +439,6 @@ EOF
print $file "};\n\n";
print $file "} // namespace WebCore\n";
- print $file "#endif // InternalSettingsGenerated_h\n";
close $file;
}