2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007-2009 Torch Mobile, Inc.
4 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 #ifndef WTF_Platform_h
29 #define WTF_Platform_h
31 /* Include compiler specific macros */
34 /* ==== PLATFORM handles OS, operating environment, graphics API, and
35 CPU. This macro will be phased out in favor of platform adaptation
36 macros, policy decision macros, and top-level port definitions. ==== */
37 #define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE)
40 /* ==== Platform adaptation macros: these describe properties of the target environment. ==== */
42 /* CPU() - the target CPU architecture */
43 #define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE)
44 /* HAVE() - specific system features (headers, functions or similar) that are present or not */
45 #define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE)
46 /* OS() - underlying operating system; only to be used for mandated low-level services like
47 virtual memory, not to choose a GUI toolkit */
48 #define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE)
51 /* ==== Policy decision macros: these define policy choices for a particular port. ==== */
53 /* USE() - use a particular third-party library or optional OS service */
54 #define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE)
55 /* ENABLE() - turn on a specific feature of WebKit */
56 #define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)
58 /* Samsung Platforms */
62 #define ENABLE_TIZEN_EFL_EXT_API 1 /* Gyuyoung Kim : Add new APIs for EFL Port */
63 #define ENABLE_TIZEN_JS_EXT_API 1 /* Gyuyoung Kim: Add new APIs for JS */
64 #define ENABLE_TIZEN_JS_PERMISSION_CHECKER 1 /* Bartlomiej Grzelewski : */
65 #define ENABLE_TIZEN_XMLHTTPREQUEST_SECURITY 1 /* Bartlomiej Grzelewski : Enable control of xmlhttprequest call.*/
68 #define ENABLE_TIZEN_DEVICE_ORIENTATION 1 /* Ryuan Choi : feature for device orientation */
69 #define ENABLE_TIZEN_ISF_PORT 1 /* Michal Pakula : feature for integrating the EditorClient Port with TIZEN2.0 ISF */
70 #define ENABLE_TIZEN_TEXT_SELECTION 1 /* Enumi Lee : */
71 #define ENABLE_TIZEN_SELECT_TEXT_FROM_RECTANGLE 1 /* Piotr Roguski : selecting text from rectangle for eBook reader */
72 #define ENABLE_TIZEN_PARAGRAPH_SELECTION 1 /* Grzegorz Czajkowski, Kamil Blank : Paragraph selection API, it doesn't draw anything on WebKit's context just returns needed information */
73 #define ENABLE_TIZEN_PASSWORD_MANAGER 1 /* Grzegorz Czajkowski : */
74 #define ENABLE_TIZEN_SMART_ZOOM 1 /* Jeongah Park : */
75 #define ENABLE_TIZEN_FIRST_PAINT_NOTI 1 /* JungJik Lee : */
76 #define ENABLE_TIZEN_EDITOR_CLIENT 1 /* Michał Pakuła : */
77 #define ENABLE_TIZEN_SMART_FOCUSING 1 /* Changhyup Jwa : */
78 #define ENABLE_TIZEN_SMART_FOCUSING_FOR_HIT_TEST 1 /* Grzegorz Czajkowski: */
79 #define ENABLE_TIZEN_EDITOR_COMMAND 1 /* taesik cho : feature for supporting Composer using webkit*/
80 #if ENABLE(TIZEN_SMART_FOCUSING_FOR_HIT_TEST) && !ENABLE(TIZEN_SMART_FOCUSING)
81 #error "TIZEN_SMART_FOCUSING_FOR_HIT_TEST requires TIZEN_SMART_FOCUSING"
83 #define ENABLE_TIZEN_PASTEBOARD_PORT 1 /* Michał Pakuła, Grzegorz Czajkowski : */
84 #define ENABLE_TIZEN_INSERT_IMAGE 0 /* Michał Pakuła : support for inserting images into richly editable input field */
85 #define ENABLE_TIZEN_CSS_OVERFLOW_SCROLL 1 /* Jaehun Lim : div scroll support for WRT */
86 #define ENABLE_TIZEN_MEMORY_CONTROLLER 1 /* Krzysztof Czech : */
87 #define ENABLE_TIZEN_SUPPORT_RSS_LINK_PARSING 1 /* Jaesick Chang, Ryuan Choi (WebKit1), KueHwan Sihn, Eunmi Lee (WebKit2): RSS Link Parsing patches */
88 #define ENABLE_TIZEN_EDITABLE_LINK_ACTIVE_SET 1 /* Who is owner ? */
89 #define ENABLE_TIZEN_READER 1 /* Changhyup Jwa : Reader feature */
90 #define ENABLE_TIZEN_TEXT_ENCODING 1 /* Łukasz Ślachciak : */
91 #define ENABLE_TIZEN_DROPDOWN_SUPPORT 1 /* Gyuyoung Kim : */
92 #define ENABLE_TIZEN_GLES_ZERO_COPY 1 /* KwangHyuk : */
93 #define ENABLE_TIZEN_WEAK_ZOOM_VIEWPORT 1 /* JungJik Lee */
94 #define ENABLE_TIZEN_TEXT_CARET_HANDLING 1 /* Michał Pakuła : enables two methods for getting and setting text caret position in editable fields */
95 #define ENABLE_TIZEN_SUPPORT_INNERFRAME_FOR_HIT_TEST 1 /* Who is owner ? */
96 #define ENABLE_TIZEN_DISABLE_AUTO_RESIZE_WINDOW 1 /* Who is owner ? */
97 #define ENABLE_TIZEN_SCROLL_SCALED_POS_GET 1 /* Kamil Blank : */
98 #define ENABLE_TIZEN_CTBS_ZOOMING_FIX 1 /* Łukasz Ślachciak : */
99 #define ENABLE_TIZEN_CUSTOM_HEADERS 1 /* Who is owner ? */
100 #define ENABLE_TIZEN_CSS_FIXED_AS_ABSOLUTE 1 /* Kamil Blank : treat Fixed elements as Absolute ones */
101 #define ENABLE_TIZEN_WINDOW_CLOSE 1 /* Who is owner ? : send window,close event when JS window.close() gets called (by WebRuntime) */
102 #define ENABLE_TIZEN_PRE_RENDERING_FIX 1 /* JungJik Lee : recalculate amount of cols and rows on the matrix and pre-render optimization*/
103 #define ENABLE_TIZEN_PRE_RENDERING_ACTIVATED 1 /* Krzysztof Czech : activates pre rendering only when page loading has been finished*/
104 #define ENABLE_TIZEN_PRE_RENDERING_ENABLE 1 /* Krzysztof Czech, JungJik Lee :enable pre-rendering as a whole*/
105 #define ENABLE_TIZEN_NO_TILE_CREATION_OVER_THE_LIMIT 1 /* JungJik Lee : Prevent tile creation while zooming */
106 #define ENABLE_TIZEN_IMAGE_PASTE 1 /* Michał Pakuła : feature allowing paste images from file system into content editable via data uri scheme */
107 #define ENABLE_TIZEN_VIEW_ACTIVE_SET 1 /* KwangHyuk : Enables calling ewk_view_active_set in the _ewk_view_smart_show/hide */
108 #define ENABLE_TIZEN_TILED_GLOBAL_CACHE_MANAGEMENT 1 /* Tomasz Morawski : Allows to controll size of allocated memory by all tailed view caches. */
109 #define ENABLE_TIZEN_TILED_CACHE_NEWIMP 1 /* JungJik Lee : Tiled unused cache new implementation */
110 #define ENABLE_TIZEN_CONTEXT_MENU 1 /* Gyuyoung Kim : Support Context Menu for WebKit1 EFL port. Current WebKit mainline doesn't support ENABLE_CONTEXT_MENU for EFL port */
111 #define ENABLE_TIZEN_BG_RECT_SUPPORT 1 /* JungJik Lee : To support background rectangle for the ewk_view */
112 #define ENABLE_TIZEN_HIT_TEST 1 /* Changhyup Jwa : Patch for TIZEN hit test. Kangil Han : Add attribute hash, image buffer and tag name to Ewk_Hit_Test data structure on hit test. */
113 #define ENABLE_TIZEN_NONEMPTY_LAYOUT 1 /* Ryuan Choi : Controls non empty layout */
114 #define EBABLE_TIZEN_TILE_SIZE_SET 1 /* JungJik Lee : Patch to support changable tile size */
115 #define ENABLE_TIZEN_TILED_VIEW_BG_COLOR_SET 1 /* JungJik Lee : background color set for tiled view */
116 #define ENABLE_TIZEN_ADD_DEFAULT_CACHE_SIZE_DEFINITION 1 /* Tomasz : add definition for default tile cache size */
117 #define ENABLE_TIZEN_DEFAULT_TILE_SIZE 1 /* JungJik Lee : Configure default tile size */
118 #define ENABLE_TIZEN_TILE_MATRIX_LIST 1 /* KwangHyuk : Tile matrix for each different zoom level */
119 #define ENABLE_TIZEN_ZOOM_CHECK_BEFORE_PAINTING 1 /* JungJik Lee : background color set for tiled view */
120 #define ENABLE_TIZEN_TILE_REUSE_ALREADY_CREATED 1 /* JungJik Lee : To reuse tiles already created without free operation */
121 #define ENABLE_TIZEN_EWK_ERROR_PAGE 1 /* Dongjae Kim : Not use webview's error page.*/
122 #define ENABLE_TIZEN_CREATE_FRAME_VIEW_ALWAYS 1 /* Kamil Blank DongJae Kim : Create FrameView Always*/
123 #define ENABLE_TIZEN_FIX_EMAIL_ONE_TILE_DISPLAY 1 /* Jungjik : Fixed email display only one tile area*/
124 #define ENABLE_TIZEN_CAIRO_USAGE_ON_DEMAND 0 /* KwangHyuk : Ewk_Tile doesn't keep cairo related field, This would be 0 for the time being */
125 #define ENABLE_TIZEN_FIX_MATRIX_NEW_TILE 1 /* KwangHyuk : Make the matrix fail to create new tile with different zoom value */
126 #define ENABLE_TIZEN_REUSE_BIGGER_ZOOM_FIRST 1 /* JungJik Lee : To keep tiles for smallest zoom level as long as possible */
127 #define ENABLE_TIZEN_TILE_ADD_PAINTED_STATE 1 /* Eunsol Park : Add tile painted state */
128 #define ENABLE_TIZEN_PRE_RENDER_TILES_CREATED_AFTER_SCROLL 1 /* JungJik Lee : patch to pre-render empty tiles created by selective render */
129 #define ENABLE_TIZEN_ADD_VIEW_CLEAR 1 /* Eunsol Park : Patch to clear view when non empty layout*/
130 #define ENABLE_TIZEN_DBSPACE_PATH 1 /* Jaehun Lim : Set the TIZEN's default database directory */
131 #define ENABLE_TIZEN_TILE_UPDATE_AFTER_RECURSIVE_LAYOUT 1 /* KwangHyuk : move tile update process*/
132 #define ENABLE_TIZEN_POLICY_DECISION 1 /* Gyuyoung Kim : decide policy for content download */
133 #define ENABLE_TIZEN_ENCODING_DETECTOR_TRUE 1 /* Ryuan Choi : we want to use encoding detector as default */
134 #define ENABLE_TIZEN_FIX_MESH_TILE_ISSUE 1 /* JungJik Lee : tile mesh issue fix */
135 #define ENABLE_TIZEN_WEAK_SCROLL 1 /* Kamil Blank : Weak scroll */
136 #define ENABLE_TIZEN_ORIGIN_DEL_FOR_APPCACHE 1 /* Donggwan Kim : Delete origin for ApplicationCache */
137 #define ENABLE_TIZEN_ORIGIN_DEL_FOR_WEBSTORAGE 1 /* Donggwan Kim : Delete origin for WebStorage */
138 #define ENABLE_TIZEN_REMOVE_ONE_REMAIN_TILE 1 /* JungJik Lee : Remove warning on one tile remained */
139 #define ENABLE_TIZEN_REMOVE_ENTRY_BEFORE_FREE 1 /* JungJik Lee : Remove the item from inlist before freeing the entry item */
140 #define ENABLE_TIZEN_DOM_TIMER_MIN_INTERVAL_SET 1 /* Gyuyoung Kim : Set minimum interval for DOMTimer */
141 #define ENABLE_TIZEN_VIEW_TYPE_CHECK 1 /* JungJik Lee : Prevent single_view from accessing ewk_tiled_backing_store */
142 #define ENABLE_TIZEN_RECORDING_SURFACE 0 /* Hyeonji Kim : enable recording surface */
143 #define ENABLE_TIZEN_SKIP_MOVING_WHILE_WEAK_ZOOMING 1 /* JungJik Lee : Skipping reposition of tiles while weak zooming */
144 #define ENABLE_TIZEN_SINGLE_BACKINGSTORE_ISSUE_WITH_ZOOM 1 /*Krzysztof Czech: making sure x,y dimensions are not less the 0, prevents dirty rect's appearing */
145 #define ENABLE_TIZEN_PAGE_CACHE 1 /* DongJae KIM : Enable EFL Page Cache */
146 #define ENABLE_TIZEN_LOADING_STATE_CHECK 1 /* Sungman Kim : Check loading state */
147 #define ENABLE_TIZEN_CONTENTS_SET 1 /* Sungman Kim : Add contents set api */
148 #define ENABLE_TIZEN_REMOVE_CHILD_AFTER_FRAME_INIT_FAIL 1 /* Sungman Kim : fixed crash issue occurred after subframe init fail */
149 #define ENABLE_TIZEN_INNER_SCREEN_RECT 1 /* Gyuyoung Kim : Gets content view's rectangle size in order to compute url bar in DOM window */
150 #define ENABLE_TIZEN_TILE_BASECODE 1 /* JungJik Lee : Tiled Backing Store Base Code */
151 #define ENABLE_TIZEN_LABEL_OVER_INPUTFIELD_FIX 1 /* KwangHyuk : For the case when both label and input field is overapping */
152 #define ENABLE_TIZEN_WEAK_ZOOM_POSITION 1 /* JungJik Lee : Make use of rounded zoom value in weak zoom and zoom over */
153 #define ENABLE_TIZEN_ON_LOADING_REQUESTED 1 /*Sungman Kim : Callback call for signal navigation_policy,decision,requested with navigation type*/
154 #define ENABLE_TIZEN_CACHE_CONTROL 1 /*Sungman Kim : Control cache enable or disable mode*/
155 /* ewk_frame_script_execute should return the string even even if the result is the object.
156 because the object can be converted to the string using toString function.
157 ex) When the result is DIV Element, it is converted "[object HTMLDivElement]" by toString function.
159 #define ENABLE_TIZEN_RETURN_OBJECT_RESULT_FROM_EXECUTE_SCRIPT 1 /* Jongseok Yang */
160 #define ENABLE_TIZEN_BACKING_STORE_ROTATION_WITH_ZOOM_CHANGED_ISSUE 1 /* Krzysztof Czech : when zoom was less than one, repaint's values were wrong calculated*/
162 /* WebCore's patches */
163 #define ENABLE_TIZEN_SUPPORT_VIEWPORT 1 /* Gyuyoung Kim : */
164 #define ENABLE_TIZEN_VIEWPORT_ORIENTATION 1 /* Ryuan Choi : implement viewport orientation */
165 #define ENABLE_TIZEN_FOCUS_RING 1 /* Gyuyoung Kim : */
166 #define ENABLE_TIZEN_FOCUS_RING_FILLING 1 /* Grzegorz Czajkowski: to fill an area of focus ring */
167 #define ENABLE_TIZEN_CAIRO_SCALE_PATCH 1 /* This will be repalced with page scale */
168 #define ENABLE_TIZEN_MEMORY_SQUEEZE 0 /* Sangseok Lim : to reduce memory footprint */
169 #define ENABLE_TIZEN_MEDIA_QUERY 1 /* Gyuyoung Kim : to support resolution spec in media query*/
170 #define ENABLE_TIZEN_CERTIFICATE_HANDLING 1 /* Krzysztof Czech : support for certificate callback function set by UI */ /* DongJae KIM : Enable Patch*/
171 #define ENABLE_TIZEN_CSS_FIXED_FAST_PATH 1 /* Kamil Blank : to support CSS Fixed elements, checked only with disabled rendering suspendion*/
172 #define ENABLE_TIZEN_ELEMENT_CREATED_BY_PARSER_INFO_STORE 1 /* Who is owner ? : support storing info about element's creation: from parser or JS */
173 #define ENABLE_TIZEN_LOCAL_STORAGE_READ_ONLY_EXTENSION 1 /* Grzegorz Czajkowski : read-only extension to WebCore's local storage */
174 #define ENABLE_TIZEN_SAVE_IMAGE 1 /* Gyuyoung Kim : */
175 #define ENABLE_TIZEN_COPY_IMAGE_LOCATION 1 /* Grzegorz Czajkowski : context menu item, copy image's Url */
176 #define ENABLE_TIZEN_DOWNLOAD_LINK_FILTER 1 /* Jaehun Lim : show download context menus for only http(s) and ftp(s) link */
177 #define ENABLE_TIZEN_EDITABLE_COPY_IMAGE 1 /* Michał Pakuła : added context menu items which allows to handle images in richly editable fields */
178 #define ENABLE_TIZEN_ROOT_INLINE_BOX_SELECTION_TOP 1 /* Kamil Blank : Fix for too high selection on bbc.co.uk, https://bugs.webkit.org/show_bug.cgi?id=65307 */
180 #define ENABLE_TIZEN_PREVENT_CRASH_OF_TOUCH_EVENTS 1 /* Who is owner ? : https://bugs.webkit.org/show_bug.cgi?id=40163 */
181 #define ENABLE_TIZEN_DECODER_AUTODETECTION_FAIL_DEFENCE 1 /* Jaesick Chang : */
182 #define ENABLE_TIZEN_PASSWORD_SHOW_PATCH 1 /* Michał Pakuła : patch that enables showing last entered character in password input field */
183 #define ENABLE_TIZEN_FIX_NULL_DOCUMENT 1 /* Krzysztof Czech : Patch that prevents using document's null pointer */
184 #define ENABLE_TIZEN_INPUT_TAG_DATE 1 /* Krzysztof Czech : Support input tag type */
185 #define ENABLE_TIZEN_INPUT_TAG_EXTENSION 1 /* Yuni Jeong : For setting & getting focused input element value */
186 #define ENABLE_TIZEN_CONTEXT_MENU_TEMPORARY_FIX 1 /* Michał Pakuła : Temporary hack to prevent from crash when calling context menu on editable fiedld */
187 #define ENABLE_TIZEN_FORM_SUBMIT_SUPPORT 1 /* Gyuyoung Kim : fix a problem when form submits data to specific window */
188 #define ENABLE_TIZEN_H0100127367_FACEBOOK_ISSUE 1 /* Who is owner ? : Unresolved issue on m.facebook.com, webkit's bugzilla ticket created (bug 62122)*/
189 #define ENABLE_TIZEN_SCROLL_ADDING_FIX 1 /* Kamil Blank : Fix for _ewk_view_scroll_add (pending repaints were wrongly updated) */
190 #define ENABLE_TIZEN_CONTEXT_MENU_SELECT 1 /* Michał Pakuła : Adds Select All and Select options to context menu */
192 #define ENABLE_TIZEN_DAILY_UPVERSIONING 1 /* Krzysztof Czech : Used for fixing building errors while doing daily upversioning, should be deleted before merging to master*/
194 #define ENABLE_TIZEN_GRAPHICSCONTEXT_COLLECT_REGION 1 /*KyungTae Kim : Collect clip regions in GraphicsContext for clipping in endTransparencyLayer */
195 #define ENABLE_TIZEN_FONTCACHE_DEPRECATED 1 /* JungJik Lee : Deprecate FontCachePurgePreventer Temporarily*/
196 #define ENABLE_TIZEN_SEARCH_FIELD_STYLE 1 /* Jaehun Lim : making search fields style-able */
197 #define ENABLE_TIZEN_RELOAD_CACHE_POLICY_PATCH 1 /*Sungman Kim : Set cache policy of initialRequest to ReloadIgnoringCacheData from browser reload*/
198 #define ENABLE_TIZEN_FIX_ABNORMAL_CAIRO_SURFACE 1 /* JungJik Lee : Too big size cairo surface created m.daum.net issue */
199 #define ENABLE_TIZEN_NOTIFICATION 1 /* Kihong Kwon : Temp patch for notification score in the html5test.com */
200 #define ENABLE_TIZEN_OFFSET_UPDATE 1 /* Tomasz Morawski : fix for scroll issue when slow path is used */
201 #define ENABLE_TIZEN_ADJUST_PATTERN_MATRIX 1 /*KyungTae Kim : Adjust pattern matrix of repeated images to align to dest pixel grid for fixing seam issues */
202 #define ENABLE_TIZEN_SUPPORT_WEBAPP_META_TAG 1 /* Jinwoo Song : Support Apple-Specific Meta Tags */
203 #if ENABLE(ENABLE_TIZEN_OFFSET_UPDATE) && !ENABLE(TIZEN_VIEW_TYPE_CHECK)
204 #error "ENABLE_TIZEN_OFFSET_UPDATE requires TIZEN_VIEW_TYPE_CHECK"
207 #if ENABLE(INDEXED_DATABASE)
208 #define ENABLE_TIZEN_INDEXED_DATABASE 1 /* DongGwan Kim : Support IndexedDB for JS bindings */
211 #define ENABLE_TIZEN_ATLAS_IMAGE_BUG_FIX 1 /*KyungTae Kim : For fixing atlas image bug(when draw part of image, surrounding pixels were shown), using subSurface when draw part of image*/
213 #define ENABLE_TIZEN_SMART_CLASS_TYPE_STR 1 /* Jaehun Lim : Fix UG crash */
214 #define ENABLE_TIZEN_SET_RECT_ANTIALIAS_NONE 1 /*KyungTae Kim : Off the antialias of clip and fill for rect for fixing whiteline bug on unaligned rect*/
215 #define ENABLE_TIZEN_INFLATE_NONE_BLUR_SHADOW_AREA 1 /*KyungTae Kim : Enlarge the clipping area 1 pixel so that the fill does not bleed (due to antialiasing) if the context is transformed*/
217 #define ENABLE_TIZEN_FT_EMBOLDEN_FOR_SYNTHETIC_BOLD 1 /*Younghwan Cho : Use freetype's 'embolden' instead of drawing twice for synthetic bold*/
219 #define ENABLE_TIZEN_NOT_CHECK_ROUNDED_BORDER_ALL_CLIPPED_OUT 1 /*KyungTae Kim : For fixing rounded rect border bug(borders on different tiles looks different), remove code for checking rounded rect border all clipped out and setting round to 0*/
220 #define ENABLE_TIZEN_ROUNDED_BORDER_CLIP_ANTIALIAS_ON 1 /*KyungTae Kim : On the antialias setting for a convex polygon clip for a rounded rect. The antialias setting for rounded rects' borders must be ON because rounded rects painted with antialias on*/
221 #define ENABLE_TIZEN_NAVIGATOR_LANGUAGE_STR 1 /* Kihong Kwon : Modify return value from like a "ko-KR.UTF8" to "ko-KR" for "navigator.language". */
222 #define ENABLE_TIZEN_ALLOW_TEXT_ENCODING_DETECTION_ONLY_ONCE 1 /*Kangil Han : To fix text broken issue when reads local html file created by email application*/
223 #if ENABLE(TIZEN_NOT_CHECK_ROUNDED_BORDER_ALL_CLIPPED_OUT) && ENABLE(TIZEN_ROUNDED_BORDER_CLIP_ANTIALIAS_ON)
224 #define ENABLE_TIZEN_AA_OFF_FOR_SOLID_BORDER 1 /*Younghwan Cho : border's background shows up in the edge of the box, when it's unaligned. To fix this bug, off the Antialias in this case. and the two conditions are for AA-sync*/
227 /* EWK and WebCore's patches */
228 #define ENABLE_TIZEN_SELECTIVE_RENDERING 1 /* Tomasz Morawski : feature that allows to render tiles durring panning and zooming */
229 #define ENABLE_TIZEN_WEBCORE_SELECTIVE_RENDERING 1 /* Tomasz Morawski : feature that allows to delays decompression of images durring panning */
230 #if ENABLE(TIZEN_WEBCORE_SELECTIVE_RENDERING) && !ENABLE(TIZEN_SELECTIVE_RENDERING)
231 #error "TIZEN_WEBCORE_SELECTIVE_RENDERING requires TIZEN_SELECTIVE_RENDERING"
234 #define ENABLE_TIZEN_SHOULD_ALLOW_OPEN_URL 1 /* Tomasz Morawski : feature that allows application to decide if url sould be opened or not */
237 #define ENABLE_TIZEN_FIX_RSS_IMAGE_DISPLAY 1/* KwangHyuk : Image display error in RSS*/
239 #define ENABLE_TIZEN_ONSCROLL_EVENT_SUPPRESSION 1 /* SangSeok Lim: a feature that prevents DOM scroll events from firing during panning. instead if needed, at the end of panning, DOM scroll event will fire once for web site compatibility by ewk_frame_onscroll_event_generate */
241 #define ENABLE_TIZEN_AUTOFOCUS_BLOCK 1 /* Michał Pakuła : Feature that allows to block showing virtual keyboard when web page automatically focuses input field */
243 #define ENABLE_TIZEN_SCALEPAGE_SUPPORT 1 /* use scalePage instead of cairo scaling; Ryuan Choi <ryuan.choi@samsung.com> */
244 #define ENABLE_TIZEN_CONTEXTSHADOW_BLUR_NEON 0 /* use neon shadowblur function in ContextShadow.cpp <hyunki.baik@samsung.com> */
246 /* Download Patches */
247 #define ENABLE_TIZEN_DOWNLOAD 1 /* Keunsoon Lee : */
248 #define ENABLE_TIZEN_DOWNLOAD_SUPPORT_SSL 1 /* Keunsoon Lee : */
251 /* Geolocation's patches */
252 #if ENABLE(GEOLOCATION)
253 #define ENABLE_TIZEN_GEOLOCATION 1 /* Gyuyoung Kim : */
254 #define ENABLE_TIZEN_GEOLOCATION_TIMEOUT_INCREASE 1 /* Gyuyoung Kim : Need to increase timeout time because slp gps's connection needs to wait about 45 sec */
257 #if ENABLE(FILE_SYSTEM)
258 #define ENABLE_TIZEN_FILE_SYSTEM 1 /* Dongwoo Im : */
261 /* Visibility's patches */
262 #if ENABLE(PAGE_VISIBILITY_API)
263 #define ENABLE_TIZEN_PAGE_VISIBILITY_API 1 /* Dongwoo Im : */
267 #if ENABLE(WEB_AUDIO)
268 #define ENABLE_TIZEN_WEB_AUDIO 1 /* Dongwoo Im : Enable or Disable Tizen WebAudio feature.*/
269 #define ENABLE_TIZEN_PREVENT_DEADLOCK_WEB_AUDIO 1 /* Sanghyun Park : Prevent Deadlock from HRTF Database. */
272 /* RequestAnimationFrame API patche */
273 #if ENABLE(REQUEST_ANIMATION_FRAME)
275 #define WTF_USE_TIZEN_REQUEST_ANIMATION_FRAME_TIMER 1
279 /* Support for TIZEN Multimedia Framework to play videos */
281 #if ENABLE(MM_PLAYER)
282 #define ENABLE_TIZEN_MM_PLAYER 1 /* KwangYong Choi : */
286 /* Fullscreen API patch*/
287 #if ENABLE(FULLSCREEN_API)
288 #define ENABLE_TIZEN_FULLSCREEN_API 1 /* Jinwoo Song: Enable Fullscreen API */
292 #define ENABLE_TIZEN_SUPPORT_PLUGINS 1 /* Mariusz Grzegorczyk : */
293 #define ENABLE_TIZEN_EVAS_OBJECT_PLUGIN 1 /* Mariusz Grzegorczyk : */
294 #define ENABLE_TIZEN_EVAS_OBJECT_PLUGIN_ORDER 0 /* Grzegorz Czajkowski: allow to set right order of evas objects based on z-order */
295 #define ENABLE_TIZEN_PLUGIN_PARENT_WINDOW 1 /* Mariusz Grzegorczyk : */
296 #define ENABLE_TIZEN_PLUGIN_BEHIND_BACKING_STORE 0 /* Mariusz Grzegorczyk : */
297 #if !ENABLE(TIZEN_WEBKIT2)
298 #define ENABLE_TIZEN_KEYGEN 1 /* Dongwoo Im : */
299 #define ENABLE_TIZEN_REDUCE_PLUGINS_FPS_WHILE_PANNING 1 /* Mariusz Grzegorczyk : */
300 #define ENABLE_TIZEN_WEAK_ZOOM_ON_PLUGINS 1 /* Mariusz Grzegorczyk : */
301 #define ENABLE_TIZEN_DYNAMIC_LOADED_PLUGINS 1 /* Grzegorz Czajkowski : */
302 #define ENABLE_TIZEN_ON_OFF_SPECIFIED_PLUGINS 1 /* Mariusz Grzegorczyk : */
303 #define ENABLE_TIZEN_RUN_PLUGINS_WITH_WRONG_OR_EMPTY_TYPE 1 /* Mariusz Grzegorczyk : */
304 #define ENABLE_TIZEN_PLUGIN_PAUSE_RESUME 1 /* Mariusz Grzegorczyk : */
305 #define ENABLE_TIZEN_PLUGIN_OOM_HANDLING_FIX 1 /* Grzegorz Czajkowski: do not repeat dummy requests when OOM occurred in plugin */
306 /* Support for TIZEN WAC2.0 camera module */
307 #if ENABLE(TIZEN_WAC_CAMERA)
308 #define ENABLE_TIZEN_WAC_CAMERA_SUPPORT 1
310 #define ENABLE_TIZEN_PLUGIN_LOADING_FLOW 1 /* Grzegorz Czajkowski: new flow of loading plugins when requested library doesn't exist
311 - missing plugin indicator is shown when plugins are enabled,
312 - empty content is shown when plugins are disabled. */
316 /* This macro is for block panning over plugins that returns true from NPP_HandleEvent,
317 which means that all mouse events should go to plugin */
318 #define ENABLE_TIZEN_DONT_PAN_OVER_SOME_PLUGINS 1 /* Mariusz Grzegorczyk : */
319 #define ENABLE_TIZEN_MARK_PLUGIN_HANDLING_EVENTS 1 /* Mariusz Grzegorczyk : */
322 * Extend standard npapi NPNVariable
324 #define ENABLE_TIZEN_PLUGIN_NPNVARIABLE_EXTENSION 1 /* Mariusz Grzegorczyk : */
327 * Replace XEvents with SNPEvents for slp platform needs
329 #define ENABLE_TIZEN_PLUGIN_SNPEVENT 0 /* Mariusz Grzegorczyk : */
332 * Increase interval of EFL timer used for TIZEN Plugin
334 #define ENABLE_TIZEN_PLUGIN_TIMER_INTERVAL_INCREASE 1 /* Bang Kwang Min */
337 * support requestToNative,json signal, JS -> Plugin -> WebCore -> Ecore Event -> Native App
339 #define ENABLE_TIZEN_JSBRIDGE_PLUGIN 1 /* Bang Kwang Min */
341 /* Debugging Patch */
342 #define ENABLE_TIZEN_LOG 1 /* Gyuyoung Kim : */
343 #if ENABLE(TIZEN_LOG)
344 #define ENABLE_TIZEN_EWK_ERROR_LOG 1 /* JungJik Lee : Add log message for the error trace */
345 #define ERROR_DISABLED 0
346 #define LOG_DISABLED 0
349 /* change MAX_CONNECTIONS_PER_HOST value 6 -> 12 */
350 /* enhanced network loading speed */
351 /* apply tunning value */
352 #define ENABLE_TIZEN_SESSION_CONNECTION_PER_HOST_TUNNING 1 /* Who is owner ? : */
356 #define ENABLE_TIZEN_SET_PROXY 1 /* Łukasz Ślachciak : */
357 /* macro which solve network delay when some of contents was blocked for a while
358 - example) m.daum.net, m.paran.com
359 - When one of request was blocked, progress looks stopped at 50~60%(but almost was loaded) */
360 #define ENABLE_TIZEN_NETWORK_DELAYED_RESOURCE_SOLVE 1 /* Łukasz Ślachciak : */
361 /* need to reset session when network device is changed.(3G->wifi, wifi->3G)
362 * simple websites try to use previous socket which is binded previous network
365 #define ENABLE_TIZEN_SESSION_REQUEST_CANCEL 1 /* Who is owner ? : */
368 /* enables ewk part of webkit soup cache */
369 #define ENABLE_TIZEN_SOUP_CACHE 1 /* Kwangtae Ko : */
370 /* handle status code 5xx after receiving HTTP body */
371 #define ENABLE_TIZEN_SOUP_HANDLE_STATUS_CODE_5XX_AFTER_RECEIVING_HTTP_BODY 1 /* changhyup Jwa : */
373 #define ENABLE_TIZEN_RESTARTED_CALLBACK_BUG_FIX 1 /*Sungman Kim : Resource handle ref count bug fix when restarted callback call*/
375 #define ENABLE_TIZEN_PERSISTENT_COOKIES_SQL 1 /* Kwangtae Ko : */
377 #define ENABLE_TIZEN_PAUSE_NETWORK 1 /* Gyuyoung Kim : */
378 #define ENABLE_TIZEN_HTTP_HEADER_REQUEST_APPEND 1 /* Gyuyoung Kim : */
381 /* Workaround Patches */
382 #define ENABLE_TIZEN_PREVENT_INCREMENTAL_IMAGE_RENDERING_WORKAROUND 1 /* Ryuan Choi : */
383 #define ENABLE_TIZEN_PREVENT_CRASH_SVG_FONTS_AND_SAMSUNG_COM_US 1 /* Ryuan Choi : */
384 #define ENABLE_TIZEN_PREVENT_SCROLLER_IN_HTML_TAG 1 /* Ryuan Choi : */
385 /* fix for showing callendar on expedia site when frame flattening enabled */
386 #define ENABLE_TIZEN_EXPEDIA_CALENDAR_FIX 1
387 /* fix for "white background appears while page is changed" */
388 #define ENABLE_TIZEN_WHITE_LOADING_FIX 1
389 /* fix for _ewk_view_smart_del due to crash of paused JavaScript when exiting */
390 #define ENABLE_TIZEN_DESTROY_FIX 1
391 #define ENABLE_TIZEN_POPUP_FIX 1
392 /* fix for issue with old tiles being visible after layout size change (e.g. after screen orientation change) */
393 #define ENABLE_TIZEN_CLEAN_AFTER_RELAYOUT_FIX 1 /* JungJik Lee : */
394 /* fix for issue with non-updated tiles after contents resize*/
395 #define ENABLE_TIZEN_CTBS_UPDATE_AFTER_CONTENTS_RESIZE 1
396 /* fix for connection timeout */
397 #define ENABLE_TIZEN_TIMEOUT_FIX 1 /* Łukasz Ślachciak : */
398 /* fix for youtube.com site - floating quicklist hidden */
399 #define ENABLE_TIZEN_YOUTUBE_QUICKLIST_FIX 1 /* Łukasz Ślachciak : */
400 /* fix for m.naver.com input field issue */
401 #define ENABLE_TIZEN_ZOOM_SET_INTERNAL_FIX 1 /* Kamil Blank : */
402 /* Workaround for character interval defect */
403 #define ENABLE_TIZEN_FONT_HINT_NONE 1 /* Jaesick Chang : */
404 /* Fix for continues layout when element having width given in percent is nested in flattened frame
405 https://bugs.webkit.org/show_bug.cgi?id=54284
407 #define ENABLE_TIZEN_ELEMENTS_NESTED_IN_FLATTENED_FRAME_FIX 1 /* Piotr Roguski : */
408 /* fix for wrong calculation of backing store's zoom center position. */
409 #define ENABLE_TIZEN_FIX_BUILD_BREAK_GCC_4_5 1 /* Gyuyoung Kim : */
410 /* View mode patches */
411 #define ENABLE_TIZEN_VIEW_MODE 1 /* Who is ownver ? : */
412 #define ENABLE_TIZEN_PREVENT_CRASH_VIMEO_SITE 1 /* Jaehun Lim : Add NULL check to prevent crash in vimeo.com (for i386 or non-flash environment) */
413 /* update ewk_frame_script_execute to return the result for JavaScript */
414 /* fix recursive layout for frame flattening in homeway.com.cn and fnnews.com */
415 #define ENABLE_TIZEN_FIX_RECURSIVE_LAYOUT_FOR_FRAME_FLATTENING 1 /* Jongseok Yang */
416 /* Workaround for using the defaut encoding set */
417 #define ENABLE_TIZEN_SET_DEFAULT_ENCODING 1 /* Jinwoo Song */
418 #define ENABLE_TIZEN_CLEAN_SHUTDOWN 1 /* Jaehun Lim : deallocate memory resources during ewk_shutdown() */
419 /* Workaround for duplicated url loading defect : FIXME this bug should be fixed after finding libsoup or glib error cause */
420 #define ENABLE_TIZEN_DUPLICATED_LOAD_URL_FIX 1 /*Sungman Kim : Prevent same url loading as previous*/
424 #define ENABLE_YARR 1
425 #define ENABLE_YARR_JIT 1
428 /* Original Webkit Features */
429 #define ENABLE_TIZEN_REMOTE_WEB_INSPECTOR 1 /* Seokju Kwon */
430 #define ENABLE_INSPECTOR 1
432 #define ENABLE_MAC_JAVA_BRIDGE 0
433 #define ENABLE_IMAGE_DECODER_DOWN_SAMPLING 0
434 #define ENABLE_TIZEN_REMOVE_DRAWLINE_ANTIALIAS_NONE 1 /* Keunyong Lee : Dash/Dot Box border and Text UnderLine display Bug Fix*/
435 #define ENABLE_WIDGETS_10_SUPPORT 1
436 #if ENABLE(TIZEN_SUPPORT_PLUGINS)
437 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
440 #if ENABLE(TIZEN_WEBKIT2)
441 /* FIXME: We should turn on all of macros */
442 #undef ENABLE_TIZEN_CONTEXT_MENU
443 #undef ENABLE_TIZEN_CAIRO_SCALE_PATCH
444 #undef ENABLE_TIZEN_CERTIFICATE_HANDLING
445 #undef ENABLE_TIZEN_SAVE_IMAGE
446 #undef ENABLE_TIZEN_INNER_SCREEN_RECT
448 #undef ENABLE_TIZEN_GEOLOCATION /* Yuni Jeong : This macro doesn't be used in WK2. So it have to be undefined in WK2. */
450 #define ENABLE_TIZEN_CONTEXT_MENU_WEBKIT_2 1 /* Gyuyoung Kim, Eunmi Lee : Support Context Menu for EFL WebKit2 */
451 #define WTF_USE_TILED_BACKING_STORE 1
452 #if USE(TILED_BACKING_STORE)
453 #define ENABLE_TIZEN_WEBKIT2_TILED_BACKING_STORE 1 /* Youngtaeck Song : Tiled backing store for Tizen */
454 #define ENABLE_TIZEN_WEBKIT2_TILED_SCROLLBAR 1 /* Ryuan Choi : Scrollbar implementation for Tiled DrawingArea */
455 #define ENABLE_TIZEN_GL_TILED_BACKING_STORE 0 /* Eunsol Park : Tiled backing store using GL textures*/
457 #define ENABLE_TIZEN_RECORDING_SURFACE_SET 0 /* hyunki baik : recording surface features for WK2 */
458 #if ENABLE(TIZEN_RECORDING_SURFACE_SET)
459 #define ENABLE_TIZEN_RECORDING_SURFACE_PAINT_THREAD 0 /* hyunki baik, hyunji kim : enable paint thread for parallelization in WK2 */
463 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
464 #define ENABLE_TIZEN_WEBKIT2_TILED_AC 1 /* Youngtaeck Song : Tiling with Acceletated compositing for Tizen */
467 #define ENABLE_TIZEN_GESTURE 1 /* Eunmi Lee : Use Gesture which uses elm_gesture_layer. */
469 /* Implement the functions to manager cookies in CookieJar for WebKit2.
470 r79722 inserted the functions to manange cookies from web process.
471 (getHostnamesWithCookies,deleteCookiesForHostname,deleteAllCookies) */
472 #define ENABLE_TIZEN_IMPLEMENT_MANAGING_COOKIES_FOR_WEBKIT2 1 /* Jongseok Yang */
474 #define ENABLE_TIZEN_PREFERENCE 1 /* Eunmi Lee : for slp specific preferences */
476 #define ENABLE_TIZEN_SOUP_COOKIE_CACHE_FOR_WEBKIT2 1 /* Jongseok Yang : Implement soup cache, cookie */
477 #define ENABLE_TIZEN_WEBKIT2_THEME_WORKAROUND 1 /* Ryuan Choi : temporal approach to support theme. */
478 #define ENABLE_TIZEN_WEBKIT2_MODAL_SUPPORT 1 /* Ryuan Choi : Default modal implementation. */
479 #define ENABLE_TIZEN_WEBKIT2_HTTP_401_AUTHENTICATION_SUPPORT 1 /* Yuni Jeong : for supporting HTTP 401 Authentication */
480 #define ENABLE_TIZEN_WEBKIT2_PROXY 1 /* Ryuan Choi : Provide API to set proxy */
482 #endif /* ENABLE(TIZEN_WEBKIT2) */
484 /* This is only temporary macro to enable further plugin process implementation.
485 Appropriate commit(bug 60629 in bugzilla) will be merged while upversioning.
486 Implements plugin process for UNIX platform.*/
487 #define ENABLE_TIZEN_APPLY_BUG_60629_FOR_PLUGIN_PROCESS 1 /* Mariusz Grzegorczyk */
489 /* When displaying menu list using menu icon, a additional scrollbar is displayed in the screen center
490 So, this patch is to remove the logic for a additional scrollbar */
491 #define ENABLE_TIZEN_FIX_DRAWING_ADDITIONAL_SCROLLBAR 1 /* Jongseok Yang */
494 * Problem : An additional scrollbar is displayed in the screen center when loading is finished as auto fitting.
495 * Solution : Remove the Widget::frameRectsChanged for EFL port. */
496 #define ENABLE_TIZEN_FIX_SCROLLBAR_FOR_AUTO_FITTING 1 /* Jongseok Yang */
498 /* The scrollbar just for ScrollView is disaplyed.
499 The scrollbar for other object is not displayed. (ex. DIV scrollbar) */
500 #define ENABLE_TIZEN_DISPLAY_SCROLLBAR_JUST_FOR_SCROLLVIEW 1 /* Jongseok Yang */
502 /* If the memory block using singleton pettern is freed outside the pattern,
503 the block is freed but the variable has an invalid address as ever.
504 So, It may cause some defect when repeating ewk_init and ewk_shutdown. */
505 #define ENABLE_TIZEN_FIX_ISSUE_FOR_REPEATED_INIT_AND_SHUTDOWN 1 /* Jongseok Yang */
507 #endif /* OS(TIZEN) */
509 /* ==== CPU() - the target CPU architecture ==== */
511 /* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
513 /* CPU(ALPHA) - DEC Alpha */
514 #if defined(__alpha__)
515 #define WTF_CPU_ALPHA 1
518 /* CPU(IA64) - Itanium / IA-64 */
519 #if defined(__ia64__)
520 #define WTF_CPU_IA64 1
521 /* 32-bit mode on Itanium */
522 #if !defined(__LP64__)
523 #define WTF_CPU_IA64_32 1
527 /* CPU(MIPS) - MIPS 32-bit */
528 /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */
529 #if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
531 #define WTF_CPU_MIPS 1
532 #if defined(__MIPSEB__)
533 #define WTF_CPU_BIG_ENDIAN 1
535 #define WTF_MIPS_PIC (defined __PIC__)
536 #define WTF_MIPS_ARCH __mips
537 #define WTF_MIPS_ISA(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH == v)
538 #define WTF_MIPS_ISA_AT_LEAST(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH >= v)
539 #define WTF_MIPS_ARCH_REV __mips_isa_rev
540 #define WTF_MIPS_ISA_REV(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == v)
541 #define WTF_MIPS_DOUBLE_FLOAT (defined __mips_hard_float && !defined __mips_single_float)
542 #define WTF_MIPS_FP64 (defined __mips_fpr && __mips_fpr == 64)
543 /* MIPS requires allocators to use aligned memory */
544 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
547 /* CPU(PPC) - PowerPC 32-bit */
548 #if defined(__ppc__) \
549 || defined(__PPC__) \
550 || defined(__powerpc__) \
551 || defined(__powerpc) \
552 || defined(__POWERPC__) \
555 #define WTF_CPU_PPC 1
556 #define WTF_CPU_BIG_ENDIAN 1
559 /* CPU(PPC64) - PowerPC 64-bit */
560 #if defined(__ppc64__) \
561 || defined(__PPC64__)
562 #define WTF_CPU_PPC64 1
563 #define WTF_CPU_BIG_ENDIAN 1
566 /* CPU(SH4) - SuperH SH-4 */
568 #define WTF_CPU_SH4 1
571 /* CPU(SPARC32) - SPARC 32-bit */
572 #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
573 #define WTF_CPU_SPARC32 1
574 #define WTF_CPU_BIG_ENDIAN 1
577 /* CPU(SPARC64) - SPARC 64-bit */
578 #if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
579 #define WTF_CPU_SPARC64 1
580 #define WTF_CPU_BIG_ENDIAN 1
583 /* CPU(SPARC) - any SPARC, true for CPU(SPARC32) and CPU(SPARC64) */
584 #if CPU(SPARC32) || CPU(SPARC64)
585 #define WTF_CPU_SPARC 1
588 /* CPU(S390X) - S390 64-bit */
589 #if defined(__s390x__)
590 #define WTF_CPU_S390X 1
591 #define WTF_CPU_BIG_ENDIAN 1
594 /* CPU(S390) - S390 32-bit */
595 #if defined(__s390__)
596 #define WTF_CPU_S390 1
597 #define WTF_CPU_BIG_ENDIAN 1
600 /* CPU(X86) - i386 / x86 32-bit */
601 #if defined(__i386__) \
603 || defined(_M_IX86) \
605 || defined(__THW_INTEL)
606 #define WTF_CPU_X86 1
609 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
610 #if defined(__x86_64__) \
612 #define WTF_CPU_X86_64 1
615 /* CPU(ARM) - ARM, any version*/
617 || defined(__arm__) \
620 #define WTF_CPU_ARM 1
622 #if defined(__ARMEB__) || (COMPILER(RVCT) && defined(__BIG_ENDIAN))
623 #define WTF_CPU_BIG_ENDIAN 1
625 #elif !defined(__ARM_EABI__) \
626 && !defined(__EABI__) \
627 && !defined(__VFP_FP__) \
628 && !defined(_WIN32_WCE) \
630 #define WTF_CPU_MIDDLE_ENDIAN 1
634 #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
636 /* Set WTF_ARM_ARCH_VERSION */
637 #if defined(__ARM_ARCH_4__) \
638 || defined(__ARM_ARCH_4T__) \
639 || defined(__MARM_ARMV4__) \
641 #define WTF_ARM_ARCH_VERSION 4
643 #elif defined(__ARM_ARCH_5__) \
644 || defined(__ARM_ARCH_5T__) \
645 || defined(__MARM_ARMV5__)
646 #define WTF_ARM_ARCH_VERSION 5
648 #elif defined(__ARM_ARCH_5E__) \
649 || defined(__ARM_ARCH_5TE__) \
650 || defined(__ARM_ARCH_5TEJ__)
651 #define WTF_ARM_ARCH_VERSION 5
652 /*ARMv5TE requires allocators to use aligned memory*/
653 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
655 #elif defined(__ARM_ARCH_6__) \
656 || defined(__ARM_ARCH_6J__) \
657 || defined(__ARM_ARCH_6K__) \
658 || defined(__ARM_ARCH_6Z__) \
659 || defined(__ARM_ARCH_6ZK__) \
660 || defined(__ARM_ARCH_6T2__) \
661 || defined(__ARMV6__)
662 #define WTF_ARM_ARCH_VERSION 6
664 #elif defined(__ARM_ARCH_7A__) \
665 || defined(__ARM_ARCH_7R__)
666 #define WTF_ARM_ARCH_VERSION 7
668 /* RVCT sets _TARGET_ARCH_ARM */
669 #elif defined(__TARGET_ARCH_ARM)
670 #define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
672 #if defined(__TARGET_ARCH_5E) \
673 || defined(__TARGET_ARCH_5TE) \
674 || defined(__TARGET_ARCH_5TEJ)
675 /*ARMv5TE requires allocators to use aligned memory*/
676 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
680 #define WTF_ARM_ARCH_VERSION 0
684 /* Set WTF_THUMB_ARCH_VERSION */
685 #if defined(__ARM_ARCH_4T__)
686 #define WTF_THUMB_ARCH_VERSION 1
688 #elif defined(__ARM_ARCH_5T__) \
689 || defined(__ARM_ARCH_5TE__) \
690 || defined(__ARM_ARCH_5TEJ__)
691 #define WTF_THUMB_ARCH_VERSION 2
693 #elif defined(__ARM_ARCH_6J__) \
694 || defined(__ARM_ARCH_6K__) \
695 || defined(__ARM_ARCH_6Z__) \
696 || defined(__ARM_ARCH_6ZK__) \
697 || defined(__ARM_ARCH_6M__)
698 #define WTF_THUMB_ARCH_VERSION 3
700 #elif defined(__ARM_ARCH_6T2__) \
701 || defined(__ARM_ARCH_7__) \
702 || defined(__ARM_ARCH_7A__) \
703 || defined(__ARM_ARCH_7R__) \
704 || defined(__ARM_ARCH_7M__)
705 #define WTF_THUMB_ARCH_VERSION 4
707 /* RVCT sets __TARGET_ARCH_THUMB */
708 #elif defined(__TARGET_ARCH_THUMB)
709 #define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
712 #define WTF_THUMB_ARCH_VERSION 0
716 /* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
717 /* On ARMv5 and below the natural alignment is required.
718 And there are some other differences for v5 or earlier. */
719 #if !defined(ARMV5_OR_LOWER) && !WTF_ARM_ARCH_AT_LEAST(6)
720 #define WTF_CPU_ARMV5_OR_LOWER 1
724 /* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
725 /* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
726 /* Only one of these will be defined. */
727 #if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
728 # if defined(thumb2) || defined(__thumb2__) \
729 || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
730 # define WTF_CPU_ARM_TRADITIONAL 0
731 # define WTF_CPU_ARM_THUMB2 1
732 # elif WTF_ARM_ARCH_AT_LEAST(4)
733 # define WTF_CPU_ARM_TRADITIONAL 1
734 # define WTF_CPU_ARM_THUMB2 0
736 # error "Not supported ARM architecture"
738 #elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
739 # error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
740 #endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
742 #if defined(__ARM_NEON__) && !defined(WTF_CPU_ARM_NEON)
743 #define WTF_CPU_ARM_NEON 1
748 #if CPU(ARM) || CPU(MIPS) || CPU(SH4)
749 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
752 /* ==== OS() - underlying operating system; only to be used for mandated low-level services like
753 virtual memory, not to choose a GUI toolkit ==== */
755 /* OS(ANDROID) - Android */
757 #define WTF_OS_ANDROID 1
765 /* OS(DARWIN) - Any Darwin-based OS, including Mac OS X and iPhone OS */
767 #define WTF_OS_DARWIN 1
769 #include <Availability.h>
770 #include <AvailabilityMacros.h>
771 #include <TargetConditionals.h>
775 /* OS(MAC_OS_X) - Mac OS X (not including iOS) */
776 #if OS(DARWIN) && ((defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) \
777 || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) \
778 || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR))
780 #elif OS(DARWIN) && defined(TARGET_OS_MAC) && TARGET_OS_MAC
781 #define WTF_OS_MAC_OS_X 1
782 /* FIXME: BUILDING_ON_.., and TARGETING... macros should be folded into the OS() system */
783 #if !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
784 #define BUILDING_ON_LEOPARD 1
785 #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
786 #define BUILDING_ON_SNOW_LEOPARD 1
787 #elif !defined(MAC_OS_X_VERSION_10_8) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
788 #define BUILDING_ON_LION 1
790 #if !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
791 #define TARGETING_LEOPARD 1
792 #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
793 #define TARGETING_SNOW_LEOPARD 1
794 #elif !defined(MAC_OS_X_VERSION_10_8) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
795 #define TARGETING_LION 1
799 /* OS(FREEBSD) - FreeBSD */
800 #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
801 #define WTF_OS_FREEBSD 1
804 /* OS(LINUX) - Linux */
806 #define WTF_OS_LINUX 1
809 /* OS(NETBSD) - NetBSD */
810 #if defined(__NetBSD__)
811 #define WTF_OS_NETBSD 1
814 /* OS(OPENBSD) - OpenBSD */
816 #define WTF_OS_OPENBSD 1
820 #if defined(__QNXNTO__)
824 /* OS(SOLARIS) - Solaris */
825 #if defined(sun) || defined(__sun)
826 #define WTF_OS_SOLARIS 1
829 /* OS(WINCE) - Windows CE; note that for this platform OS(WINDOWS) is also defined */
830 #if defined(_WIN32_WCE)
831 #define WTF_OS_WINCE 1
834 /* OS(WINDOWS) - Any version of Windows */
835 #if defined(WIN32) || defined(_WIN32)
836 #define WTF_OS_WINDOWS 1
839 /* OS(UNIX) - Any Unix-like system */
852 #define WTF_OS_UNIX 1
855 /* Operating environments */
857 /* FIXME: these are all mixes of OS, operating environment and policy choices. */
858 /* PLATFORM(CHROMIUM) */
862 /* PLATFORM(BLACKBERRY) */
865 #if defined(BUILDING_CHROMIUM__)
866 #define WTF_PLATFORM_CHROMIUM 1
867 #elif defined(BUILDING_QT__)
868 #define WTF_PLATFORM_QT 1
869 #elif defined(BUILDING_WX__)
870 #define WTF_PLATFORM_WX 1
871 #elif defined(BUILDING_GTK__)
872 #define WTF_PLATFORM_GTK 1
873 #elif defined(BUILDING_BLACKBERRY__)
874 #define WTF_PLATFORM_BLACKBERRY 1
876 #define WTF_PLATFORM_MAC 1
878 #define WTF_PLATFORM_WIN 1
882 /* FIXME: this is sometimes used as an OS switch and sometimes for higher-level things */
883 #if (defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
884 #define WTF_PLATFORM_IOS 1
887 /* PLATFORM(IOS_SIMULATOR) */
888 #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR
889 #define WTF_PLATFORM_IOS 1
890 #define WTF_PLATFORM_IOS_SIMULATOR 1
892 #define WTF_PLATFORM_IOS_SIMULATOR 0
895 #if !defined(WTF_PLATFORM_IOS)
896 #define WTF_PLATFORM_IOS 0
899 /* Graphics engines */
901 /* USE(CG) and PLATFORM(CI) */
902 #if PLATFORM(MAC) || PLATFORM(IOS)
905 #if PLATFORM(MAC) || PLATFORM(IOS) || (PLATFORM(WIN) && USE(CG))
909 /* USE(SKIA) for Win/Linux, CG for Mac, unless enabled */
910 #if PLATFORM(CHROMIUM)
912 #if USE(SKIA_ON_MAC_CHROMIUM)
913 #define WTF_USE_SKIA 1
917 #define WTF_USE_ATSUI 1
918 #define WTF_USE_CORE_TEXT 1
919 #define WTF_USE_ICCJPEG 1
921 #define WTF_USE_SKIA 1
922 #define WTF_USE_CHROMIUM_NET 1
926 #if PLATFORM(BLACKBERRY)
927 #define ENABLE_DRAG_SUPPORT 0
928 #define USE_SYSTEM_MALLOC 1
929 #define WTF_USE_MERSENNE_TWISTER_19937 1
930 #define WTF_USE_SKIA 1
934 #define WTF_USE_CAIRO 1
939 #define WTF_USE_MERSENNE_TWISTER_19937 1
942 /* On Windows, use QueryPerformanceCounter by default */
944 #define WTF_USE_QUERY_PERFORMANCE_COUNTER 1
947 #if OS(WINCE) && !PLATFORM(QT)
948 #define NOMINMAX /* Windows min and max conflict with standard macros */
949 #define NOSHLWAPI /* shlwapi.h not available on WinCe */
951 /* MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file. */
952 #define __usp10__ /* disable "usp10.h" */
954 #define _INC_ASSERT /* disable "assert.h" */
957 #endif /* OS(WINCE) && !PLATFORM(QT) */
960 #ifndef WTF_USE_ICU_UNICODE
961 #define WTF_USE_QT4_UNICODE 1
964 #define WTF_USE_WINCE_UNICODE 1
966 /* The GTK+ Unicode backend is configurable */
968 #define WTF_USE_ICU_UNICODE 1
971 #if PLATFORM(MAC) && !PLATFORM(IOS)
972 #if !defined(BUILDING_ON_LEOPARD) && CPU(X86_64)
973 #define WTF_USE_PLUGIN_HOST_PROCESS 1
975 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
976 #define ENABLE_GESTURE_EVENTS 1
977 #define ENABLE_RUBBER_BANDING 1
978 #define WTF_USE_SCROLLBAR_PAINTER 1
980 #if !defined(ENABLE_JAVA_BRIDGE)
981 #define ENABLE_JAVA_BRIDGE 1
983 #if !defined(ENABLE_DASHBOARD_SUPPORT)
984 #define ENABLE_DASHBOARD_SUPPORT 1
987 #define WTF_USE_PTHREADS 1
988 #define HAVE_PTHREAD_RWLOCK 1
989 #define HAVE_READLINE 1
990 #define HAVE_RUNLOOP_TIMER 1
991 #define ENABLE_FULLSCREEN_API 1
992 #define ENABLE_SMOOTH_SCROLLING 1
993 #define ENABLE_WEB_ARCHIVE 1
994 #define ENABLE_WEB_AUDIO 1
995 #endif /* PLATFORM(MAC) && !PLATFORM(IOS) */
997 #if PLATFORM(CHROMIUM) && OS(DARWIN)
999 #define WTF_USE_PTHREADS 1
1000 #define HAVE_PTHREAD_RWLOCK 1
1002 #define WTF_USE_WK_SCROLLBAR_PAINTER 1
1006 #define DONT_FINALIZE_ON_MAIN_THREAD 1
1009 #if PLATFORM(QT) && OS(DARWIN)
1010 #define WTF_USE_CF 1
1011 #define HAVE_DISPATCH_H 1
1014 #if OS(DARWIN) && !PLATFORM(GTK) && !PLATFORM(QT)
1015 #define ENABLE_PURGEABLE_MEMORY 1
1019 #define ENABLE_CONTEXT_MENUS 0
1020 #define ENABLE_DRAG_SUPPORT 0
1021 #define ENABLE_DATA_TRANSFER_ITEMS 0
1022 #define ENABLE_FTPDIR 1
1023 #define ENABLE_GEOLOCATION 1
1024 #define ENABLE_ICONDATABASE 0
1025 #define ENABLE_INSPECTOR 1
1026 #define ENABLE_JAVA_BRIDGE 0
1027 #define ENABLE_NETSCAPE_PLUGIN_API 0
1028 #define ENABLE_ORIENTATION_EVENTS 1
1029 #define ENABLE_REPAINT_THROTTLING 1
1030 #define ENABLE_WEB_ARCHIVE 1
1031 #define HAVE_NETWORK_CFDATA_ARRAY_CALLBACK 1
1032 #define HAVE_PTHREAD_RWLOCK 1
1033 #define HAVE_READLINE 1
1034 #define HAVE_RUNLOOP_TIMER 0
1035 #define WTF_USE_CF 1
1036 #define WTF_USE_CFNETWORK 1
1037 #define WTF_USE_PTHREADS 1
1039 #if PLATFORM(IOS_SIMULATOR)
1040 #define ENABLE_INTERPRETER 1
1041 #define ENABLE_JIT 0
1042 #define ENABLE_YARR 0
1043 #define ENABLE_YARR_JIT 0
1045 #define ENABLE_INTERPRETER 1
1046 #define ENABLE_JIT 1
1047 #define ENABLE_YARR 1
1048 #define ENABLE_YARR_JIT 1
1053 #if PLATFORM(WIN) && !OS(WINCE)
1054 #define WTF_USE_CF 1
1055 #define WTF_USE_PTHREADS 0
1058 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !PLATFORM(WIN_CAIRO)
1059 #define WTF_USE_CFNETWORK 1
1062 #if USE(CFNETWORK) || PLATFORM(MAC) || PLATFORM(IOS)
1063 #define WTF_USE_CFURLCACHE 1
1064 #define WTF_USE_CFURLSTORAGESESSIONS 1
1067 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !PLATFORM(QT)
1068 #define ENABLE_WEB_ARCHIVE 1
1071 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !PLATFORM(WIN_CAIRO) && !PLATFORM(QT)
1072 #define ENABLE_FULLSCREEN_API 1
1077 #define ENABLE_ASSEMBLER 1
1078 #define ENABLE_JIT 1
1080 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
1082 #define WTF_USE_CF 1
1083 #define WTF_USE_CORE_TEXT 1
1084 #define ENABLE_WEB_ARCHIVE 1
1090 #define WTF_USE_PTHREADS 1
1091 #define HAVE_PTHREAD_RWLOCK 1
1093 #elif PLATFORM(QT) && OS(UNIX)
1094 #define WTF_USE_PTHREADS 1
1095 #define HAVE_PTHREAD_RWLOCK 1
1098 #if !defined(HAVE_ACCESSIBILITY)
1099 #if PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(CHROMIUM)
1100 #define HAVE_ACCESSIBILITY 1
1102 #endif /* !defined(HAVE_ACCESSIBILITY) */
1105 #define HAVE_SIGNAL_H 1
1108 #if !defined(HAVE_VASPRINTF)
1109 #if !COMPILER(MSVC) && !COMPILER(RVCT) && !COMPILER(MINGW) && !(COMPILER(GCC) && OS(QNX))
1110 #define HAVE_VASPRINTF 1
1114 #if !defined(HAVE_STRNSTR)
1115 #if OS(DARWIN) || (OS(FREEBSD) && !defined(__GLIBC__))
1116 #define HAVE_STRNSTR 1
1120 #if !OS(WINDOWS) && !OS(SOLARIS) && !OS(QNX) \
1123 #define HAVE_TM_GMTOFF 1
1124 #define HAVE_TM_ZONE 1
1125 #define HAVE_TIMEGM 1
1130 #define HAVE_ERRNO_H 1
1131 #define HAVE_LANGINFO_H 1
1133 #define HAVE_MERGESORT 1
1135 #define HAVE_STRINGS_H 1
1136 #define HAVE_SYS_PARAM_H 1
1137 #define HAVE_SYS_TIME_H 1
1138 #define HAVE_SYS_TIMEB_H 1
1139 #define WTF_USE_ACCELERATE 1
1141 #ifndef TARGETING_LEOPARD
1143 #define HAVE_DISPATCH_H 1
1144 #define HAVE_HOSTED_CORE_ANIMATION 1
1147 #define HAVE_MADV_FREE_REUSE 1
1148 #define HAVE_MADV_FREE 1
1149 #define HAVE_PTHREAD_SETNAME_NP 1
1155 #define HAVE_MADV_FREE 1
1156 #define HAVE_PTHREAD_SETNAME_NP 1
1162 #define HAVE_ERRNO_H 0
1164 #define HAVE_SYS_TIMEB_H 1
1165 #define HAVE_ALIGNED_MALLOC 1
1166 #define HAVE_ISDEBUGGERPRESENT 1
1168 #define HAVE_VIRTUALALLOC 1
1172 #define HAVE_ERRNO_H 1
1175 #define HAVE_STRINGS_H 1
1176 #define HAVE_SYS_PARAM_H 1
1177 #define HAVE_SYS_TIME_H 1
1178 #define WTF_USE_PTHREADS 1
1182 #define HAVE_ERRNO_H 1
1183 #define HAVE_LANGINFO_H 0
1186 #define HAVE_STRINGS_H 1
1187 #define HAVE_SYS_PARAM_H 1
1188 #define HAVE_SYS_TIME_H 1
1192 /* FIXME: is this actually used or do other platforms generate their own config.h? */
1194 #define HAVE_ERRNO_H 1
1195 #define HAVE_LANGINFO_H 1
1198 #define HAVE_STRINGS_H 1
1199 #define HAVE_SYS_PARAM_H 1
1200 #define HAVE_SYS_TIME_H 1
1204 /* ENABLE macro defaults */
1207 /* We must not customize the global operator new and delete for the Qt port. */
1208 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
1210 #define USE_SYSTEM_MALLOC 1
1214 /* fastMalloc match validation allows for runtime verification that
1215 new is matched by delete, fastMalloc is matched by fastFree, etc. */
1216 #if !defined(ENABLE_FAST_MALLOC_MATCH_VALIDATION)
1217 #define ENABLE_FAST_MALLOC_MATCH_VALIDATION 0
1220 #if !defined(ENABLE_ICONDATABASE)
1221 #define ENABLE_ICONDATABASE 1
1224 #if !defined(ENABLE_SQL_DATABASE)
1225 #define ENABLE_SQL_DATABASE 1
1228 #if !defined(ENABLE_JAVASCRIPT_DEBUGGER)
1229 #define ENABLE_JAVASCRIPT_DEBUGGER 1
1232 #if !defined(ENABLE_FTPDIR)
1233 #define ENABLE_FTPDIR 1
1236 #if !defined(ENABLE_CONTEXT_MENUS)
1237 #define ENABLE_CONTEXT_MENUS 1
1240 #if !defined(ENABLE_DRAG_SUPPORT)
1241 #define ENABLE_DRAG_SUPPORT 1
1244 #if !defined(ENABLE_DATA_TRANSFER_ITEMS)
1245 #define ENABLE_DATA_TRANSFER_ITEMS 0
1248 #if !defined(ENABLE_DASHBOARD_SUPPORT)
1249 #define ENABLE_DASHBOARD_SUPPORT 0
1252 #if !defined(ENABLE_INSPECTOR)
1253 #define ENABLE_INSPECTOR 1
1256 #if !defined(ENABLE_JAVA_BRIDGE)
1257 #define ENABLE_JAVA_BRIDGE 0
1260 #if !defined(ENABLE_NETSCAPE_PLUGIN_API)
1261 #define ENABLE_NETSCAPE_PLUGIN_API 1
1264 #if !defined(ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE)
1265 #define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0
1268 #if !defined(ENABLE_PURGEABLE_MEMORY)
1269 #define ENABLE_PURGEABLE_MEMORY 0
1272 #if !defined(WTF_USE_PLUGIN_HOST_PROCESS)
1273 #define WTF_USE_PLUGIN_HOST_PROCESS 0
1276 #if !defined(ENABLE_ORIENTATION_EVENTS)
1277 #define ENABLE_ORIENTATION_EVENTS 0
1280 #if !defined(ENABLE_OPCODE_STATS)
1281 #define ENABLE_OPCODE_STATS 0
1284 #if !defined(ENABLE_GLOBAL_FASTMALLOC_NEW)
1285 #define ENABLE_GLOBAL_FASTMALLOC_NEW 1
1288 #define ENABLE_DEBUG_WITH_BREAKPOINT 0
1289 #define ENABLE_SAMPLING_COUNTERS 0
1290 #define ENABLE_SAMPLING_FLAGS 0
1291 #define ENABLE_SAMPLING_REGIONS 0
1292 #define ENABLE_OPCODE_SAMPLING 0
1293 #define ENABLE_CODEBLOCK_SAMPLING 0
1294 #if ENABLE(CODEBLOCK_SAMPLING) && !ENABLE(OPCODE_SAMPLING)
1295 #error "CODEBLOCK_SAMPLING requires OPCODE_SAMPLING"
1297 #if ENABLE(OPCODE_SAMPLING) || ENABLE(SAMPLING_FLAGS) || ENABLE(SAMPLING_REGIONS)
1298 #define ENABLE_SAMPLING_THREAD 1
1301 #if !defined(ENABLE_GEOLOCATION)
1302 #define ENABLE_GEOLOCATION 0
1305 #if !defined(ENABLE_GESTURE_RECOGNIZER)
1306 #define ENABLE_GESTURE_RECOGNIZER 0
1309 #if !defined(ENABLE_NOTIFICATIONS)
1310 #define ENABLE_NOTIFICATIONS 0
1314 #define ENABLE_TEXT_CARET 0
1317 #if !defined(ENABLE_TEXT_CARET)
1318 #define ENABLE_TEXT_CARET 1
1321 #if !defined(ENABLE_FULLSCREEN_API)
1322 #define ENABLE_FULLSCREEN_API 0
1325 #if !defined(ENABLE_POINTER_LOCK)
1326 #define ENABLE_POINTER_LOCK 0
1329 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64)
1330 #if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
1331 || (CPU(IA64) && !CPU(IA64_32)) \
1336 #define WTF_USE_JSVALUE64 1
1338 #define WTF_USE_JSVALUE32_64 1
1340 #endif /* !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64) */
1342 #if !defined(ENABLE_REPAINT_THROTTLING)
1343 #define ENABLE_REPAINT_THROTTLING 0
1346 /* Disable the JIT on versions of GCC prior to 4.1 */
1347 #if !defined(ENABLE_JIT) && COMPILER(GCC) && !GCC_VERSION_AT_LEAST(4, 1, 0)
1348 #define ENABLE_JIT 0
1351 /* JIT is not implemented for Windows 64-bit */
1352 #if !defined(ENABLE_JIT) && OS(WINDOWS) && CPU(X86_64)
1353 #define ENABLE_JIT 0
1356 /* The JIT is enabled by default on all x86, x64-64, ARM & MIPS platforms. */
1357 #if !defined(ENABLE_JIT) \
1358 && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(MIPS)) \
1359 && (OS(DARWIN) || !COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 1, 0)) \
1362 #define ENABLE_JIT 1
1365 #if !defined(ENABLE_DFG_JIT) && ENABLE(JIT)
1366 /* Enable the DFG JIT on X86 and X86_64. Only tested on Mac and GNU/Linux. */
1367 #if (CPU(X86) || CPU(X86_64)) && (PLATFORM(MAC) || OS(LINUX))
1368 #define ENABLE_DFG_JIT 1
1370 /* Enable the DFG JIT on ARMv7. Only tested on iOS. */
1371 #if CPU(ARM_THUMB2) && PLATFORM(IOS)
1372 #define ENABLE_DFG_JIT 1
1376 /* Profiling of types and values used by JIT code. DFG_JIT depends on it, but you
1377 can enable it manually with DFG turned off if you want to use it as a standalone
1378 profiler. In that case, you probably want to also enable VERBOSE_VALUE_PROFILE
1380 #if !defined(ENABLE_VALUE_PROFILER) && ENABLE(DFG_JIT)
1381 #define ENABLE_VALUE_PROFILER 1
1384 #if !defined(ENABLE_VERBOSE_VALUE_PROFILE) && ENABLE(VALUE_PROFILER)
1385 #define ENABLE_VERBOSE_VALUE_PROFILE 0
1388 #if !defined(ENABLE_SIMPLE_HEAP_PROFILING)
1389 #define ENABLE_SIMPLE_HEAP_PROFILING 0
1392 /* Counts uses of write barriers using sampling counters. Be sure to also
1393 set ENABLE_SAMPLING_COUNTERS to 1. */
1394 #if !defined(ENABLE_WRITE_BARRIER_PROFILING)
1395 #define ENABLE_WRITE_BARRIER_PROFILING 0
1398 /* Ensure that either the JIT or the interpreter has been enabled. */
1399 #if !defined(ENABLE_INTERPRETER) && !ENABLE(JIT)
1400 #define ENABLE_INTERPRETER 1
1402 #if !(ENABLE(JIT) || ENABLE(INTERPRETER))
1403 #error You have to have at least one execution model enabled to build JSC
1406 #if CPU(SH4) && PLATFORM(QT)
1407 #define ENABLE_JIT 1
1410 /* Configure the JIT */
1412 #if !defined(ENABLE_JIT_USE_SOFT_MODULO) && WTF_ARM_ARCH_AT_LEAST(5)
1413 #define ENABLE_JIT_USE_SOFT_MODULO 1
1417 #if CPU(X86) || CPU(X86_64) || CPU(MIPS)
1418 #if !defined(ENABLE_JIT_USE_SOFT_MODULO)
1419 #define ENABLE_JIT_USE_SOFT_MODULO 1
1423 #if CPU(X86) && COMPILER(MSVC)
1424 #define JSC_HOST_CALL __fastcall
1425 #elif CPU(X86) && COMPILER(GCC)
1426 #define JSC_HOST_CALL __attribute__ ((fastcall))
1428 #define JSC_HOST_CALL
1431 /* Configure the interpreter */
1432 #if COMPILER(GCC) || (RVCT_VERSION_AT_LEAST(4, 0, 0, 0) && defined(__GNUC__))
1433 #define HAVE_COMPUTED_GOTO 1
1435 #if HAVE(COMPUTED_GOTO) && ENABLE(INTERPRETER)
1436 #define ENABLE_COMPUTED_GOTO_INTERPRETER 1
1439 /* Regular Expression Tracing - Set to 1 to trace RegExp's in jsc. Results dumped at exit */
1440 #define ENABLE_REGEXP_TRACING 0
1442 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
1443 #if PLATFORM(CHROMIUM)
1444 #define ENABLE_YARR_JIT 0
1446 #elif ENABLE(JIT) && !defined(ENABLE_YARR_JIT)
1447 #define ENABLE_YARR_JIT 1
1449 /* Setting this flag compares JIT results with interpreter results. */
1450 #define ENABLE_YARR_JIT_DEBUG 0
1453 #if ENABLE(JIT) || ENABLE(YARR_JIT)
1454 #define ENABLE_ASSEMBLER 1
1457 /* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.
1458 On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */
1459 #if ENABLE(ASSEMBLER)
1460 #if CPU(X86_64) || PLATFORM(IOS)
1461 #define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1
1463 #define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1
1467 #ifndef ENABLE_LARGE_HEAP
1468 #if CPU(X86) || CPU(X86_64)
1469 #define ENABLE_LARGE_HEAP 1
1471 #define ENABLE_LARGE_HEAP 0
1475 #if !defined(ENABLE_PAN_SCROLLING) && OS(WINDOWS)
1476 #define ENABLE_PAN_SCROLLING 1
1479 #if !defined(ENABLE_SMOOTH_SCROLLING)
1480 #define ENABLE_SMOOTH_SCROLLING 0
1483 #if !defined(ENABLE_WEB_ARCHIVE)
1484 #define ENABLE_WEB_ARCHIVE 0
1487 /* Use the QXmlStreamReader implementation for XMLDocumentParser */
1488 /* Use the QXmlQuery implementation for XSLTProcessor */
1491 #define WTF_USE_QXMLSTREAM 1
1492 #define WTF_USE_QXMLQUERY 1
1497 /* Complex text framework */
1498 #ifndef BUILDING_ON_LEOPARD
1499 #define WTF_USE_ATSUI 0
1500 #define WTF_USE_CORE_TEXT 1
1502 #define WTF_USE_ATSUI 1
1503 #define WTF_USE_CORE_TEXT 0
1507 /* Accelerated compositing */
1508 #if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO))
1509 #define WTF_USE_ACCELERATED_COMPOSITING 1
1512 #if USE(ACCELERATED_COMPOSITING)
1513 #define ENABLE_TIZEN_ACCELERATED_COMPOSITING 1 /* hyowon Kim */
1514 #if USE(TEXTURE_MAPPER)
1515 #define WTF_USE_TIZEN_TEXTURE_MAPPER 1
1517 #define ENABLE_TIZEN_ACCELERATED_2D_CANVAS_EFL 0 /* Jaesik Chang : Accelerated 2D Canvas */
1518 #if ENABLE(TIZEN_ACCELERATED_2D_CANVAS_EFL)
1519 #define ENABLE_CANVAS_CAIRO_GLES_RENDERING 0 /* Jaesik Chang : canvas cairo/GLES rendering */
1521 #define ENABLE_TIZEN_ACCELERATED_COMPOSITING_PLUGIN_LAYER_EFL 0 /* Hyunsoo Shim : Accelerated Compositing plugin layer */
1522 #define ENABLE_TIZEN_CSS_FIXED_ACCELERATION 1 /* Jaehun Lim : Accelerated CSS FIXED elements */
1523 #define ENABLE_TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION 0 /* ChangSeok Oh : Accelerated CSS overflow:scroll elements */
1524 #define ENABLE_TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_BY_SCISSORING 0 /* ChangSeok Oh : Temporary feature to choose methods for overflow scroll acceleration */
1527 #if (PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)) || PLATFORM(IOS)
1528 #define WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK 1
1531 #if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(GTK)))
1532 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
1535 /* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
1536 #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
1538 /* FIXME: Eventually we should enable this for all platforms and get rid of the define. */
1539 #if PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(QT)
1540 #define WTF_USE_PLATFORM_STRATEGIES 1
1544 #define WTF_USE_CROSS_PLATFORM_CONTEXT_MENUS 1
1547 /* Geolocation request policy. pre-emptive policy is to acquire user permission before acquiring location.
1548 Client based implementations will have option to choose between pre-emptive and nonpre-emptive permission policy.
1549 pre-emptive permission policy is enabled by default for all client-based implementations. */
1550 #if ENABLE(CLIENT_BASED_GEOLOCATION)
1551 #define WTF_USE_PREEMPT_GEOLOCATION_PERMISSION 1
1555 #define ENABLE_BRANCH_COMPACTION 1
1558 #if !defined(ENABLE_THREADING_OPENMP) && defined(_OPENMP)
1559 #define ENABLE_THREADING_OPENMP 1
1562 #if !defined(ENABLE_PARALLEL_JOBS) && (ENABLE(THREADING_GENERIC) || ENABLE(THREADING_LIBDISPATCH) || ENABLE(THREADING_OPENMP))
1563 #define ENABLE_PARALLEL_JOBS 1
1566 #if ENABLE(GLIB_SUPPORT)
1567 #include "GTypedefs.h"
1570 /* FIXME: This define won't be needed once #27551 is fully landed. However,
1571 since most ports try to support sub-project independence, adding new headers
1572 to WTF causes many ports to break, and so this way we can address the build
1573 breakages one port at a time. */
1574 #define WTF_USE_EXPORT_MACROS 0
1576 #if (PLATFORM(QT) && !OS(DARWIN)) || PLATFORM(GTK) || PLATFORM(EFL)
1577 #define WTF_USE_UNIX_DOMAIN_SOCKETS 1
1580 #if !defined(ENABLE_COMPARE_AND_SWAP) && COMPILER(GCC) && (CPU(X86) || CPU(X86_64))
1581 #define ENABLE_COMPARE_AND_SWAP 1
1584 #if !defined(ENABLE_PARALLEL_GC) && PLATFORM(MAC) && ENABLE(COMPARE_AND_SWAP)
1585 #define ENABLE_PARALLEL_GC 1
1589 #ifndef ENABLE_GC_VALIDATION
1590 #define ENABLE_GC_VALIDATION 1
1594 #if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
1595 #define WTF_USE_AVFOUNDATION 1
1598 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO))
1599 #define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1
1603 #define WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1
1606 #if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
1607 #define HAVE_INVERTED_WHEEL_EVENTS 1
1611 #define WTF_USE_COREAUDIO 1
1614 #endif /* WTF_Platform_h */