Early merge - [EFL] Support for HTML media capture
[framework/web/webkit-efl.git] / Tools / Scripts / webkitperl / FeatureList.pm
1 # Copyright (C) 2012 Google Inc. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are
5 # met:
6 #
7 # 1.  Redistributions of source code must retain the above copyright
8 #     notice, this list of conditions and the following disclaimer.
9 # 2.  Redistributions in binary form must reproduce the above copyright
10 #     notice, this list of conditions and the following disclaimer in the
11 #     documentation and/or other materials provided with the distribution.
12 #
13 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
15 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25 # A module to contain all the enable/disable feature option code.
26
27 use strict;
28 use warnings;
29
30 use FindBin;
31 use lib $FindBin::Bin;
32 use webkitdirs;
33
34 BEGIN {
35    use Exporter   ();
36    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
37    $VERSION     = 1.00;
38    @ISA         = qw(Exporter);
39    @EXPORT      = qw(&getFeatureOptionList);
40    %EXPORT_TAGS = ( );
41    @EXPORT_OK   = ();
42 }
43
44 my (
45     $threeDRenderingSupport,
46     $accelerated2DCanvasSupport,
47     $animationAPISupport,
48     $batteryStatusSupport,
49     $blobSupport,
50     $channelMessagingSupport,
51     $css3FlexboxSupport,
52     $cssExclusionsSupport,
53     $cssFiltersSupport,
54     $cssImageResolutionSupport,
55     $cssRegionsSupport,
56     $cssShadersSupport,
57     $cssVariablesSupport,
58     $dataTransferItemsSupport,
59     $datalistSupport,
60     $detailsSupport,
61     $deviceOrientationSupport,
62     $directoryUploadSupport,
63     $downloadAttributeSupport,
64     $fileSystemSupport,
65     $filtersSupport,
66     $fontBoostingSupport,
67     $ftpDirSupport,
68     $fullscreenAPISupport,
69     $gamepadSupport,
70     $geolocationSupport,
71     $highDPICanvasSupport,
72     $icondatabaseSupport,
73     $iframeSeamlessSupport,
74     $imageResizerSupport,
75     $indexedDatabaseSupport,
76     $inputSpeechSupport,
77     $inputTypeColorSupport,
78     $inputTypeDateSupport,
79     $inputTypeDatetimeSupport,
80     $inputTypeDatetimelocalSupport,
81     $inputTypeMonthSupport,
82     $inputTypeTimeSupport,
83     $inputTypeWeekSupport,
84     $inspectorSupport,
85     $javascriptDebuggerSupport,
86     $legacyNotificationsSupport,
87     $legacyWebKitBlobBuilderSupport,
88     $linkPrefetchSupport,
89     $linkPrerenderSupport,
90     $mathmlSupport,
91     $mediaCaptureSupport,
92     $mediaSourceSupport,
93     $mediaStatisticsSupport,
94     $mediaStreamSupport,
95     $meterTagSupport,
96     $mhtmlSupport,
97     $microdataSupport,
98     $mutationObserversSupport,
99     $netscapePluginAPISupport,
100     $networkInfoSupport,
101     $notificationsSupport,
102     $orientationEventsSupport,
103     $pageVisibilityAPISupport,
104     $progressTagSupport,
105     $quotaSupport,
106     $registerProtocolHandlerSupport,
107     $requestAnimationFrameSupport,
108     $scriptedSpeechSupport,
109     $shadowDOMSupport,
110     $sharedWorkersSupport,
111     $sqlDatabaseSupport,
112     $styleScopedSupport,
113     $svgDOMObjCBindingsSupport,
114     $svgFontsSupport,
115     $svgSupport,
116     $systemMallocSupport,
117     $tiledBackingStoreSupport,
118     $touchEventsSupport,
119     $touchIconLoadingSupport,
120     $vibrationSupport,
121     $videoSupport,
122     $videoTrackSupport,
123     $webglSupport,
124     $webAudioSupport,
125     $webSocketsSupport,
126     $webTimingSupport,
127     $workersSupport,
128     $xsltSupport,
129 );
130
131 my @features = (
132     { option => "3d-rendering", desc => "Toggle 3D Rendering support",
133       define => "ENABLE_3D_RENDERING", default => (isAppleMacWebKit() || isQt()), value => \$threeDRenderingSupport },
134
135     { option => "accelerated-2d-canvas", desc => "Toggle Accelerated 2D Canvas support",
136       define => "ENABLE_ACCELERATED_2D_CANVAS", default => 0, value => \$accelerated2DCanvasSupport },
137
138     { option => "animation-api", desc => "Toggle Animation API support",
139       define => "ENABLE_ANIMATION_API", default => isBlackBerry(), value => \$animationAPISupport },
140
141     { option => "battery-status", desc => "Toggle Battery Status support",
142       define => "ENABLE_BATTERY_STATUS", default => (isEfl() || isBlackBerry()), value => \$batteryStatusSupport },
143
144     { option => "blob", desc => "Toggle Blob support",
145       define => "ENABLE_BLOB", default => (isAppleMacWebKit() || isGtk() || isChromium() || isBlackBerry() || isEfl()), value => \$blobSupport },
146
147     { option => "channel-messaging", desc => "Toggle Channel Messaging support",
148       define => "ENABLE_CHANNEL_MESSAGING", default => 1, value => \$channelMessagingSupport },
149
150     { option => "css-exclusions", desc => "Toggle CSS Exclusions support",
151       define => "ENABLE_CSS_EXCLUSIONS", default => 1, value => \$cssExclusionsSupport },
152
153     { option => "css-filters", desc => "Toggle CSS Filters support",
154       define => "ENABLE_CSS_FILTERS", default => isAppleWebKit(), value => \$cssFiltersSupport },
155
156     { option => "css3-flexbox", desc => "Toggle CSS3 Flexbox support",
157       define => "ENABLE_CSS3_FLEXBOX", default => 1, value => \$css3FlexboxSupport },
158
159     { option => "css-image-resolution", desc => "Toggle CSS image-resolution support",
160       define => "ENABLE_CSS_IMAGE_RESOLUTION", default => 0, value => \$cssImageResolutionSupport },
161
162     { option => "css-regions", desc => "Toggle CSS Regions support",
163       define => "ENABLE_CSS_REGIONS", default => 1, value => \$cssRegionsSupport },
164
165     { option => "css-shaders", desc => "Toggle CSS Shaders support",
166       define => "ENABLE_CSS_SHADERS", default => 0, value => \$cssShadersSupport },
167
168     { option => "css-variables", desc => "Toggle CSS Variable support",
169       define => "ENABLE_CSS_VARIABLES", default => 0, value => \$cssVariablesSupport },
170
171     { option => "datalist", desc => "Toggle Datalist support",
172       define => "ENABLE_DATALIST", default => 0, value => \$datalistSupport },
173
174     { option => "data-transfer-items", desc => "Toggle Data Transfer Items support",
175       define => "ENABLE_DATA_TRANSFER_ITEMS", default => 0, value => \$dataTransferItemsSupport },
176
177     { option => "details", desc => "Toggle Details support",
178       define => "ENABLE_DETAILS", default => 1, value => \$detailsSupport },
179
180     { option => "device-orientation", desc => "Toggle Device Orientation support",
181       define => "ENABLE_DEVICE_ORIENTATION", default => isBlackBerry(), value => \$deviceOrientationSupport },
182
183     { option => "directory-upload", desc => "Toogle Directory Upload support",
184       define => "ENABLE_DIRECTORY_UPLOAD", default => 0, value => \$directoryUploadSupport },
185
186     { option => "download-attribute", desc => "Toggle Download Attribute support",
187       define => "ENABLE_DOWNLOAD_ATTRIBUTE", default => isBlackBerry(), value => \$downloadAttributeSupport },
188
189     { option => "file-system", desc => "Toggle File System support",
190       define => "ENABLE_FILE_SYSTEM", default => isBlackBerry(), value => \$fileSystemSupport },
191
192     { option => "filters", desc => "Toggle Filters support",
193       define => "ENABLE_FILTERS", default => (isAppleWebKit() || isGtk() || isQt() || isEfl() || isBlackBerry()), value => \$filtersSupport },
194
195     { option => "font-boosting", desc => "Toggle Font Boosting support",
196       define => "ENABLE_FONT_BOOSTING", default => 0, value => \$fontBoostingSupport },
197
198     { option => "ftpdir", desc => "Toggle FTP Directory support",
199       define => "ENABLE_FTPDIR", default => !isWinCE(), value => \$ftpDirSupport },
200
201     { option => "fullscreen-api", desc => "Toggle Fullscreen API support",
202       define => "ENABLE_FULLSCREEN_API", default => (isAppleMacWebKit() || isEfl() || isGtk() || isBlackBerry() || isQt()), value => \$fullscreenAPISupport },
203
204     { option => "gamepad", desc => "Toggle Gamepad support",
205       define => "ENABLE_GAMEPAD", default => 0, value => \$gamepadSupport },
206
207     { option => "geolocation", desc => "Toggle Geolocation support",
208       define => "ENABLE_GEOLOCATION", default => (isAppleWebKit() || isGtk() || isBlackBerry()), value => \$geolocationSupport },
209
210     { option => "high-dpi-canvas", desc => "Toggle High DPI Canvas support",
211       define => "ENABLE_HIGH_DPI_CANVAS", default => (isAppleWebKit()), value => \$highDPICanvasSupport },
212
213     { option => "icon-database", desc => "Toggle Icondatabase support",
214       define => "ENABLE_ICONDATABASE", default => 1, value => \$icondatabaseSupport },
215
216     { option => "iframe-seamless", desc => "Toggle iframe seamless attribute support",
217       define => "ENABLE_IFRAME_SEAMLESS", default => 1, value => \$iframeSeamlessSupport },
218
219     { option => "indexed-database", desc => "Toggle Indexed Database support",
220       define => "ENABLE_INDEXED_DATABASE", default => 0, value => \$indexedDatabaseSupport },
221
222     { option => "input-speech", desc => "Toggle Input Speech support",
223       define => "ENABLE_INPUT_SPEECH", default => 0, value => \$inputSpeechSupport },
224
225     { option => "input-type-color", desc => "Toggle Input Type Color support",
226       define => "ENABLE_INPUT_TYPE_COLOR", default => (isBlackBerry() || isEfl()), value => \$inputTypeColorSupport },
227
228     { option => "input-type-date", desc => "Toggle Input Type Date support",
229       define => "ENABLE_INPUT_TYPE_DATE", default => 0, value => \$inputTypeDateSupport },
230
231     { option => "input-type-datetime", desc => "Toggle Input Type Datetime support",
232       define => "ENABLE_INPUT_TYPE_DATETIME", default => 0, value => \$inputTypeDatetimeSupport },
233
234     { option => "input-type-datetimelocal", desc => "Toggle Input Type Datetimelocal support",
235       define => "ENABLE_INPUT_TYPE_DATETIMELOCAL", default => 0, value => \$inputTypeDatetimelocalSupport },
236
237     { option => "input-type-month", desc => "Toggle Input Type Month support",
238       define => "ENABLE_INPUT_TYPE_MONTH", default => 0, value => \$inputTypeMonthSupport },
239
240     { option => "input-type-time", desc => "Toggle Input Type Time support",
241       define => "ENABLE_INPUT_TYPE_TIME", default => 0, value => \$inputTypeTimeSupport },
242
243     { option => "input-type-week", desc => "Toggle Input Type Week support",
244       define => "ENABLE_INPUT_TYPE_WEEK", default => 0, value => \$inputTypeWeekSupport },
245
246     { option => "inspector", desc => "Toggle Inspector support",
247       define => "ENABLE_INSPECTOR", default => !isWinCE(), value => \$inspectorSupport },
248
249     { option => "javascript-debugger", desc => "Toggle JavaScript Debugger support",
250       define => "ENABLE_JAVASCRIPT_DEBUGGER", default => 1, value => \$javascriptDebuggerSupport },
251
252     { option => "legacy-notifications", desc => "Toggle Legacy Notifications support",
253       define => "ENABLE_LEGACY_NOTIFICATIONS", default => isBlackBerry(), value => \$legacyNotificationsSupport },
254
255     { option => "legacy-webkit-blob-builder", desc => "Toggle Legacy WebKit Blob Builder support",
256       define => "ENABLE_LEGACY_WEBKIT_BLOB_BUILDER", default => (isGtk() || isChromium() || isBlackBerry()), value => \$legacyWebKitBlobBuilderSupport },
257
258     { option => "link-prefetch", desc => "Toggle Link Prefetch support",
259       define => "ENABLE_LINK_PREFETCH", default => 0, value => \$linkPrefetchSupport },
260
261     { option => "link-prerender", desc => "Toggle Link Prerender support",
262       define => "ENABLE_LINK_PRERENDER", default => 0, value => \$linkPrerenderSupport },
263
264     { option => "mathml", desc => "Toggle MathML support",
265       define => "ENABLE_MATHML", default => 1, value => \$mathmlSupport },
266
267     { option => "media-capture", desc => "Toggle Media Capture support",
268       define => "ENABLE_MEDIA_CAPTURE", default => isEfl(), value => \$mediaCaptureSupport },
269
270     { option => "media-source", desc => "Toggle Media Source support",
271       define => "ENABLE_MEDIA_SOURCE", default => 0, value => \$mediaSourceSupport },
272
273     { option => "media-statistics", desc => "Toggle Media Statistics support",
274       define => "ENABLE_MEDIA_STATISTICS", default => 0, value => \$mediaStatisticsSupport },
275
276     { option => "media-stream", desc => "Toggle Media Stream support",
277       define => "ENABLE_MEDIA_STREAM", default => (isChromium() || isGtk()), value => \$mediaStreamSupport },
278
279     { option => "meter-tag", desc => "Toggle Meter Tag support",
280       define => "ENABLE_METER_TAG", default => !isAppleWinWebKit(), value => \$meterTagSupport },
281
282     { option => "mhtml", desc => "Toggle MHTML support",
283       define => "ENABLE_MHTML", default => 0, value => \$mhtmlSupport },
284
285     { option => "microdata", desc => "Toggle Microdata support",
286       define => "ENABLE_MICRODATA", default => 0, value => \$microdataSupport },
287
288     { option => "mutation-observers", desc => "Toggle Mutation Observers support",
289       define => "ENABLE_MUTATION_OBSERVERS", default => 1, value => \$mutationObserversSupport },
290
291     { option => "netscape-plugin-api", desc => "Toggle Netscape Plugin API support",
292       define => "ENABLE_NETSCAPE_PLUGIN_API", default => !isEfl(), value => \$netscapePluginAPISupport },
293
294     { option => "network-info", desc => "Toggle Network Info support",
295       define => "ENABLE_NETWORK_INFO", default => isEfl(), value => \$networkInfoSupport },
296
297     { option => "notifications", desc => "Toggle Notifications support",
298       define => "ENABLE_NOTIFICATIONS", default => isBlackBerry(), value => \$notificationsSupport },
299
300     { option => "orientation-events", desc => "Toggle Orientation Events support",
301       define => "ENABLE_ORIENTATION_EVENTS", default => isBlackBerry(), value => \$orientationEventsSupport },
302
303     { option => "page-visibility-api", desc => "Toggle Page Visibility API support",
304       define => "ENABLE_PAGE_VISIBILITY_API", default => (isBlackBerry() || isEfl()), value => \$pageVisibilityAPISupport },
305
306     { option => "progress-tag", desc => "Toggle Progress Tag support",
307       define => "ENABLE_PROGRESS_TAG", default => 1, value => \$progressTagSupport },
308
309     { option => "quota", desc => "Toggle Quota support",
310       define => "ENABLE_QUOTA", default => 0, value => \$quotaSupport },
311
312     { option => "register-protocol-handler", desc => "Toggle Register Protocol Handler support",
313       define => "ENABLE_REGISTER_PROTOCOL_HANDLER", default => isEfl(), value => \$registerProtocolHandlerSupport },
314
315     { option => "request-animation-frame", desc => "Toggle Request Animation Frame support",
316       define => "ENABLE_REQUEST_ANIMATION_FRAME", default => (isAppleMacWebKit() || isGtk() || isEfl() || isBlackBerry()), value => \$requestAnimationFrameSupport },
317
318     { option => "scripted-speech", desc => "Toggle Scripted Speech support",
319       define => "ENABLE_SCRIPTED_SPEECH", default => 0, value => \$scriptedSpeechSupport },
320
321     { option => "shadow-dom", desc => "Toggle Shadow DOM support",
322       define => "ENABLE_SHADOW_DOM", default => isGtk(), value => \$shadowDOMSupport },
323
324     { option => "shared-workers", desc => "Toggle Shared Workers support",
325       define => "ENABLE_SHARED_WORKERS", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$sharedWorkersSupport },
326
327     { option => "sql-database", desc => "Toggle SQL Database support",
328       define => "ENABLE_SQL_DATABASE", default => 1, value => \$sqlDatabaseSupport },
329
330     { option => "style-scoped", desc => "Toggle Style Scoped support",
331       define => "ENABLE_STYLE_SCOPED", default => 0, value => \$styleScopedSupport },
332
333     { option => "svg", desc => "Toggle SVG support",
334       define => "ENABLE_SVG", default => 1, value => \$svgSupport },
335
336     { option => "svg-dom-objc-bindings", desc => "Toggle SVG DOM ObjC Bindings support",
337       define => "ENABLE_SVG_DOM_OBJC_BINDINGS", default => isAppleMacWebKit(), value => \$svgDOMObjCBindingsSupport },
338
339     { option => "svg-fonts", desc => "Toggle SVG Fonts support",
340       define => "ENABLE_SVG_FONTS", default => 1, value => \$svgFontsSupport },
341
342     { option => "system-malloc", desc => "Toggle system allocator instead of TCmalloc",
343       define => "USE_SYSTEM_MALLOC", default => isWinCE(), value => \$systemMallocSupport },
344
345     { option => "tiled-backing-store", desc => "Toggle Tiled Backing Store support",
346       define => "WTF_USE_TILED_BACKING_STORE", default => isQt(), value => \$tiledBackingStoreSupport },
347
348     { option => "touch-events", desc => "Toggle Touch Events support",
349       define => "ENABLE_TOUCH_EVENTS", default => (isQt() || isBlackBerry() || isEfl()), value => \$touchEventsSupport },
350
351     { option => "touch-icon-loading", desc => "Toggle Touch Icon Loading Support",
352       define => "ENABLE_TOUCH_ICON_LOADING", default => 0, value => \$touchIconLoadingSupport },
353
354     { option => "vibration", desc => "Toggle Vibration support",
355       define => "ENABLE_VIBRATION", default => (isEfl() || isBlackBerry()), value => \$vibrationSupport },
356
357     { option => "video", desc => "Toggle Video support",
358       define => "ENABLE_VIDEO", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$videoSupport },
359
360     { option => "video-track", desc => "Toggle Video Track support",
361       define => "ENABLE_VIDEO_TRACK", default => (isAppleWebKit() || isGtk() || isEfl()), value => \$videoTrackSupport },
362
363     { option => "webgl", desc => "Toggle WebGL support",
364       define => "ENABLE_WEBGL", default => (isAppleMacWebKit() || isGtk()), value => \$webglSupport },
365
366     { option => "web-audio", desc => "Toggle Web Audio support",
367       define => "ENABLE_WEB_AUDIO", default => 0, value => \$webAudioSupport },
368
369     { option => "web-sockets", desc => "Toggle Web Sockets support",
370       define => "ENABLE_WEB_SOCKETS", default => 1, value => \$webSocketsSupport },
371
372     { option => "web-timing", desc => "Toggle Web Timing support",
373       define => "ENABLE_WEB_TIMING", default => (isBlackBerry() || isGtk() || isEfl()), value => \$webTimingSupport },
374
375     { option => "workers", desc => "Toggle Workers support",
376       define => "ENABLE_WORKERS", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$workersSupport },
377
378     { option => "xslt", desc => "Toggle XSLT support",
379       define => "ENABLE_XSLT", default => 1, value => \$xsltSupport },
380 );
381
382 sub getFeatureOptionList()
383 {
384     return @features;
385 }
386
387 1;