Changeset 116055 in webkit


Ignore:
Timestamp:
May 3, 2012 6:06:47 PM (12 years ago)
Author:
eric@webkit.org
Message:

Split build-webkit's feature option list off into its own module in preparation for autogeneration
https://bugs.webkit.org/show_bug.cgi?id=85548

Reviewed by Daniel Bates.

My Perl-fu is very weak. This moves the feature option list off into a separate module
file so that I can easily autogenerate just that file with the fancy new generate-feature-files command.
It's a bit odd to have an array which we return out to build-webkit to modify, but it turns out
not to matter. Also, build-webkit doesn't actually use any of the variables we're using to
store the results from the option parse, so those end up inaccessible from build-webkit (except by reference)
which is actually cleaner. Callers can't assume that they would get a new array every time, but someone
with more Perl-fu than I could create something fancier than this if we need in the future.

  • Scripts/build-webkit:
  • Scripts/webkitperl/FeatureList.pm: Added.

(getFeatureOptionList):

Location:
trunk/Tools
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r116050 r116055  
     12012-05-03  Eric Seidel  <eric@webkit.org>
     2
     3        Split build-webkit's feature option list off into its own module in preparation for autogeneration
     4        https://bugs.webkit.org/show_bug.cgi?id=85548
     5
     6        Reviewed by Daniel Bates.
     7
     8        My Perl-fu is very weak.  This moves the feature option list off into a separate module
     9        file so that I can easily autogenerate just that file with the fancy new generate-feature-files command.
     10        It's a bit odd to have an array which we return out to build-webkit to modify, but it turns out
     11        not to matter.  Also, build-webkit doesn't actually use any of the variables we're using to
     12        store the results from the option parse, so those end up inaccessible from build-webkit (except by reference)
     13        which is actually cleaner.  Callers can't assume that they would get a new array every time, but someone
     14        with more Perl-fu than I could create something fancier than this if we need in the future.
     15
     16        * Scripts/build-webkit:
     17        * Scripts/webkitperl/FeatureList.pm: Added.
     18        (getFeatureOptionList):
     19
    1202012-05-03  Dirk Pranke  <dpranke@chromium.org>
    221
  • trunk/Tools/Scripts/build-webkit

    r116036 r116055  
    4040use lib $FindBin::Bin;
    4141use webkitdirs;
     42use webkitperl::FeatureList qw(getFeatureOptionList);
    4243use POSIX;
    4344
     
    6566my $startTime = time();
    6667
    67 my (
    68     $requestAnimationFrameSupport,
    69     $threeDCanvasSupport,
    70     $threeDRenderingSupport,
    71     $accelerated2dCanvasSupport,
    72     $animationAPISupport,
    73     $batterystatusAPISupport,
    74     $blobSupport,
    75     $channelMessagingSupport,
    76     $cssFiltersSupport,
    77     $cssGridLayoutSupport,
    78     $cssShadersSupport,
    79     $sqlDatabaseSupport,
    80     $datalistSupport,
    81     $dataTransferItemsSupport,
    82     $detailsSupport,
    83     $deviceOrientationSupport,
    84     $directoryUploadSupport,
    85     $downloadAttributeSupport,
    86     $fileSystemSupport,
    87     $filtersSupport,
    88     $ftpDirSupport,
    89     $fullscreenAPISupport,
    90     $gamepadSupport,
    91     $geolocationSupport,
    92     $highDPICanvasSupport,
    93     $iconDatabaseSupport,
    94     $imageResizerSupport,
    95     $indexedDatabaseSupport,
    96     $inputTypeColorSupport,
    97     $inputSpeechSupport,
    98     $scriptedSpeechSupport,
    99     $inputTypeDateSupport,
    100     $inputTypeDatetimeSupport,
    101     $inputTypeDatetimelocalSupport,
    102     $inputTypeMonthSupport,
    103     $inputTypeTimeSupport,
    104     $inputTypeWeekSupport,
    105     $javaScriptDebuggerSupport,
    106     $legacyNotificationsSupport,
    107     $legacyWebKitBlobBuilderSupport,
    108     $linkPrefetchSupport,
    109     $linkPrerenderSupport,
    110     $mathmlSupport,
    111     $mediaSourceSupport,
    112     $mediaStatisticsSupport,
    113     $mediaStreamSupport,
    114     $meterTagSupport,
    115     $mhtmlSupport,
    116     $microdataSupport,
    117     $mutationObserversSupport,
    118     $netscapePluginSupport,
    119     $networkInfoSupport,
    120     $notificationsSupport,
    121     $orientationEventsSupport,
    122     $pageVisibilityApiSupport,
    123     $progressTagSupport,
    124     $quotaSupport,
    125     $registerProtocolHandlerSupport,
    126     $shadowDomSupport,
    127     $sharedWorkersSupport,
    128     $styleScopedSupport,
    129     $svgSupport,
    130     $svgDOMObjCBindingsSupport,
    131     $svgFontsSupport,
    132     $systemMallocSupport,
    133     $tiledBackingStoreSupport,
    134     $touchEventsSupport,
    135     $touchIconLoadingSupport,
    136     $vibrationSupport,
    137     $videoSupport,
    138     $videoTrackSupport,
    139     $webAudioSupport,
    140     $webInspectorSupport,
    141     $webSocketsSupport,
    142     $webTimingSupport,
    143     $workersSupport,
    144     $xsltSupport,
    145 );
    146 
    147 my @features = (
    148     { option => "request-animation-frame", desc => "Toggle requestAnimationFrame support",
    149       define => "ENABLE_REQUEST_ANIMATION_FRAME", default => (isAppleMacWebKit() || isGtk() || isEfl() || isBlackBerry()), value => \$requestAnimationFrameSupport },
    150 
    151     { option => "download-attribute", desc => "Toggle download attribute support",
    152       define => "ENABLE_DOWNLOAD_ATTRIBUTE", default => isBlackBerry(), value =>\$downloadAttributeSupport },
    153 
    154     { option => "3d-canvas", desc => "Toggle 3D canvas (WebGL) support",
    155       define => "ENABLE_WEBGL", default => isAppleMacWebKit(), value => \$threeDCanvasSupport },
    156 
    157     { option => "3d-rendering", desc => "Toggle 3D rendering support",
    158       define => "ENABLE_3D_RENDERING", default => (isAppleMacWebKit() || isQt()), value => \$threeDRenderingSupport },
    159 
    160     { option => "accelerated-2d-canvas", desc => "Toggle accelerated 2D canvas support",
    161       define => "ENABLE_ACCELERATED_2D_CANVAS", default => 0, value => \$accelerated2dCanvasSupport },
    162 
    163     { option => "animation-api", desc => "Toggle animation API support",
    164       define => "ENABLE_ANIMATION_API", default => isBlackBerry(), value => \$animationAPISupport },
    165 
    166     { option => "battery-status-api", desc => "Toggle battery status API support",
    167       define => "ENABLE_BATTERY_STATUS", default => (isEfl() || isBlackBerry()), value => \$batterystatusAPISupport },
    168 
    169     { option => "blob", desc => "Toggle Blob support",
    170       define => "ENABLE_BLOB", default => (isAppleMacWebKit() || isGtk() || isChromium() || isBlackBerry()), value => \$blobSupport },
    171 
    172     { option => "channel-messaging", desc => "Toggle MessageChannel and MessagePort support",
    173       define => "ENABLE_CHANNEL_MESSAGING", default => 1, value => \$channelMessagingSupport },
    174 
    175     { option => "css-filters", desc => "Toggle CSS Filters support",
    176       define => "ENABLE_CSS_FILTERS", default => isAppleWebKit(), value => \$cssFiltersSupport },
    177 
    178     { option => "css-grid-layout", desc => "Toggle CSS Grid Layout support",
    179       define => "ENABLE_CSS_GRID_LAYOUT", default => 0, value => \$cssGridLayoutSupport },
    180 
    181     { option => "css-shaders", desc => "Toggle CSS Shaders (within CSS Filters) support",
    182       define => "ENABLE_CSS_SHADERS", default => 0, value => \$cssShadersSupport },
    183 
    184     { option => "sql-database", desc => "Toggle SQL Database Support",
    185       define => "ENABLE_SQL_DATABASE", default => 1, value => \$sqlDatabaseSupport },
    186 
    187     { option => "datalist", desc => "Toggle HTML5 datalist support",
    188       define => "ENABLE_DATALIST", default => 0, value => \$datalistSupport },
    189 
    190     { option => "data-transfer-items", desc => "Toggle HTML5 data transfer items support",
    191       define => "ENABLE_DATA_TRANSFER_ITEMS", default => 0, value => \$dataTransferItemsSupport },
    192 
    193     { option => "details", desc => "Toggle HTML5 details support",
    194       define => "ENABLE_DETAILS", default => 1, value => \$detailsSupport },
    195 
    196     { option => "device-orientation", desc => "Toggle DeviceOrientation support",
    197       define => "ENABLE_DEVICE_ORIENTATION", default => isBlackBerry(), value => \$deviceOrientationSupport },
    198 
    199     { option => "directory-upload", desc => "Toogle Directory upload support",
    200       define => "ENABLE_DIRECTORY_UPLOAD", default => 0, value => \$directoryUploadSupport },
    201 
    202     { option => "file-system", desc => "Toggle FileSystem support",
    203       define => "ENABLE_FILE_SYSTEM", default => isBlackBerry(), value => \$fileSystemSupport },
    204 
    205     { option => "filters", desc => "Toggle SVG Filters support",
    206       define => "ENABLE_FILTERS", default => (isAppleWebKit() || isGtk() || isQt() || isEfl() || isBlackBerry()), value => \$filtersSupport },
    207 
    208     { option => "ftpdir", desc => "Toggle FTP directory support",
    209       define => "ENABLE_FTPDIR", default => !isWinCE(), value => \$ftpDirSupport },
    210 
    211     { option => "fullscreen-api", desc => "Toggle Fullscreen API support",
    212       define => "ENABLE_FULLSCREEN_API", default => (isAppleMacWebKit() || isGtk() || isBlackBerry()), value => \$fullscreenAPISupport },
    213 
    214     { option => "gamepad", desc => "Toggle Gamepad support",
    215       define => "ENABLE_GAMEPAD", default => 0, value => \$gamepadSupport },
    216 
    217     { option => "geolocation", desc => "Toggle Geolocation support",
    218       define => "ENABLE_GEOLOCATION", default => (isAppleWebKit() || isGtk() || isBlackBerry()), value => \$geolocationSupport },
    219 
    220     { option => "high-dpi-canvas", desc => "Toggle high-DPI canvas backing store support",
    221       define => "ENABLE_HIGH_DPI_CANVAS", default => (isAppleWebKit()), value => \$highDPICanvasSupport },
    222 
    223     { option => "icon-database", desc => "Toggle Icon database support",
    224       define => "ENABLE_ICONDATABASE", default => 1, value => \$iconDatabaseSupport },
    225 
    226     { option => "indexed-database", desc => "Toggle Indexed Database API support",
    227       define => "ENABLE_INDEXED_DATABASE", default => 0, value => \$indexedDatabaseSupport },
    228 
    229     { option => "input-speech", desc => "Speech Input API support",
    230       define => "ENABLE_INPUT_SPEECH", default => 0, value => \$inputSpeechSupport },
    231 
    232     { option => "scripted-speech", desc => "Scripted Speech API support",
    233       define => "ENABLE_SCRIPTED_SPEECH", default => 0, value => \$scriptedSpeechSupport },
    234 
    235     { option => "input-type-color", desc => "Toggle color type <input> support",
    236       define => "ENABLE_INPUT_TYPE_COLOR", default => (isBlackBerry() || isEfl()), value => \$inputTypeColorSupport },
    237 
    238     { option => "input-type-date", desc => "Toggle date type <input> support",
    239       define => "ENABLE_INPUT_TYPE_DATE", default => 0, value => \$inputTypeDateSupport },
    240 
    241     { option => "input-type-datetime", desc => "Toggle datetime type <input> support",
    242       define => "ENABLE_INPUT_TYPE_DATETIME", default => 0, value => \$inputTypeDatetimeSupport },
    243 
    244     { option => "input-type-datetimelocal", desc => "Toggle datetime-local type <input> support",
    245       define => "ENABLE_INPUT_TYPE_DATETIMELOCAL", default => 0, value => \$inputTypeDatetimelocalSupport },
    246 
    247     { option => "input-type-month", desc => "Toggle month type <input> support",
    248       define => "ENABLE_INPUT_TYPE_MONTH", default => 0, value => \$inputTypeMonthSupport },
    249 
    250     { option => "input-type-time", desc => "Toggle time type <input> support",
    251       define => "ENABLE_INPUT_TYPE_TIME", default => 0, value => \$inputTypeTimeSupport },
    252 
    253     { option => "input-type-week", desc => "Toggle week type <input> support",
    254       define => "ENABLE_INPUT_TYPE_WEEK", default => 0, value => \$inputTypeWeekSupport },
    255 
    256     { option => "inspector", desc => "Toggle Web Inspector support",
    257       define => "ENABLE_INSPECTOR", default => !isWinCE(), value => \$webInspectorSupport },
    258 
    259     { option => "javascript-debugger", desc => "Toggle JavaScript Debugger/Profiler support",
    260       define => "ENABLE_JAVASCRIPT_DEBUGGER", default => 1, value => \$javaScriptDebuggerSupport },
    261 
    262     { option => "legacy-notifications", desc => "Toggle Legacy Desktop Notifications Support",
    263       define => "ENABLE_LEGACY_NOTIFICATIONS", default => isBlackBerry(), value => \$legacyNotificationsSupport },
    264 
    265     { option => "legacy-webkit-blob-builder", desc => "Toggle Legacy WebKitBlobBuilder Support",
    266       define => "ENABLE_LEGACY_WEBKIT_BLOB_BUILDER", default => (isGtk() || isChromium() || isBlackBerry()), value => \$legacyWebKitBlobBuilderSupport },
    267 
    268     { option => "link-prefetch", desc => "Toggle pre fetching support",
    269       define => "ENABLE_LINK_PREFETCH", default => 0, value => \$linkPrefetchSupport },
    270 
    271     { option => "link-prerender", desc => "Toggle pre rendering support",
    272       define => "ENABLE_LINK_PRERENDER", default => 0, value => \$linkPrerenderSupport },
    273 
    274     { option => "mathml", desc => "Toggle MathML support",
    275       define => "ENABLE_MATHML", default => 1, value => \$mathmlSupport },
    276 
    277     { option => "media-source", desc => "Toggle Media Source support",
    278       define => "ENABLE_MEDIA_SOURCE", default => 0, value => \$mediaSourceSupport },
    279 
    280     { option => "media-statistics", desc => "Toggle Media Statistics support",
    281       define => "ENABLE_MEDIA_STATISTICS", default => 0, value => \$mediaStatisticsSupport },
    282 
    283     { option => "media-stream", desc => "Toggle Media Stream API support (implies Blob support, currently Chromium and GTK only)",
    284       define => "ENABLE_MEDIA_STREAM", default => (isChromium() || isGtk()), value => \$mediaStreamSupport },
    285 
    286     { option => "meter-tag", desc => "Meter Tag support",
    287       define => "ENABLE_METER_TAG", default => !isAppleWinWebKit(), value => \$meterTagSupport },
    288 
    289     { option => "mhtml", desc => "Toggle MHTML support",
    290       define => "ENABLE_MHTML", default => 0, value => \$mhtmlSupport },
    291 
    292     { option => "microdata", desc => "Toggle Microdata support",
    293       define => "ENABLE_MICRODATA", default => 0, value => \$microdataSupport },
    294 
    295     { option => "mutation-observers", desc => "Toggle DOM mutation observer support",
    296       define => "ENABLE_MUTATION_OBSERVERS", default => 1, value => \$mutationObserversSupport },
    297 
    298     { option => "netscape-plugin", desc => "Netscape Plugin support",
    299       define => "ENABLE_NETSCAPE_PLUGIN_API", default => !isEfl(), value => \$netscapePluginSupport },
    300 
    301     { option => "network-info", desc => "Network Information API support",
    302       define => "ENABLE_NETWORK_INFO", default => isEfl(), value => \$networkInfoSupport },
    303 
    304     { option => "notifications", desc => "Toggle Desktop Notifications Support",
    305       define => "ENABLE_NOTIFICATIONS", default => isBlackBerry(), value => \$notificationsSupport },
    306 
    307     { option => "orientation-events", desc => "Toggle Orientation Events support",
    308       define => "ENABLE_ORIENTATION_EVENTS", default => isBlackBerry(), value => \$orientationEventsSupport },
    309 
    310     { option => "page-visibility-api", desc => "Page Visibility API support",
    311       define => "ENABLE_PAGE_VISIBILITY_API", default => (isBlackBerry() || isEfl()), value => \$pageVisibilityApiSupport },
    312 
    313     { option => "progress-tag", desc => "Progress Tag support",
    314       define => "ENABLE_PROGRESS_TAG", default => 1, value => \$progressTagSupport },
    315 
    316     { option => "quota", desc => "Toggle Quota support",
    317       define => "ENABLE_QUOTA", default => 0, value => \$quotaSupport },
    318 
    319     { option => "register-protocol-handler", desc => "Register Protocol Handler support",
    320       define => "ENABLE_REGISTER_PROTOCOL_HANDLER", default => 0, value => \$registerProtocolHandlerSupport },
    321 
    322     { option => "system-malloc", desc => "Toggle system allocator instead of TCmalloc",
    323       define => "USE_SYSTEM_MALLOC", default => isWinCE(), value => \$systemMallocSupport },
    324 
    325     { option => "shadow-dom", desc => "Toggle Shadow DOM support",
    326       define => "ENABLE_SHADOW_DOM", default => isGtk(), value => \$shadowDomSupport },
    327 
    328     { option => "shared-workers", desc => "Toggle SharedWorkers support",
    329       define => "ENABLE_SHARED_WORKERS", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$sharedWorkersSupport },
    330 
    331     { option => "style-scoped", desc => "Toggle <style scoped> support",
    332       define => "ENABLE_STYLE_SCOPED", default => 0, value => \$styleScopedSupport },
    333 
    334     { option => "svg", desc => "Toggle SVG support",
    335       define => "ENABLE_SVG", default => 1, value => \$svgSupport },
    336 
    337     { option => "svg-dom-objc-bindings", desc => "Toggle SVG DOM Objective-C bindings support (implies SVG support)",
    338       define => "ENABLE_SVG_DOM_OBJC_BINDINGS", default => isAppleMacWebKit(), value => \$svgDOMObjCBindingsSupport },
    339 
    340     { option => "svg-fonts", desc => "Toggle SVG fonts support (imples SVG support)",
    341       define => "ENABLE_SVG_FONTS", default => 1, value => \$svgFontsSupport },
    342 
    343     { option => "tiled-backing-store", desc => "Toggle Tiled Backing Store support",
    344       define => "WTF_USE_TILED_BACKING_STORE", default => isQt(), value => \$tiledBackingStoreSupport },
    345 
    346     { option => "touch-events", desc => "Toggle Touch Events support",
    347       define => "ENABLE_TOUCH_EVENTS", default => (isQt() || isBlackBerry()), value => \$touchEventsSupport },
    348 
    349     { option => "touch-icon-loading", desc => "Toggle Touch Icon Loading Support",
    350       define => "ENABLE_TOUCH_ICON_LOADING", default => 0, value => \$touchIconLoadingSupport },
    351 
    352     { option => "vibration", desc => "Toggle Vibration API support",
    353       define => "ENABLE_VIBRATION", default => (isEfl() || isBlackBerry()), value => \$vibrationSupport },
    354 
    355     { option => "video", desc => "Toggle Video support",
    356       define => "ENABLE_VIDEO", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$videoSupport },
    357 
    358     { option => "video-track", desc => "Toggle Video Track support",
    359       define => "ENABLE_VIDEO_TRACK", default => (isAppleWebKit() || isGtk() || isEfl()), value => \$videoTrackSupport },
    360 
    361     { option => "web-audio", desc => "Toggle Web Audio support",
    362       define => "ENABLE_WEB_AUDIO", default => 0, value=> \$webAudioSupport },
    363 
    364     { option => "web-sockets", desc => "Toggle Web Sockets support",
    365       define => "ENABLE_WEB_SOCKETS", default => 1, value=> \$webSocketsSupport },
    366 
    367     { option => "web-timing", desc => "Toggle Web Timing support",
    368       define => "ENABLE_WEB_TIMING", default => (isBlackBerry() || isGtk() || isEfl()), value=> \$webTimingSupport },
    369 
    370     { option => "workers", desc => "Toggle Web Workers support",
    371       define => "ENABLE_WORKERS", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$workersSupport },
    372 
    373     { option => "xslt", desc => "Toggle XSLT support",
    374       define => "ENABLE_XSLT", default => 1, value => \$xsltSupport },
    375 );
     68my @features = getFeatureOptionList();
    37669
    37770# Update defaults from Qt's project file
Note: See TracChangeset for help on using the changeset viewer.