- Revision
- 91570
- Author
- par...@webkit.org
- Date
- 2011-07-22 08:50:35 -0700 (Fri, 22 Jul 2011)
Log Message
Replace preprocessor statements in IDL files with Conditional attribute
https://bugs.webkit.org/show_bug.cgi?id=64961
Reviewed by Darin Adler.
Replaced ENABLE_DATALIST, ENABLE_DIRECTORY_UPLOAD, ENABLE_INPUT_SPEECH, ENABLE_MEDIA_STATISTICS
and ENABLE_ORIENTATION_EVENTS with the corresponding Conditional attribute.
* html/HTMLBodyElement.idl:
* html/HTMLFrameSetElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLVideoElement.idl:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91569 => 91570)
--- trunk/Source/WebCore/ChangeLog 2011-07-22 15:38:26 UTC (rev 91569)
+++ trunk/Source/WebCore/ChangeLog 2011-07-22 15:50:35 UTC (rev 91570)
@@ -1,3 +1,19 @@
+2011-07-22 Patrick Gansterer <par...@webkit.org>
+
+ Replace preprocessor statements in IDL files with Conditional attribute
+ https://bugs.webkit.org/show_bug.cgi?id=64961
+
+ Reviewed by Darin Adler.
+
+ Replaced ENABLE_DATALIST, ENABLE_DIRECTORY_UPLOAD, ENABLE_INPUT_SPEECH, ENABLE_MEDIA_STATISTICS
+ and ENABLE_ORIENTATION_EVENTS with the corresponding Conditional attribute.
+
+ * html/HTMLBodyElement.idl:
+ * html/HTMLFrameSetElement.idl:
+ * html/HTMLInputElement.idl:
+ * html/HTMLMediaElement.idl:
+ * html/HTMLVideoElement.idl:
+
2011-07-22 Andrey Kosyakov <ca...@chromium.org>
Web Inspector: [Extensions API] add webInspector.resources.onContentEdited
Modified: trunk/Source/WebCore/html/HTMLBodyElement.idl (91569 => 91570)
--- trunk/Source/WebCore/html/HTMLBodyElement.idl 2011-07-22 15:38:26 UTC (rev 91569)
+++ trunk/Source/WebCore/html/HTMLBodyElement.idl 2011-07-22 15:50:35 UTC (rev 91570)
@@ -40,9 +40,7 @@
attribute [DontEnum, WindowEventListener] EventListener onstorage;
attribute [DontEnum, WindowEventListener] EventListener onunload;
-#if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
- attribute [DontEnum, WindowEventListener] EventListener onorientationchange;
-#endif
+ attribute [Conditional=ORIENTATION_EVENTS, DontEnum, WindowEventListener] EventListener onorientationchange;
// Overrides of Element attributes (with different implementation in bindings).
attribute [DontEnum, WindowEventListener] EventListener onblur;
Modified: trunk/Source/WebCore/html/HTMLFrameSetElement.idl (91569 => 91570)
--- trunk/Source/WebCore/html/HTMLFrameSetElement.idl 2011-07-22 15:38:26 UTC (rev 91569)
+++ trunk/Source/WebCore/html/HTMLFrameSetElement.idl 2011-07-22 15:50:35 UTC (rev 91570)
@@ -38,9 +38,7 @@
attribute [DontEnum, WindowEventListener] EventListener onstorage;
attribute [DontEnum, WindowEventListener] EventListener onunload;
-#if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
- attribute [DontEnum] EventListener onorientationchange;
-#endif
+ attribute [Conditional=ORIENTATION_EVENTS, DontEnum] EventListener onorientationchange;
// Overrides of Element attributes (with different implementation in bindings).
attribute [DontEnum, WindowEventListener] EventListener onblur;
Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (91569 => 91570)
--- trunk/Source/WebCore/html/HTMLInputElement.idl 2011-07-22 15:38:26 UTC (rev 91569)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl 2011-07-22 15:50:35 UTC (rev 91570)
@@ -40,16 +40,12 @@
attribute [Reflect] boolean disabled;
attribute [Reflect] boolean autofocus;
attribute [Reflect] DOMString autocomplete;
-#if defined(ENABLE_DATALIST) && ENABLE_DATALIST
- readonly attribute HTMLElement list;
-#endif
+ readonly attribute [Conditional=DATALIST] HTMLElement list;
attribute [Reflect] DOMString max;
attribute long maxLength setter raises(DOMException);
attribute [Reflect] DOMString min;
attribute [Reflect] boolean multiple;
-#if defined(ENABLE_DIRECTORY_UPLOAD) && ENABLE_DIRECTORY_UPLOAD
- attribute [Reflect] boolean webkitdirectory;
-#endif
+ attribute [Conditional=DIRECTORY_UPLOAD, Reflect] boolean webkitdirectory;
attribute [Reflect] DOMString name;
attribute [Reflect] DOMString pattern;
attribute [Reflect] DOMString placeholder;
@@ -70,9 +66,7 @@
attribute Date valueAsDate setter raises(DOMException);
#endif
attribute double valueAsNumber setter raises(DOMException);
-#if defined(ENABLE_DATALIST) && ENABLE_DATALIST
- readonly attribute HTMLOptionElement selectedOption;
-#endif
+ readonly attribute [Conditional=DATALIST] HTMLOptionElement selectedOption;
attribute [Reflect] boolean incremental;
void stepUp(in [Optional] long n) raises(DOMException);
@@ -105,11 +99,9 @@
readonly attribute FileList files;
readonly attribute NodeList labels;
-#if defined(ENABLE_INPUT_SPEECH) && ENABLE_INPUT_SPEECH
- attribute [Reflect, EnabledAtRuntime] boolean webkitSpeech;
- attribute [Reflect, EnabledAtRuntime] boolean webkitGrammar;
- attribute [DontEnum] EventListener onwebkitspeechchange;
-#endif
+ attribute [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] boolean webkitSpeech;
+ attribute [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] boolean webkitGrammar;
+ attribute [Conditional=INPUT_SPEECH, DontEnum] EventListener onwebkitspeechchange;
};
}
Modified: trunk/Source/WebCore/html/HTMLMediaElement.idl (91569 => 91570)
--- trunk/Source/WebCore/html/HTMLMediaElement.idl 2011-07-22 15:38:26 UTC (rev 91569)
+++ trunk/Source/WebCore/html/HTMLMediaElement.idl 2011-07-22 15:50:35 UTC (rev 91570)
@@ -85,10 +85,8 @@
readonly attribute boolean webkitHasClosedCaptions;
attribute boolean webkitClosedCaptionsVisible;
-#if defined(ENABLE_MEDIA_STATISTICS) && ENABLE_MEDIA_STATISTICS
// The number of bytes consumed by the media decoder.
- readonly attribute unsigned long webkitAudioDecodedByteCount;
- readonly attribute unsigned long webkitVideoDecodedByteCount;
-#endif
+ readonly attribute [Conditional=MEDIA_STATISTICS] unsigned long webkitAudioDecodedByteCount;
+ readonly attribute [Conditional=MEDIA_STATISTICS] unsigned long webkitVideoDecodedByteCount;
};
}
Modified: trunk/Source/WebCore/html/HTMLVideoElement.idl (91569 => 91570)
--- trunk/Source/WebCore/html/HTMLVideoElement.idl 2011-07-22 15:38:26 UTC (rev 91569)
+++ trunk/Source/WebCore/html/HTMLVideoElement.idl 2011-07-22 15:50:35 UTC (rev 91570)
@@ -45,14 +45,12 @@
void webkitEnterFullScreen() raises (DOMException);
void webkitExitFullScreen();
-#if defined(ENABLE_MEDIA_STATISTICS) && ENABLE_MEDIA_STATISTICS
// The number of frames that have been decoded and made available for
// playback.
- readonly attribute unsigned long webkitDecodedFrameCount;
+ readonly attribute [Conditional=MEDIA_STATISTICS] unsigned long webkitDecodedFrameCount;
// The number of decoded frames that have been dropped by the player
// for performance reasons during playback.
- readonly attribute unsigned long webkitDroppedFrameCount;
-#endif
+ readonly attribute [Conditional=MEDIA_STATISTICS] unsigned long webkitDroppedFrameCount;
};
}