Diff
Modified: trunk/Source/WebCore/ChangeLog (149169 => 149170)
--- trunk/Source/WebCore/ChangeLog 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/ChangeLog 2013-04-26 07:29:19 UTC (rev 149170)
@@ -1,3 +1,53 @@
+2013-04-26 Christophe Dumez <[email protected]>
+
+ Add support for Web IDL partial interfaces to the bindings generator
+ https://bugs.webkit.org/show_bug.cgi?id=115228
+
+ Reviewed by Kentaro Hara.
+
+ Add support for Web IDL partial interfaces to the bindings generator:
+ http://dev.w3.org/2006/webapi/WebIDL/#dfn-partial-interface
+
+ Also drop support for the the WebKit-specific [Supplemental] extended
+ attribute and use partial interfaces instead in existing IDL files.
+
+ No new tests, no behavior change.
+
+ * Modules/battery/NavigatorBattery.idl:
+ * Modules/filesystem/DOMWindowFileSystem.idl:
+ * Modules/filesystem/DataTransferItemFileSystem.idl:
+ * Modules/filesystem/HTMLInputElementFileSystem.idl:
+ * Modules/filesystem/WorkerContextFileSystem.idl:
+ * Modules/gamepad/NavigatorGamepad.idl:
+ * Modules/geolocation/NavigatorGeolocation.idl:
+ * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
+ * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
+ * Modules/mediastream/DOMWindowMediaStream.idl:
+ * Modules/mediastream/NavigatorMediaStream.idl:
+ * Modules/navigatorcontentutils/NavigatorContentUtils.idl:
+ * Modules/networkinfo/NavigatorNetworkInfoConnection.idl:
+ * Modules/notifications/DOMWindowNotifications.idl:
+ * Modules/notifications/WorkerContextNotifications.idl:
+ * Modules/quota/DOMWindowQuota.idl:
+ * Modules/quota/NavigatorStorageQuota.idl:
+ * Modules/quota/WorkerNavigatorStorageQuota.idl:
+ * Modules/speech/DOMWindowSpeech.idl:
+ * Modules/speech/DOMWindowSpeechSynthesis.idl:
+ * Modules/vibration/NavigatorVibration.idl:
+ * Modules/webaudio/DOMWindowWebAudio.idl:
+ * Modules/webdatabase/DOMWindowWebDatabase.idl:
+ * Modules/webdatabase/WorkerContextWebDatabase.idl:
+ * Modules/websockets/DOMWindowWebSocket.idl:
+ * Modules/websockets/WorkerContextWebSocket.idl:
+ * bindings/scripts/IDLAttributes.txt:
+ * bindings/scripts/IDLParser.pm:
+ (parsePartialDefinition):
+ * bindings/scripts/generate-bindings.pl:
+ * bindings/scripts/preprocess-idls.pl:
+ (getPartialInterfaceNameFromIDLFile):
+ * bindings/scripts/test/TestSupplemental.idl:
+ * page/DOMWindowPagePopup.idl:
+
2013-04-25 Mihnea Ovidenie <[email protected]>
[CSS Regions] Hit testing is broken for absolutely positioned regions that have overflow: hidden
Modified: trunk/Source/WebCore/Modules/battery/NavigatorBattery.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/battery/NavigatorBattery.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/battery/NavigatorBattery.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,8 +19,7 @@
[
Conditional=BATTERY_STATUS,
- Supplemental=Navigator
-] interface NavigatorBattery {
+] partial interface Navigator {
readonly attribute BatteryManager webkitBattery;
};
Modified: trunk/Source/WebCore/Modules/filesystem/DOMWindowFileSystem.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/filesystem/DOMWindowFileSystem.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/filesystem/DOMWindowFileSystem.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=FILE_SYSTEM,
- Supplemental=DOMWindow
-] interface DOMWindowFileSystem {
+] partial interface DOMWindow {
const unsigned short TEMPORARY = 0;
const unsigned short PERSISTENT = 1;
Modified: trunk/Source/WebCore/Modules/filesystem/DataTransferItemFileSystem.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/filesystem/DataTransferItemFileSystem.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/filesystem/DataTransferItemFileSystem.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -30,8 +30,7 @@
[
Conditional=DATA_TRANSFER_ITEMS&FILE_SYSTEM,
- Supplemental=DataTransferItem
-] interface DataTransferItemFileSystem {
+] partial interface DataTransferItem {
[CallWith=ScriptExecutionContext] Entry webkitGetAsEntry();
};
Modified: trunk/Source/WebCore/Modules/filesystem/HTMLInputElementFileSystem.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/filesystem/HTMLInputElementFileSystem.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/filesystem/HTMLInputElementFileSystem.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -30,8 +30,7 @@
[
Conditional=FILE_SYSTEM,
- Supplemental=HTMLInputElement
-] interface HTMLInputElementFileSystem {
+] partial interface HTMLInputElement {
[CallWith=ScriptExecutionContext] readonly attribute EntryArray webkitEntries;
};
Modified: trunk/Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=FILE_SYSTEM,
- Supplemental=WorkerContext
-] interface WorkerContextFileSystem {
+] partial interface WorkerContext {
const unsigned short TEMPORARY = 0;
const unsigned short PERSISTENT = 1;
Modified: trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/gamepad/NavigatorGamepad.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,8 +19,7 @@
[
Conditional=GAMEPAD,
- Supplemental=Navigator
-] interface NavigatorGamepad {
+] partial interface Navigator {
GamepadList webkitGetGamepads();
};
Modified: trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,8 +19,7 @@
[
Conditional=GEOLOCATION,
- Supplemental=Navigator
-] interface NavigatorGeolocation {
+] partial interface Navigator {
readonly attribute Geolocation geolocation;
};
Modified: trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=INDEXED_DATABASE,
- Supplemental=DOMWindow
-] interface DOMWindowIndexedDatabase {
+] partial interface DOMWindow {
[ImplementedAs=indexedDB] readonly attribute IDBFactory webkitIndexedDB;
attribute IDBCursorConstructor webkitIDBCursor;
Modified: trunk/Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=INDEXED_DATABASE,
- Supplemental=WorkerContext
-] interface WorkerContextIndexedDatabase {
+] partial interface WorkerContext {
[ImplementedAs=indexedDB] readonly attribute IDBFactory webkitIndexedDB;
attribute IDBCursorConstructor webkitIDBCursor;
Modified: trunk/Source/WebCore/Modules/mediastream/DOMWindowMediaStream.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/mediastream/DOMWindowMediaStream.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/mediastream/DOMWindowMediaStream.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=MEDIA_STREAM,
- Supplemental=DOMWindow
-] interface DOMWindowMediaStream {
+] partial interface DOMWindow {
attribute MediaStreamConstructor webkitMediaStream;
attribute RTCPeerConnectionConstructor webkitRTCPeerConnection;
attribute RTCSessionDescriptionConstructor RTCSessionDescription;
Modified: trunk/Source/WebCore/Modules/mediastream/NavigatorMediaStream.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorMediaStream.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorMediaStream.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,8 +19,7 @@
[
Conditional=MEDIA_STREAM,
- Supplemental=Navigator
-] interface NavigatorMediaStream {
+] partial interface Navigator {
void webkitGetUserMedia(in Dictionary options,
in [Callback] NavigatorUserMediaSuccessCallback successCallback,
in [Callback, Optional] NavigatorUserMediaErrorCallback errorCallback)
Modified: trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,9 +19,7 @@
*/
// http://www.w3.org/TR/html5/system-state-and-capabilities.html#custom-handlers
-[
- Supplemental=Navigator
-] interface NavigatorContentUtils {
+partial interface Navigator {
[Conditional=NAVIGATOR_CONTENT_UTILS] void registerProtocolHandler(in DOMString scheme, in DOMString url, in DOMString title)
raises(DOMException);
[Conditional=NAVIGATOR_CONTENT_UTILS&CUSTOM_SCHEME_HANDLER] DOMString isProtocolHandlerRegistered(in DOMString scheme, in DOMString url)
Modified: trunk/Source/WebCore/Modules/networkinfo/NavigatorNetworkInfoConnection.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/networkinfo/NavigatorNetworkInfoConnection.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/networkinfo/NavigatorNetworkInfoConnection.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,8 +19,7 @@
[
Conditional=NETWORK_INFO,
- Supplemental=Navigator
-] interface NavigatorNetworkInfoConnection {
+] partial interface Navigator {
readonly attribute NetworkInfoConnection webkitConnection;
};
Modified: trunk/Source/WebCore/Modules/notifications/DOMWindowNotifications.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/notifications/DOMWindowNotifications.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/notifications/DOMWindowNotifications.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS,
- Supplemental=DOMWindow
-] interface DOMWindowNotifications {
+] partial interface DOMWindow {
#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
readonly attribute NotificationCenter webkitNotifications;
#endif
Modified: trunk/Source/WebCore/Modules/notifications/WorkerContextNotifications.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/notifications/WorkerContextNotifications.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/notifications/WorkerContextNotifications.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS,
- Supplemental=WorkerContext
-] interface WorkerContextNotifications {
+] partial interface WorkerContext {
#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
readonly attribute NotificationCenter webkitNotifications;
#endif
Modified: trunk/Source/WebCore/Modules/quota/DOMWindowQuota.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/quota/DOMWindowQuota.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/quota/DOMWindowQuota.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -25,8 +25,7 @@
[
Conditional=QUOTA,
- Supplemental=DOMWindow
-] interface DOMWindowQuota {
+] partial interface DOMWindow {
readonly attribute StorageInfo webkitStorageInfo;
};
Modified: trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,8 +19,7 @@
[
Conditional=QUOTA,
- Supplemental=Navigator
-] interface NavigatorStorageQuota {
+] partial interface Navigator {
readonly attribute StorageQuota webkitTemporaryStorage;
readonly attribute StorageQuota webkitPersistentStorage;
};
Modified: trunk/Source/WebCore/Modules/quota/WorkerNavigatorStorageQuota.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/quota/WorkerNavigatorStorageQuota.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/quota/WorkerNavigatorStorageQuota.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,8 +19,7 @@
[
Conditional=QUOTA,
- Supplemental=WorkerNavigator
-] interface WorkerNavigatorStorageQuota {
+] partial interface WorkerNavigator {
readonly attribute StorageQuota webkitTemporaryStorage;
readonly attribute StorageQuota webkitPersistentStorage;
};
Modified: trunk/Source/WebCore/Modules/speech/DOMWindowSpeech.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/speech/DOMWindowSpeech.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/speech/DOMWindowSpeech.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -25,8 +25,7 @@
[
Conditional=SCRIPTED_SPEECH,
- Supplemental=DOMWindow
-] interface DOMWindowSpeech {
+] partial interface DOMWindow {
attribute SpeechRecognitionConstructor webkitSpeechRecognition;
attribute SpeechRecognitionErrorConstructor webkitSpeechRecognitionError;
attribute SpeechRecognitionEventConstructor webkitSpeechRecognitionEvent;
Modified: trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -25,8 +25,7 @@
[
Conditional=SPEECH_SYNTHESIS,
- Supplemental=DOMWindow
-] interface DOMWindowSpeechSynthesis {
+] partial interface DOMWindow {
readonly attribute SpeechSynthesis speechSynthesis;
attribute SpeechSynthesisEventConstructor SpeechSynthesisEvent;
Modified: trunk/Source/WebCore/Modules/vibration/NavigatorVibration.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/vibration/NavigatorVibration.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/vibration/NavigatorVibration.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -19,8 +19,7 @@
[
Conditional=VIBRATION,
- Supplemental=Navigator
-] interface NavigatorVibration {
+] partial interface Navigator {
void vibrate(in sequence<unsigned long> pattern) raises(DOMException);
void vibrate(in unsigned long time) raises(DOMException);
};
Modified: trunk/Source/WebCore/Modules/webaudio/DOMWindowWebAudio.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/webaudio/DOMWindowWebAudio.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/webaudio/DOMWindowWebAudio.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=WEB_AUDIO,
- Supplemental=DOMWindow
-] interface DOMWindowWebAudio {
+] partial interface DOMWindow {
#if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
[CustomGetter] attribute AudioContextConstructor webkitAudioContext;
attribute OfflineAudioContextConstructor webkitOfflineAudioContext;
Modified: trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=SQL_DATABASE,
- Supplemental=DOMWindow
-] interface DOMWindowWebDatabase {
+] partial interface DOMWindow {
Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize, in [Callback, Optional] DatabaseCallback creationCallback)
raises(DOMException);
#if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
Modified: trunk/Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=SQL_DATABASE,
- Supplemental=WorkerContext
-] interface WorkerContextWebDatabase {
+] partial interface WorkerContext {
Database openDatabase(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize, in [Callback, Optional] DatabaseCallback creationCallback)
raises(DOMException);
Modified: trunk/Source/WebCore/Modules/websockets/DOMWindowWebSocket.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/websockets/DOMWindowWebSocket.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/websockets/DOMWindowWebSocket.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=WEB_SOCKETS,
- Supplemental=DOMWindow
-] interface DOMWindowWebSocket {
+] partial interface DOMWindow {
#if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
attribute CloseEventConstructor CloseEvent;
[CustomGetter] attribute WebSocketConstructor WebSocket; // Usable with the new operator
Modified: trunk/Source/WebCore/Modules/websockets/WorkerContextWebSocket.idl (149169 => 149170)
--- trunk/Source/WebCore/Modules/websockets/WorkerContextWebSocket.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/Modules/websockets/WorkerContextWebSocket.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -26,8 +26,7 @@
[
Conditional=WEB_SOCKETS,
- Supplemental=WorkerContext
-] interface WorkerContextWebSocket {
+] partial interface WorkerContext {
[CustomGetter] attribute WebSocketConstructor WebSocket; // Usable with the new operator
};
Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (149169 => 149170)
--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2013-04-26 07:29:19 UTC (rev 149170)
@@ -99,7 +99,6 @@
ReturnNewObject
SkipVTableValidation
StrictTypeChecking
-Supplemental=*
SuppressToJSObject
TransferList=*
TreatNullAs=NullString
Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (149169 => 149170)
--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm 2013-04-26 07:29:19 UTC (rev 149170)
@@ -51,6 +51,7 @@
constructors => '@', # Constructors, list of 'domFunction'
isException => '$', # Used for exception interfaces
isCallback => '$', # Used for callback interfaces
+ isPartial => '$', # Used for partial interfaces
});
# Used to represent domInterface contents (name of method, signature)
@@ -529,7 +530,9 @@
my $next = $self->nextToken();
if ($next->value() eq "interface") {
- return $self->parsePartialInterface($extendedAttributeList);
+ my $interface = $self->parseInterface($extendedAttributeList);
+ $interface->isPartial(1);
+ return $interface;
}
if ($next->value() eq "dictionary") {
return $self->parsePartialDictionary($extendedAttributeList);
Modified: trunk/Source/WebCore/bindings/scripts/generate-bindings.pl (149169 => 149170)
--- trunk/Source/WebCore/bindings/scripts/generate-bindings.pl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/bindings/scripts/generate-bindings.pl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -139,7 +139,7 @@
my $document = $parser->Parse($idlFile, $defines, $preprocessor);
foreach my $interface (@{$document->interfaces}) {
- if ($interface->extendedAttributes->{"Supplemental"} and $interface->extendedAttributes->{"Supplemental"} eq $targetInterfaceName) {
+ if ($interface->isPartial and $interface->name eq $targetInterfaceName) {
my $targetDataNode;
foreach my $interface (@{$targetDocument->interfaces}) {
if ($interface->name eq $targetInterfaceName) {
@@ -149,40 +149,37 @@
}
die "Not found an interface ${targetInterfaceName} in ${targetInterfaceName}.idl." unless defined $targetDataNode;
- # Support [Supplemental] for attributes.
+ # Support for attributes of partial interfaces.
foreach my $attribute (@{$interface->attributes}) {
# Record that this attribute is implemented by $interfaceName.
$attribute->signature->extendedAttributes->{"ImplementedBy"} = $interfaceName;
# Add interface-wide extended attributes to each attribute.
foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) {
- next if ($extendedAttributeName eq "Supplemental");
$attribute->signature->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName};
}
push(@{$targetDataNode->attributes}, $attribute);
}
- # Support [Supplemental] for methods.
+ # Support for methods of partial interfaces.
foreach my $function (@{$interface->functions}) {
# Record that this method is implemented by $interfaceName.
$function->signature->extendedAttributes->{"ImplementedBy"} = $interfaceName;
# Add interface-wide extended attributes to each method.
foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) {
- next if ($extendedAttributeName eq "Supplemental");
$function->signature->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName};
}
push(@{$targetDataNode->functions}, $function);
}
- # Support [Supplemental] for constants.
+ # Support for constants of partial interfaces.
foreach my $constant (@{$interface->constants}) {
# Record that this constant is implemented by $interfaceName.
$constant->extendedAttributes->{"ImplementedBy"} = $interfaceName;
# Add interface-wide extended attributes to each constant.
foreach my $extendedAttributeName (keys %{$interface->extendedAttributes}) {
- next if ($extendedAttributeName eq "Supplemental");
$constant->extendedAttributes->{$extendedAttributeName} = $interface->extendedAttributes->{$extendedAttributeName};
}
push(@{$targetDataNode->constants}, $constant);
Modified: trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl (149169 => 149170)
--- trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -52,9 +52,9 @@
my %supplementals;
foreach my $idlFile (@idlFiles) {
my $fullPath = Cwd::realpath($idlFile);
- my $supplemental = getSupplementalFromIDLFile($fullPath);
- if ($supplemental) {
- $supplementalDependencies{$fullPath} = $supplemental;
+ my $partialInterfaceName = getPartialInterfaceNameFromIDLFile($fullPath);
+ if ($partialInterfaceName) {
+ $supplementalDependencies{$fullPath} = $partialInterfaceName;
}
my $interfaceName = fileparse(basename($idlFile), ".idl");
$interfaceNameToIdlFile{$interfaceName} = $fullPath;
@@ -62,7 +62,7 @@
$supplementals{$fullPath} = [];
}
-# Resolves [Supplemental=XXX] dependencies.
+# Resolves partial interfaces dependencies.
foreach my $idlFile (keys %supplementalDependencies) {
my $baseFile = $supplementalDependencies{$idlFile};
my $targetIdlFile = $interfaceNameToIdlFile{$baseFile};
@@ -110,7 +110,7 @@
}
-sub getSupplementalFromIDLFile
+sub getPartialInterfaceNameFromIDLFile
{
my $idlFile = shift;
@@ -119,12 +119,7 @@
close FILE;
my $fileContents = join('', @lines);
- while ($fileContents =~ /\[(.*?)\] interface (\w+)/gs) {
- my @attributes = split(',', $1);
- foreach (@attributes) {
- if (/Supplemental=(\w+)/) {
- return $1;
- }
- }
+ if ($fileContents =~ /partial\s+interface\s+(\w+)/gs) {
+ return $1;
}
}
Modified: trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl (149169 => 149170)
--- trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -30,8 +30,7 @@
// changes in its ouput.
[
Conditional=Condition11|Condition12,
- Supplemental=TestInterface
-] interface TestSupplemental {
+] partial interface TestInterface {
static readonly attribute long supplementalStaticReadOnlyAttr;
static attribute DOMString supplementalStaticAttr;
readonly attribute DOMString supplementalStr1;
Modified: trunk/Source/WebCore/page/DOMWindowPagePopup.idl (149169 => 149170)
--- trunk/Source/WebCore/page/DOMWindowPagePopup.idl 2013-04-26 06:50:05 UTC (rev 149169)
+++ trunk/Source/WebCore/page/DOMWindowPagePopup.idl 2013-04-26 07:29:19 UTC (rev 149170)
@@ -30,7 +30,6 @@
[
Conditional=PAGE_POPUP,
- Supplemental=DOMWindow
-] interface DOMWindowPagePopup {
+] partial interface DOMWindow {
readonly attribute PagePopupController pagePopupController;
};