[WK2] Small Caps font variant issue for Italic fonts
[framework/web/webkit-efl.git] / Source / WTF / wtf / Platform.h
1 /*
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.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
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.
14  *
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.
26  */
27
28 #ifndef WTF_Platform_h
29 #define WTF_Platform_h
30
31 /* Include compiler specific macros */
32 #include <wtf/Compiler.h>
33
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)
38
39
40 /* ==== Platform adaptation macros: these describe properties of the target environment. ==== */
41
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)
49
50
51 /* ==== Policy decision macros: these define policy choices for a particular port. ==== */
52
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)
57
58 /* ==== CPU() - the target CPU architecture ==== */
59
60 /* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
61
62 /* CPU(ALPHA) - DEC Alpha */
63 #if defined(__alpha__)
64 #define WTF_CPU_ALPHA 1
65 #endif
66
67 /* CPU(IA64) - Itanium / IA-64 */
68 #if defined(__ia64__)
69 #define WTF_CPU_IA64 1
70 /* 32-bit mode on Itanium */
71 #if !defined(__LP64__)
72 #define WTF_CPU_IA64_32 1
73 #endif
74 #endif
75
76 /* CPU(MIPS) - MIPS 32-bit */
77 /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now.  */
78 #if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
79     && defined(_ABIO32)
80 #define WTF_CPU_MIPS 1
81 #if defined(__MIPSEB__)
82 #define WTF_CPU_BIG_ENDIAN 1
83 #endif
84 #define WTF_MIPS_PIC (defined __PIC__)
85 #define WTF_MIPS_ARCH __mips
86 #define WTF_MIPS_ISA(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH == v)
87 #define WTF_MIPS_ISA_AT_LEAST(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH >= v)
88 #define WTF_MIPS_ARCH_REV __mips_isa_rev
89 #define WTF_MIPS_ISA_REV(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == v)
90 #define WTF_MIPS_DOUBLE_FLOAT (defined __mips_hard_float && !defined __mips_single_float)
91 #define WTF_MIPS_FP64 (defined __mips_fpr && __mips_fpr == 64)
92 /* MIPS requires allocators to use aligned memory */
93 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
94 #endif /* MIPS */
95
96 /* CPU(PPC) - PowerPC 32-bit */
97 #if   defined(__ppc__)     \
98     || defined(__PPC__)     \
99     || defined(__powerpc__) \
100     || defined(__powerpc)   \
101     || defined(__POWERPC__) \
102     || defined(_M_PPC)      \
103     || defined(__PPC)
104 #define WTF_CPU_PPC 1
105 #define WTF_CPU_BIG_ENDIAN 1
106 #endif
107
108 /* CPU(PPC64) - PowerPC 64-bit */
109 #if   defined(__ppc64__) \
110     || defined(__PPC64__)
111 #define WTF_CPU_PPC64 1
112 #define WTF_CPU_BIG_ENDIAN 1
113 #endif
114
115 /* CPU(SH4) - SuperH SH-4 */
116 #if defined(__SH4__)
117 #define WTF_CPU_SH4 1
118 #endif
119
120 /* CPU(SPARC32) - SPARC 32-bit */
121 #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
122 #define WTF_CPU_SPARC32 1
123 #define WTF_CPU_BIG_ENDIAN 1
124 #endif
125
126 /* CPU(SPARC64) - SPARC 64-bit */
127 #if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
128 #define WTF_CPU_SPARC64 1
129 #define WTF_CPU_BIG_ENDIAN 1
130 #endif
131
132 /* CPU(SPARC) - any SPARC, true for CPU(SPARC32) and CPU(SPARC64) */
133 #if CPU(SPARC32) || CPU(SPARC64)
134 #define WTF_CPU_SPARC 1
135 #endif
136
137 /* CPU(S390X) - S390 64-bit */
138 #if defined(__s390x__)
139 #define WTF_CPU_S390X 1
140 #define WTF_CPU_BIG_ENDIAN 1
141 #endif
142
143 /* CPU(S390) - S390 32-bit */
144 #if defined(__s390__)
145 #define WTF_CPU_S390 1
146 #define WTF_CPU_BIG_ENDIAN 1
147 #endif
148
149 /* CPU(X86) - i386 / x86 32-bit */
150 #if   defined(__i386__) \
151     || defined(i386)     \
152     || defined(_M_IX86)  \
153     || defined(_X86_)    \
154     || defined(__THW_INTEL)
155 #define WTF_CPU_X86 1
156 #endif
157
158 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
159 #if   defined(__x86_64__) \
160     || defined(_M_X64)
161 #define WTF_CPU_X86_64 1
162 #endif
163
164 /* CPU(ARM) - ARM, any version*/
165 #if   defined(arm) \
166     || defined(__arm__) \
167     || defined(ARM) \
168     || defined(_ARM_)
169 #define WTF_CPU_ARM 1
170
171 #if defined(__ARMEB__) || (COMPILER(RVCT) && defined(__BIG_ENDIAN))
172 #define WTF_CPU_BIG_ENDIAN 1
173
174 #elif !defined(__ARM_EABI__) \
175     && !defined(__EABI__) \
176     && !defined(__VFP_FP__) \
177     && !defined(_WIN32_WCE) \
178     && !defined(ANDROID)
179 #define WTF_CPU_MIDDLE_ENDIAN 1
180
181 #endif
182
183 #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
184
185 /* Set WTF_ARM_ARCH_VERSION */
186 #if   defined(__ARM_ARCH_4__) \
187     || defined(__ARM_ARCH_4T__) \
188     || defined(__MARM_ARMV4__) \
189     || defined(_ARMV4I_)
190 #define WTF_ARM_ARCH_VERSION 4
191
192 #elif defined(__ARM_ARCH_5__) \
193     || defined(__ARM_ARCH_5T__) \
194     || defined(__MARM_ARMV5__)
195 #define WTF_ARM_ARCH_VERSION 5
196
197 #elif defined(__ARM_ARCH_5E__) \
198     || defined(__ARM_ARCH_5TE__) \
199     || defined(__ARM_ARCH_5TEJ__)
200 #define WTF_ARM_ARCH_VERSION 5
201 /*ARMv5TE requires allocators to use aligned memory*/
202 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
203
204 #elif defined(__ARM_ARCH_6__) \
205     || defined(__ARM_ARCH_6J__) \
206     || defined(__ARM_ARCH_6K__) \
207     || defined(__ARM_ARCH_6Z__) \
208     || defined(__ARM_ARCH_6ZK__) \
209     || defined(__ARM_ARCH_6T2__) \
210     || defined(__ARMV6__)
211 #define WTF_ARM_ARCH_VERSION 6
212
213 #elif defined(__ARM_ARCH_7A__) \
214     || defined(__ARM_ARCH_7R__)
215 #define WTF_ARM_ARCH_VERSION 7
216
217 /* RVCT sets _TARGET_ARCH_ARM */
218 #elif defined(__TARGET_ARCH_ARM)
219 #define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
220
221 #if defined(__TARGET_ARCH_5E) \
222     || defined(__TARGET_ARCH_5TE) \
223     || defined(__TARGET_ARCH_5TEJ)
224 /*ARMv5TE requires allocators to use aligned memory*/
225 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
226 #endif
227
228 #else
229 #define WTF_ARM_ARCH_VERSION 0
230
231 #endif
232
233 /* Set WTF_THUMB_ARCH_VERSION */
234 #if   defined(__ARM_ARCH_4T__)
235 #define WTF_THUMB_ARCH_VERSION 1
236
237 #elif defined(__ARM_ARCH_5T__) \
238     || defined(__ARM_ARCH_5TE__) \
239     || defined(__ARM_ARCH_5TEJ__)
240 #define WTF_THUMB_ARCH_VERSION 2
241
242 #elif defined(__ARM_ARCH_6J__) \
243     || defined(__ARM_ARCH_6K__) \
244     || defined(__ARM_ARCH_6Z__) \
245     || defined(__ARM_ARCH_6ZK__) \
246     || defined(__ARM_ARCH_6M__)
247 #define WTF_THUMB_ARCH_VERSION 3
248
249 #elif defined(__ARM_ARCH_6T2__) \
250     || defined(__ARM_ARCH_7__) \
251     || defined(__ARM_ARCH_7A__) \
252     || defined(__ARM_ARCH_7R__) \
253     || defined(__ARM_ARCH_7M__)
254 #define WTF_THUMB_ARCH_VERSION 4
255
256 /* RVCT sets __TARGET_ARCH_THUMB */
257 #elif defined(__TARGET_ARCH_THUMB)
258 #define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
259
260 #else
261 #define WTF_THUMB_ARCH_VERSION 0
262 #endif
263
264
265 /* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
266 /* On ARMv5 and below the natural alignment is required. 
267    And there are some other differences for v5 or earlier. */
268 #if !defined(ARMV5_OR_LOWER) && !WTF_ARM_ARCH_AT_LEAST(6)
269 #define WTF_CPU_ARMV5_OR_LOWER 1
270 #endif
271
272
273 /* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
274 /* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
275 /* Only one of these will be defined. */
276 #if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
277 #  if defined(thumb2) || defined(__thumb2__) \
278     || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
279 #    define WTF_CPU_ARM_TRADITIONAL 0
280 #    define WTF_CPU_ARM_THUMB2 1
281 #  elif WTF_ARM_ARCH_AT_LEAST(4)
282 #    define WTF_CPU_ARM_TRADITIONAL 1
283 #    define WTF_CPU_ARM_THUMB2 0
284 #  else
285 #    error "Not supported ARM architecture"
286 #  endif
287 #elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
288 #  error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
289 #endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
290
291 #if defined(__ARM_NEON__) && !defined(WTF_CPU_ARM_NEON)
292 #define WTF_CPU_ARM_NEON 1
293 #endif
294
295 #if defined(__ARM_NEON__) && OS(TIZEN)
296
297 #if defined (WTF_CPU_ARM_NEON)
298 // All NEON intrinsics usage enabled for Tizen by this macro.
299 #define HAVE_ARM_NEON_INTRINSICS 1
300 #endif
301
302 #else
303
304 #if CPU(ARM_NEON) && (!COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 7, 0))
305 // All NEON intrinsics usage can be disabled by this macro.
306 #define HAVE_ARM_NEON_INTRINSICS 1
307 #endif  /* CPU(ARM_NEON) && (!COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 7, 0)) */
308
309 #endif /* defined(__ARM_NEON__) && OS(TIZEN) */
310
311 #endif /* ARM */
312
313 #if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC)
314 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
315 #endif
316
317 /* Samsung Platforms */
318 #if OS(TIZEN)
319
320 #define ENABLE_LEGACY_WEB_AUDIO 1 /* Praveen Jadhav(praveen.j@samsung.com) : Support Legacy APIs in WebAudio*/
321 #define ENABLE_TIZEN_WEBKIT2_UNIT_TESTS 1 /* g.czajkowski@samsung.com, ryuan.choi@samsung.com : Make it possible to change resource path of unit test */
322
323 /* API extensions */
324 #define ENABLE_TIZEN_JS_EXT_API 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com): Add new APIs for JS */
325
326 /* EWK patches */
327 #define ENABLE_TIZEN_ISF_PORT 1 /* Michal Pakula(m.pakula@samsung.com) : feature for integrating the EditorClient Port with TIZEN2.0 ISF */
328 #define ENABLE_TIZEN_MULTIPLE_SELECT 1 /*Santosh Mahto (santosh.ma@samsung.com) : enable the feature of handling select element multple selection */
329 #define ENABLE_TIZEN_PASTEBOARD 1 /* Michal Pakula(m.pakula@samsung.com), Eunmi Lee(eunmi15.lee@samsung.com) : Pasteboard implementation for WK1 and WK2. */
330 #define ENABLE_TIZEN_TEXT_CARET_HANDLING_WK2 1 /* Piotr Roguski(p.roguski@samsung.com) : enables two methods for getting and setting text caret position in editable fields */
331 #define ENABLE_TIZEN_ENLARGE_CARET_WIDTH 1 /* Taesik Cho : enlarge default caret width(size) - Email team is demanding this function. When composing, it is difficult to know where caret is.*/
332 #define ENABLE_TIZEN_CUSTOM_HEADERS 1 /* Who is owner ? */
333 #define ENABLE_TIZEN_ICON_DATABASE 1 /* Nikhil Bansal(n.bansal@samsung.com), Changhyup Jwa(ch.jwa@samsung.com) : Tizen feature for icon database */
334 #define ENABLE_TIZEN_DBSPACE_PATH 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : Set the TIZEN's default database directory */
335 #define ENABLE_TIZEN_USING_EXTERNAL_DOWNLOAD_CLIENT 1 /* Keunsoon Lee(keunsoon.lee@samsung.com) : not to use WebKit's internal download module, but notify the download starting to client to give a chance to use external Download Client. */
336 #define ENABLE_TIZEN_DOM_TIMER_MIN_INTERVAL_SET 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com) : Set minimum interval for DOMTimer */
337 #define ENABLE_TIZEN_ON_LOADING_REQUESTED 1 /*Sungman Kim(ssungmai.kim@samsung.com) : Callback call for signal navigation_policy,decision,requested with navigation type*/
338 #define ENABLE_TIZEN_CACHE_CONTROL 1 /*Sungman Kim(ssungmai.kim@samsung.com) : Control cache enable or disable mode*/
339 #define ENABLE_TIZEN_LINK_MAGNIFIER 1 /* Sangyong Park(sy302.park@samsung.com) : feature for link magnifier */
340
341 /* This patch should be removed if multiple UIProcess can exist concurrently.
342    This will be removed when libsoup can handle multiple process file concurrency problem. */
343 #define ENABLE_TIZEN_CACHE_DUMP_SYNC 1 /* Keunsoon Lee(keunsoon.lee@samsung.com) : UIProcess send synchronous API to WebProcess to dump soup cache. */
344
345 /* ewk_frame_script_execute should return the string even even if the result is the object.
346      because the object can be converted to the string using toString function.
347      ex) When the result is DIV Element, it is converted "[object HTMLDivElement]" by toString function.
348  */
349 #if ENABLE(SQL_DATABASE)
350 #define ENABLE_TIZEN_SQL_DATABASE 1 /* Jiyeon Kim(jiyeon0422.kim@samsung.com) : Enable Web SQL */
351 #endif
352
353 #define ENABLE_TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : Show confirm window when beforeUnload event is fired */
354
355 /* WebCore's patches */
356 #define ENABLE_TIZEN_DISABLE_CUSTOM_SCROLLBAR 1 /* Ryuan Choi(ryuan.choi@samsung.com) : disable custom scrollbar (modified from r134878) */
357 #define ENABLE_TIZEN_SYSTEM_FONT 1 /* Ryuan Choi(ryuan.choi@samsung.com) : Bug fix, default width of input field is too big. */
358 #define ENABLE_TIZEN_THEME_STYLE_WORKAROUND 1 /* Ryuan Choi(ryuan.choi@samsung.com) : css of input should be flexible. workaround until trunk is upstreamed.*/
359 #define ENABLE_TIZEN_VIEWPORT_META_TAG 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com) : Support viewport meta tag */
360 #define ENABLE_TIZEN_CERTIFICATE_HANDLING 1 /* Krzysztof Czech(k.czech@samsung.com) : support for certificate callback function set by UI */ /* DongJae KIM : Enable Patch*/
361 #define ENABLE_TIZEN_ELEMENT_CREATED_BY_PARSER_INFO_STORE 1 /* Who is owner ? : support storing info about element's creation: from parser or JS */
362 #define ENABLE_TIZEN_DOWNLOAD_LINK_FILTER 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : show download context menus for only http(s) and ftp(s) link */
363 #define ENABLE_TIZEN_ROOT_INLINE_BOX_SELECTION_TOP 1 /* Kamil Blank(k.blank@samsung.com) : Fix for too high selection on bbc.co.uk, https://bugs.webkit.org/show_bug.cgi?id=65307 */
364 #define ENABLE_TIZEN_PREVENT_CRASH_OF_TOUCH_EVENTS 1 /* Who is owner ? : https://bugs.webkit.org/show_bug.cgi?id=40163 */
365 #define ENABLE_TIZEN_INPUT_TAG_SUPPORT 1 /* Eunjoong Jeon : Support input tag type - 1. Hint the input tag type to apps 2. Define appearence of each input tag type */
366 #define ENABLE_TIZEN_INPUT_TAG_EXTENSION 1 /* Yuni Jeong(yhnet.jung@samsung.com) : For setting & getting focused input element value */
367 #define ENABLE_TIZEN_INPUT_COLOR_PICKER 1 /* KwangYong Choi(ky0.choi@samsung.com) : Interface for input color picker on Tizen */
368 #define ENABLE_TIZEN_DATALIST_ELEMENT 1 /* KwangYong Choi(ky0.choi@samsung.com) : Support datalist feature of text input field */
369 #define ENABLE_TIZEN_CONTEXT_MENU_TEMPORARY_FIX 1 /* Michal Pakula(m.pakula@samsung.com) : Temporary hack to prevent from crash when calling context menu on editable fiedld */
370 #define ENABLE_TIZEN_CONTEXT_MENU_SELECT 1 /* Michal Pakula(m.pakula@samsung.com) : Adds Select All and Select options to context menu */
371 #define ENABLE_TIZEN_MEDIA_CONTROL_USER_AGENT_SHEET 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com) Add media control ui sheet for TIZEN */
372 #define ENABLE_TIZEN_LINK_EFFECT 1 /* Sanghyup Lee(sh53.lee@samsung.com) To beep when click link*/
373
374 #define ENABLE_TIZEN_DAILY_UPVERSIONING 1 /* Krzysztof Czech(k.czech@samsung.com) : Used for fixing building errors while doing daily upversioning, should be deleted before merging to master*/
375
376 #define ENABLE_TIZEN_GRAPHICSCONTEXT_COLLECT_REGION 1 /*KyungTae Kim(ktf.kim@samsung.com) : Collect clip regions in GraphicsContext for clipping in endTransparencyLayer */
377 #define ENABLE_TIZEN_SEARCH_FIELD_STYLE 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : making search fields style-able */
378 #define ENABLE_TIZEN_RELOAD_CACHE_POLICY_PATCH 1 /*Sungman Kim(ssungmai.kim@samsung.com) : Set cache policy of initialRequest to ReloadIgnoringCacheData from browser reload*/
379 #define ENABLE_TIZEN_WEBGL_ANGLE_INTEGRATION 1 /*Shanmuga Pandi (shanmuga.m@samsung.com) : For ANGLE Integration for WEBGL*/
380 #define ENABLE_TIZEN_CONTEXT_CLICK 1 /*Wojciech Bielawski (w.bielawski@samsung.com) : Enable contextClick() functionality*/
381 #define ENABLE_TIZEN_CAIRO_RGBA_SWIZZLING 1 /*Shanmuga Pandi (shanmuga.m@samsung.com) : To use Cairo Based RGBA Swizzling for BitmapTexture update to avoid GraphicsContext3D extractImageData */
382
383 #define ENABLE_TIZEN_RUNLOOP_WAKEUP_ERROR_WORKAROUND 1 /* Seokju Kwon : Fix S1-6807 issue temporarily */
384 #define ENABLE_TIZEN_WEBSOCKET_TLS_SUPPORT  1 /* Basavaraj P S : Handling TLS connection for for secure websocket requests */
385 #define ENABLE_TIZEN_CHECK_DID_PERFORM_FIRST_NAVIGATION 1 /* Sungman Kim(ssungmai.kim@samsung.com) : To skip sendSync message from WebProcess to UIProcess, doesn't use itemAtIndex() on BackForwardController */
386 #define ENABLE_TIZEN_CSS_FILTER_OPTIMIZATION 1 /* Hurnjoo Lee(hurnjoo.lee@samsung.com : Optimize performance of css filters */
387
388 #define ENABLE_TIZEN_BACKGROUND_DISK_CACHE 1 /* Byeongha.cho(byeongha.cho@samsung.com), Sungman Kim(ssungmai.kim@samsung.com) : Cache encoded image data to disk on background state. */
389
390 #if ENABLE(NOTIFICATIONS)
391 #define ENABLE_TIZEN_NOTIFICATIONS 1 /* Kihong Kwon(kihong.kwon@samsung.com) : Temp patch for notification score in the html5test.com */
392 #endif
393
394 #define ENABLE_TIZEN_ADJUST_PATTERN_MATRIX 1 /*KyungTae Kim(ktf.kim@samsung.com) : Adjust pattern matrix of repeated images to align to dest pixel grid for fixing seam issues */
395
396 #if ENABLE(INDEXED_DATABASE)
397 #define ENABLE_TIZEN_INDEXED_DATABASE 1 /* DongGwan Kim(donggwan.kim@samsung.com) : Support IndexedDB for JS bindings */
398 #endif
399
400 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
401 #define ENABLE_TIZEN_APPLICATION_CACHE 1 /* Seonae Kim(sunaeluv.kim@samsung.com) : Support Application Cache */
402 #endif
403
404 #if ENABLE(NETWORK_INFO)
405 #define ENABLE_TIZEN_NETWORK_INFO 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com) : Tizen local patch to support Tizen platform */
406 #endif
407
408 #define ENABLE_TIZEN_WEB_STORAGE 1 /* Seonae Kim(sunaeluv.kim@samsung.com) : Support Web Storage */
409
410 #if ENABLE(MEDIA_STREAM)
411 #define ENABLE_TIZEN_MEDIA_STREAM 1 /* DongGwan Kim(donggwan.kim@samsung.com) : Support Media Stream */
412 #endif
413
414 #define ENABLE_TIZEN_ATLAS_IMAGE_BUG_FIX 1 /*KyungTae Kim(ktf.kim@samsung.com) : For fixing atlas image bug(when draw part of image, surrounding pixels were shown), using subSurface when draw part of image*/
415
416 #define ENABLE_TIZEN_INFLATE_NONE_BLUR_SHADOW_AREA 1 /*KyungTae Kim(ktf.kim@samsung.com) : Enlarge the clipping area 1 pixel so that the fill does not bleed (due to antialiasing) if the context is transformed*/
417 #define ENABLE_TIZEN_NOT_INITIAIZE_BACKGROUND_SIZE_IN_SHORTHAND_WORKAROUND 1 /*KyungTae Kim(ktf.kim@samsung.com) : Do not initialize background-size when the background shorthand doesn't include it(Bug 97761)*/
418 #define ENABLE_TIZEN_SET_CARET_HEIGHT_TO_OBJECT_HEIGHT 1 /*KyungTae Kim(ktf.kim@samsung.com) : Set caret height from selection height to object height for fix the case that image and text are in the same line (Bug 116424)*/
419 #define ENABLE_TIZEN_POSITIONED_CHILD_RELAYOUT 0 /*KyungTae Kim(ktf.kim@samsung.com) : If posChildNeedsLayout() but !m_positionedObjects, normal layout is needed for updating m_positionedObjects*/
420 #if USE(FREETYPE)
421 #define ENABLE_TIZEN_FT_EMBOLDEN_FOR_SYNTHETIC_BOLD 1 /*Younghwan Cho(yhwan.cho@samsung.com) : Use freetype's 'embolden' instead of drawing twice for synthetic bold*/
422 #endif
423
424 #define ENABLE_TIZEN_ADD_AA_CONDITIONS_FOR_NINE_PATCH 1 /*Younghwan Cho(yhwan.cho@samsung.com) : Add conditions of antialias for fixing 9patch-problem */
425 #define ENABLE_TIZEN_WEBKIT_OWN_FONT_FILES 0 /*Younghwan Cho(yhwan.cho@samsung.com) : webkit's font-config is seperated from the system font's*/
426 #define ENABLE_TIZEN_NOT_CHECK_ROUNDED_BORDER_ALL_CLIPPED_OUT 1 /*KyungTae Kim(ktf.kim@samsung.com) : 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*/
427 #define ENABLE_TIZEN_ROUNDED_BORDER_CLIP_ANTIALIAS_ON 1 /*KyungTae Kim(ktf.kim@samsung.com) : 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*/
428 #define ENABLE_TIZEN_NAVIGATOR_LANGUAGE_STR 1 /* Kihong Kwon(kihong.kwon@samsung.com) : Modify return value from like a "ko-KR.UTF8" to "ko-KR" for "navigator.language". */
429 #define ENABLE_TIZEN_CONSIDER_COOKIE_DISABLED_IF_SOUP_COOKIE_JAR_ACCEPT_NEVER_IS_SET 1 /* Raveendra Karu(r.karu@samsung.com) : Gets cookies enabled/disabled status from browser settings and returns the same to the Navigator Object */
430 #define ENABLE_TIZEN_REDIRECTED_LOCATION_IS_NOT_UTF_8 1 /* Raveendra Karu(r.karu@samsung.com) : If redirected url is not utf-8 encoded, String:fromUTF8 (url) returns NULL. This patch is to avoid this problem*/
431 #define ENABLE_TIZEN_CLEAR_HTTPBODY_IN_POST_TO_GET_REDIRECTION 1 /* Raveendra Karu(r.karu@samsung.com) : Clear request http body if redirection happens from POST/PUT to GET */
432 #define ENABLE_TIZEN_AUTHENTICATION_CHALLENGE_ENABLED_IN_ALL_FRAMES 1 /* Raveendra Karu(r.karu@samsung.com) : Authentication challenge is enabled even if the frame is not a main frame*/
433 #define ENABLE_TIZEN_UNIVERSAL_FILE_READ_ACCESS 1 /* Raveendra Karu(r.karu@samsung.com) : Enabling universal file read access for file: type urls */
434 #define ENABLE_TIZEN_FIX_SHOULD_AA_LINES_CONDITION 1 /*Younghwan Cho(yhwan.cho@samsung.com) : Add some conditions for AA to draw box-lines */
435 #define ENABLE_TIZEN_JPEGIMAGE_DECODING_THREAD 0 /* Keunyong Lee(ky07.lee@samsung.com) : Make new thread for Jpeg image decoding */
436 #define ENABLE_TIZEN_CLEAR_MEMORY_CACHE_BUG_FIX 1 /* Keunyong Lee(ky07.lee@samsung.com) : Fix decoded data contolling problem after memory cache clearing */
437 #define ENABLE_TIZEN_BLOCK_SENDING_RESIZE_EVENT_WHILE_LOADING 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : Fix the infinite layout when frame flattening is enabled */
438 #define ENABLE_TIZEN_REMOVE_IMG_SRC_ATTRIBUTE 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : Don't paint when <img>'s src attribute is removed */
439 #define ENABLE_TIZEN_USER_SETTING_FONT 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : If we don't find glyphs for characters, we can use SLP fallback font that is selected by user in Setting */
440 #define ENABLE_TIZEN_WRT_APP_URI_SCHEME 1   /*Sungman Kim(ssungmai.kim@samsung.com) : WRT app:// scheme support*/
441 #define ENABLE_TIZEN_SUPPORT_COMPLEX_FONTS_SHAPING 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : Support complex fonts shaping */
442 #define ENABLE_TIZEN_FALLBACK_FONTDATA 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : Add the fallback fontData to FontFallbackList */
443 #define ENABLE_TIZEN_COLLECT_HARFBUZZRUN 1 /* Rashmi Shyamasundar(rashmi.s2@samsung.com) Create proper harfBuzzRun for a word which follows a space */
444 #define ENABLE_TIZEN_CANVAS_2D_LINE_JOIN 1 /* Rashmi Shyamasundar(rashmi.s2@samsung.com) Save the value of lineJoin in GraphicsContextState */
445 #define ENABLE_TIZEN_FAKE_ITALIC_SMALLCAPS_COMBINATION 1 /* Tanvir Rizvi(tanvir.rizvi@samsung.com) Synthesize the small-caps and Italic combination */
446
447 #define ENABLE_TIZEN_CONTEXTSHADOW_BLUR_NEON 0 /* use neon shadowblur function in ContextShadow.cpp <hyunki.baik@samsung.com> */
448 #define ENABLE_TIZEN_ON_AUTHENTICATION_REQUESTED 1 /* Sungman Kim(ssungmai.kim@samsung.com) : Implement to requested authentication signal handling method */
449 #define ENABLE_TIZEN_ON_REDIRECTION_REQUESTED 1 /* Sungman Kim(ssungmai.kim@samsung.com) : Feature that offer the redirection header by callback set function */
450 #define ENABLE_TIZEN_BASE64 1 /* Sanghyun Park(sh919.park@samsung.com) : Fix the bugs about atob(Base64) */
451 #define ENABLE_TIZEN_LAYOUTSTATE_NULL_CHECKING_WORKAROUND 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : Add null checking for LayoutState, LayoutState can be null while push and pop */
452 #define ENABLE_TIZEN_DONT_DISPATCH_FAKEMOUSEMOVEEVENT_WHEN_SCROLLING_ON_TOUCH_DEVICES 1 /* Jaehun Lim (ljaehun.lim@samsung.com) : Don't dispatch fake mouse move events on touch devices for fixing hover problem */
453 #define ENABLE_TIZEN_LOAD_HTML_STRING_AS_UTF8 1 /* KwangYong Choi (ky0.choi@samsung.com) : Use UTF-8 instead of UTF-16 when the page is loaded by WebPage::loadHTMLString() */
454 #define ENABLE_TIZEN_DRAW_SCALED_PATTERN 1 /* Kyungjin Kim(gen.kim@samsung.com) : Scale image prior to draw it's pattern to enhance performance */
455 #define ENABLE_TIZEN_PAINT_SELECTION_ANTIALIAS_NONE 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : Remove the line between the preceding text block and the next text block which are selected */
456 #define ENABLE_TIZEN_USE_SETTINGS_FONT 1 /* Hyeonji Kim(hyeonji.kim@samsung.com) : When font-family is "Tizen", use system's setting font as default font-family */
457 #define ENABLE_TIZEN_PARAGRAPH_SEPARATOR_FIX 1 /* Michal Pakula (m.pakula@samsung.com) : This is a quick fix for a bug where new paragraph was not created on contenteditable area with image and text nodes inside span tag */
458 #define ENABLE_TIZEN_CONTENT_EDITABLE_BACKSPACE 1 /* Wojciech Bielawski(w.bielawski.com) : This is a quick fix for a bug where after pressing backspace image was moved not correctly */
459 #define ENABLE_TIZEN_PRESERVE_PROPERTIES_WHEN_PARAGRAPH_MERGE 1 /* Grzegorz Czajkowski (g.czajkowski@samsung.com): This is a quick fix for background-color and text-decoration defined in class are not copied when paragraph is merged.  We erroneously copy only CSS inheritable properties via removeNonEditingProperties(). */
460
461 #if ENABLE(TEXT_AUTOSIZING)
462 #define ENABLE_TIZEN_TEXT_AUTOSIZING 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : for Tizen environment */
463 #endif
464
465 /* Download Patches */
466 #define ENABLE_TIZEN_DOWNLOAD 1 /* Keunsoon Lee(keunsoon.lee@samsung.com) : */
467
468 /* Plugin Patches */
469 #define ENABLE_TIZEN_SUPPORT_PLUGINS 1 /* Mariusz Grzegorczyk(mariusz.g@samsung.com) : */
470 #define ENABLE_TIZEN_PLUGIN_SHOW_MISSING_PLUGIN_STATEMENT_EVEN_IF_PLUGIN_IS_DISABLED_ON_PREFERENCE 1 /* Keunsoon Lee(keunsoon.lee@samsung.com): show "missing plugin" even if preference setting for plugin is disabled. */
471 #define ENABLE_TIZEN_PLUGIN_WAITING_FOR_UPSTREAM 1 /* Keunsoon Lee(keunsoon.lee@samsung.com): codes which are waiting for landed on upstream */
472 #define ENABLE_TIZEN_SCAN_PLUGIN 1 /* KwangYong Choi(ky0.choi@samsung.com) : Implemented scan plugin feature for EFL */
473 #define ENABLE_TIZEN_PLUGIN_PREVENT_AUTOMATIC_FLASH_DOWNLOAD 1 /* KwangYong Choi(ky0.choi@samsung.com) : Prevent plugin auto-download */
474 #define ENABLE_TIZEN_PLUGIN_SCALE_FACTOR_FIX 1 /* KwangYong Choi(ky0.choi@samsung.com) : Use fixed device scale factor to fix drawing */
475 #define ENABLE_TIZEN_PAINT_MISSING_PLUGIN_RECT 1 /* KwangYong Choi(ky0.choi@samsung.com) : Paint missing plugin rect with gray */
476
477 /*
478  * Extend standard npapi NPNVariable.
479  * Replace XEvents with XTNPEvents for tizen platform needs.
480  */
481 #define ENABLE_TIZEN_NPAPI 1 /* Mariusz Grzegorczyk(mariusz.g@samsung.com) : */
482 #if ENABLE(TIZEN_NPAPI)
483 #define ENABLE_TIZEN_PLUGIN_SUSPEND_RESUME 1 /* KwangYong Choi(ky0.choi@samsung.com) : Suspend/Resume notification to the plugin */
484 #define ENABLE_TIZEN_PLUGIN_CUSTOM_REQUEST 1 /* Bang Kwang Min(justine.bang@samsung.com) : support the special call which can be reached to UIProcess */
485 #if ENABLE(TIZEN_PLUGIN_CUSTOM_REQUEST)
486 #define ENABLE_TIZEN_JSBRIDGE_PLUGIN 1 /* Bang Kwang Min(justine.bang@samsung.com) : support the special call which JS send some data to Native App through Plugin */
487 #endif
488 #define ENABLE_TIZEN_PLUGIN_KEYBOARD_EVENT 1 /* KwangYong Choi(ky0.choi@samsung.com) : Support TNP soft key event */
489 #define ENABLE_TIZEN_PLUGIN_TOUCH_EVENT 1 /* KwangYong Choi(ky0.choi@samsung.com) : Support TNP touch event */
490 #endif
491
492 /* Debugging Patch */
493 #define ENABLE_TIZEN_LOG 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com) : */
494 #if ENABLE(TIZEN_LOG)
495 #define ERROR_DISABLED 0
496 #define LOG_DISABLED 0
497 #endif
498 #define ENABLE_TIZEN_DISPLAY_MESSAGE_TO_CONSOLE 1 /* Seokju Kwon(seokju.kwon@samsung.com) : Display console-messages for WebApps, Browser ... */
499
500 /* change MAX_CONNECTIONS_PER_HOST value 6 -> 12 */
501 /* enhanced network loading speed */
502 /* apply tunning value */
503 #define ENABLE_TIZEN_SESSION_CONNECTION_PER_HOST_TUNNING 1 /* Who is owner ? : */
504
505
506 /* Network Patches*/
507 /* macro which solve network delay when some of contents was blocked for a while
508  - example) m.daum.net, m.paran.com
509  - When one of request was blocked, progress looks stopped at 50~60%(but almost was loaded) */
510 #define ENABLE_TIZEN_NETWORK_DELAYED_RESOURCE_SOLVE 1 /* Łukasz Ślachciak(l.slachciak@samsung.com) : */
511 /* need to reset session when network device is changed.(3G->wifi, wifi->3G)
512  * simple websites try to use previous socket which is binded previous network
513  * device.
514  */
515 #define ENABLE_TIZEN_SESSION_REQUEST_CANCEL 1 /* Who is owner ? : */
516
517 #if USE(SOUP)
518 /* enables ewk part of webkit soup cache */
519 #define ENABLE_TIZEN_SOUP_CACHE 1 /* Kwangtae Ko(kwangtae.ko@samsung.com : */
520 /* handle status code 5xx after receiving HTTP body */
521 #define ENABLE_TIZEN_SOUP_HANDLE_STATUS_CODE_5XX_AFTER_RECEIVING_HTTP_BODY 1 /* Changhyup Jwa(ch.jwa@samsung.com) : */
522 #define ENABLE_TIZEN_SOUP_NOT_ALLOW_BROWSE_LOCAL_DIRECTORY 1 /* Jongseok Yang(js45.yang@samsung.com) */
523 /* Workaround Patches */
524 #define ENABLE_TIZEN_ALLOW_CERTIFICATE_TRUSTED_URI  1 /*Sungman Kim(ssungmai.kim@samsung.com : Allow the specific uri to continue without certificate error. This is workaround. */
525 #endif
526 #define ENABLE_TIZEN_RESTARTED_CALLBACK_BUG_FIX 1 /*Sungman Kim(ssungmai.kim@samsung.com) : Resource handle ref count bug fix when restarted callback call*/
527 #define ENABLE_TIZEN_SOUP_CACHE_DIRECTORY_SET 1 /*Sungman Kim(ssungmai.kim@samsung.com) : Set the Soup, Cache directory path of SoupDataDirectory*/
528
529 #define ENABLE_TIZEN_PERSISTENT_COOKIES_SQL 1 /* Kwangtae Ko(kwangtae.ko@samsung.com : */
530
531 #define ENABLE_TIZEN_PAUSE_NETWORK 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com) : */
532 #define ENABLE_TIZEN_HTTP_REQUEST_HEADER_APPEND 1 /* Sungman Kim(ssungmai.kim@samsung.com : Append request headers for  accept-charset. This is refered to other browser's header information. */
533 #define ENABLE_TIZEN_EXPONENTIAL_BUFFER_SIZE 1 /* Jie Chen(jie.a.chen@intel.com) */
534
535 /* Workaround Patches */
536 #define ENABLE_TIZEN_PREVENT_INCREMENTAL_IMAGE_RENDERING_WORKAROUND 1 /* Ryuan Choi(ryuan.choi@samsung.com) : */
537 #define ENABLE_TIZEN_POPUP_FIX 1
538 /* fix for connection timeout */
539 #define ENABLE_TIZEN_TIMEOUT_FIX 1 /* Łukasz Ślachciak(l.slachciak@samsung.com) : */
540 /* Workaround for character interval defect */
541 #define ENABLE_TIZEN_FONT_HINT_NONE 1 /* Jaesick Chang(jaesik.chang@samsung.com) : */
542 /* Fix for continues layout when element having width given in percent is nested in flattened frame
543    https://bugs.webkit.org/show_bug.cgi?id=54284
544 */
545 #define ENABLE_TIZEN_ELEMENTS_NESTED_IN_FLATTENED_FRAME_FIX 1 /* Piotr Roguski(p.roguski@samsung.com) : */
546 /* fix for wrong calculation of backing store's zoom center position. */
547 #define ENABLE_TIZEN_FIX_BUILD_BREAK_GCC 1 /* Sanggyu Lee(sg5.lee@samsung.com) : Fixed a fastMalloc compile error for Thumb2 with GCC */
548 /* View mode patches */
549 #define ENABLE_TIZEN_VIEW_MODE 1 /* Who is ownver ? : */
550 /* Workaround for using the defaut encoding set */
551 #define ENABLE_TIZEN_FIX_CLIP_PATTERN_RECT 1 /* Kyungjin Kim(gen.kim@samsung.com) : adjust clip rect to the min of pattern and clip for repeatX, repeatY */
552 #define ENABLE_TIZEN_2D_CANVAS_ZERO_GRADIENT 1 /* Rashmi Shyamasundar (rashmi.s2@samsung.com) : If the gradient size is zero, then the functions fillXXX/strokeXXX should paint nothing */
553 #define ENABLE_TIZEN_CANVAS2D_FILLMAXWIDTH_NEGATIVE 1 /* Rashmi Shyamasundar(rashmi.s2@samsung.com) : Do not paint if maxwidth is zero */
554
555 /* JavaScript JIT */
556 #if ENABLE(JIT)
557 #define ENABLE_YARR 1
558 #define ENABLE_YARR_JIT 1
559 #endif
560
561 #define ENABLE_TIZEN_BUILD_THUMB_GCC 1
562 #define ENABLE_TIZEN_USE_STACKPOINTER_AT_WEBPROCESS_STARTUP 1
563
564 /* Original Webkit Features */
565 #if ENABLE(INSPECTOR)
566 #define ENABLE_TIZEN_REMOTE_WEB_INSPECTOR 1 /* Seokju Kwon(seokju.kwon@samsung.com) */
567 #endif
568
569 #define ENABLE_MAC_JAVA_BRIDGE 0
570 #define ENABLE_IMAGE_DECODER_DOWN_SAMPLING 0
571 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
572 #define ENABLE_TIZEN_IMAGE_DECODER_DOWN_SAMPLING 0 /* Jaehun Lim(ljaehun.lim@samsung.com) : Enabling image DOWN SAMPLING feature only for JPEG format */
573 #endif
574 #define ENABLE_TIZEN_JPEG_IMAGE_SCALE_DECODING 1 /* Keunyong Lee(ky07.lee@samsung.com) : Scaled decoding Feature for Jpeg Image. Becuase this Feature replace Down Sampling, IMAGE_DECODER_DOWN_SAMPLING should be false when you want to use it. */
575 #define ENABLE_TIZEN_REMOVE_DRAWLINE_ANTIALIAS_NONE 1 /* Keunyong Lee(ky07.lee@samsung.com) : Dash/Dot Box border and Text UnderLine display Bug Fix*/
576
577 #if ENABLE(TIZEN_WEBKIT2)
578
579 #define ENABLE_TIZEN_CONTEXT_MENU_WEBKIT_2 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com), Eunmi Lee(eunmi15.lee@samsung.com) : Support Context Menu for EFL WebKit2 */
580
581 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
582 #define ENABLE_TIZEN_WEBKIT2_DEBUG_BORDERS 1 /* Hyowon Kim(hw1008.kim@samsung.com) : Renders a border around composited Render Layers to help debug and study layer compositing. */
583 #define ENABLE_TIZEN_WEBKIT2_TILED_AC 1 /* Youngtaeck Song(youngtaeck.song@samsung.com) : Tiling with Acceletated compositing for Tizen */
584 #define ENABLE_TIZEN_ONESHOT_DRAWING_SYNCHRONIZATION 1 /* Hyowon Kim(hw1008.kim@samsung.com) : Fix layer flickering */
585 #define ENABLE_TIZEN_DONT_USE_TEXTURE_MAPPER_TEXTURE_POOL 1 /* Seojin Kim(seojin.kim@samsung.com) : TextureMapper texture pool has no shrink mechanism currently, and leads to OOM finally */
586 #define ENABLE_TIZEN_INHERIT_REF_COUNT_TO_TEXTURE_MAPPER_LAYER 1 /* JungJik Lee (jungjik.lee@samsung.com) : Inherit the reference count to TextureMapperLayer */
587
588
589 #define ENABLE_TIZEN_TEXTURE_MAPPER_CULLER 1 /* Hurnjoo Lee(hurnjoo.lee@samsung.com) : Avoid rendring of layers that occluded by opaque rects */
590 #define ENABLE_TIZEN_RUNTIME_BACKEND_SELECTION 1 /* Hyowon Kim(hw1008.kim@samsung.com) : Allow selecting the backend for Texture Mapper at run-time */
591 #define ENABLE_TIZEN_UI_SIDE_ANIMATION_SYNC 1 /* Hyowon Kim(hw1008.kim@samsung.com) : keep last frame of an animation until the animated layer is removed */
592 #define ENABLE_TIZEN_CORRECT_CLIPPING_WITH_INTERMEDIATE_SURFACE 1 /* Hyowon Kim(hw1008.kim@samsung.com) : compute the correct clipping rect when using an intermediate surface */
593 #define ENABLE_TIZEN_PREVENT_CRASH_OF_UI_SIDE_ANIMATION 1 /* Hurnjoo Lee(hurnjoo.lee@samsung.com) : Prevent crashes of UI side animation */
594 #define ENABLE_TIZEN_WEBKIT2_PRE_RENDERING_WITH_DIRECTIVITY 1 /*JungJik Lee(jungjik.lee@samsung.com : Calculates cover-rect with trajectory vector scalar value to consider directivity. */
595 #define ENABLE_TIZEN_CSS_OVERFLOW_CLIPPING_BACKING_STORE 0 /* JungJik Lee(jungjik.lee@samsung.com) : Clipping BackingStore off if parent layer is css overflow hidden */
596 #define ENABLE_TIZEN_USE_FIXED_SCALE_ANIMATION 1 /* JungJik Lee(jungjik.lee@samsung.com) : use fixed scale if the layer is animating */
597 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
598 #define TIZEN_VIRTUAL virtual
599 #else
600 #define TIZEN_VIRTUAL
601 #endif
602
603 #define ENABLE_TIZEN_LAYER_FLUSH_THROTTLING 1 /* JungJik Lee(jungjik.lee@samsung.com) : Give 0.5 sec delay to layer flush scheduler while loading the page */
604 #define ENABLE_TIZEN_CUTOFF_TILES_OVER_MEMORY_LIMIT 1 /* JungJik Lee(jungjik.lee@samsung.com) : Cut off tiles from backing store that are away from viewport */
605 #define WTF_USE_TEXTURE_MAPPER_GL 1 /* Youngtaeck Song(youngtaeck.song@samsung.com) : use TextureMapperGL for Tizen */
606 #define WTF_USE_UI_SIDE_COMPOSITING 1 /* Youngtaeck Song(youngtaeck.song@samsung.com) : Compositing on the UI-process in WebKit2 */
607 #define ENABLE_TIZEN_CANVAS_GRAPHICS_SURFACE 1 /* Heejin Chung(heejin.r.chung@samsung.com) : WebGL Based on GraphicsSurface */
608 #define ENABLE_TIZEN_SET_INITIAL_COLOR_OF_WEBVIEW_EVAS_IMAGE 1 /* Youngtaeck Song(youngtaeck.song@samsung.com) : Set initial color of webview evas image */
609 #endif
610 #define ENABLE_TIZEN_WEBKIT2_DDK_CHECK 1 /* JungJik Lee(jungjik.lee@samsung.com) : Fail in initialzing view when No DDK installed */
611
612 #if USE(TILED_BACKING_STORE)
613 #define ENABLE_TIZEN_WEBKIT2_TILED_BACKING_STORE 1 /* Youngtaeck Song(youngtaeck.song@samsung.com) : Tiled backing store for Tizen */
614 #define ENABLE_TIZEN_WEBKIT2_TILED_SCROLLBAR 1 /* Ryuan Choi(ryuan.choi@samsung.com) : Scrollbar implementation for Tiled DrawingArea */
615 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
616 #define ENABLE_TIZEN_DONT_PURGE_PLATFORM_SURFACE_BACKINGSTORE_ON_NODE_DETACH_FROM_WEBLAYER_TREE 1 /* Seojin Kim (seojin.kim@samsung.com), Vaibhav Sharma(vb.sharma@samsung.com) : keep backing store if layer tree's topology get changed for layers that use shared platform surface(pixmap) as it's backing */
617 #define ENABLE_TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE_BACKUP_IMAGE 1 /* Eunsol Park(eunsol47.park@samsung.com), Hyowon Kim(hw1008.kim@samsung.com) : Display Backup Image when there is no painted tile*/
618 #define ENABLE_TIZEN_UV_MAPPING 1 /* Hyowon Kim(hw1008.kim@samsung.com) : UV mapping to use the platform-surface whose width should be multiple of 8 */
619 #endif
620 #define ENABLE_TIZEN_NOT_USE_TRANSFORM_INFO_WHEN_GETTING_CARET_RECT 1 /* Youngtaeck Song(youngtaeck.song@samsung.com) : Patch to do not use transform infomation when getting caret rect */
621 #define ENABLE_TIZEN_PRERENDERING_FOR_ROTATION 1 /* Youngtaeck Song(youngtaeck.song@samsung.com) : Prerender contents so that we display whole image immediately when rotating */
622 #endif
623 #define ENABLE_TIZEN_WEBKIT2_TILED_AC_DONT_ADJUST_COVER_RECT 1 /* Eunsol Park(eunsol47.park@samsung.
624 com) : Patch to do not adjust cover rect as fixed pixel size*/
625 #define ENABLE_TIZEN_GSTREAMER_VIDEO 1 /* Kwangyong Choi : Fixed media control display when using gstreamer video */
626 #define ENABLE_TIZEN_GSTREAMER_AUDIO 1 /* Keonho Kim : Audio session manager for media element */
627
628 #define ENABLE_TIZEN_PREFERENCE 1 /* Eunmi Lee(eunmi15.lee@samsung.com) : for slp specific preferences */
629 #define ENABLE_TIZEN_LOAD_REMOTE_IMAGES 1 /* Dongjae Kim(dongjae1.kim@samsung.com) : for tizen remode image load setting */
630
631 #define ENABLE_TIZEN_SOUP_COOKIE_CACHE_FOR_WEBKIT2 1 /* Jongseok Yang(js45.yang@samsung.com) : Implement soup cache, cookie */
632 #define ENABLE_TIZEN_WEBKIT2_THEME_SET_INTERNAL 1 /* Ryuan Choi(ryuan.choi@samsung.com) : Set to default theme for WK2/tizen */
633 #define ENABLE_TIZEN_WEBKIT2_PROXY 1 /* Ryuan Choi(ryuan.choi@samsung.com) : Provide API to set proxy */
634 #define ENABLE_TIZEN_WEBKIT2_POPUP_INTERNAL 1 /* Ryuan Choi(ryuan.choi@samsung.com) : popup implementation for WK2/tizen internal */
635 #define ENABLE_TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS 1 /* Byungwoo Lee(bw80.lee@samsung.com) : Notify popup reply status through the smart callback */
636 #define ENABLE_TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL ENABLE_TIZEN_SCREEN_ORIENTATION_SUPPORT /* Ryuan choi9ryuan.choi@samsung.com) : temporal implementation for screen orientation lock callback */
637
638 #define ENABLE_TIZEN_WEBKIT2_FOCUS_RING 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Focus ring implementation for WK2 */
639 #define ENABLE_TIZEN_WEBKIT2_VIEW_VISIBILITY 1 /* Eunsol Park(eunsol47.park@samsung.com) : add API for setting the webPage's visibility */
640 #if ENABLE(TIZEN_WEBKIT2_VIEW_VISIBILITY)
641 #define ENABLE_TIZEN_CACHE_MEMORY_OPTIMIZATION 1 /* Keunyong Lee(ky07.lee@samsung.com) : The Patches that can reduce memory usage */
642 #endif
643 #define ENABLE_TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT 1 /* Seonae Kim(sunaeluv.kim@samsung.com) : add number types for switching WK number types */
644 #define ENABLE_TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR 1 /* Bunam Jeon(bunam.jeon@samsung.com) : Notify to UI process that the content has been suspended by inspector */
645 #define ENABLE_TIZEN_WEBKIT2_VISITED_LINKS 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : workaround patch for coloring visited links.
646                                               * this patch should be removed after WK2 HistoryClient is implemented.
647                                               */
648
649 #define ENABLE_TIZEN_WEBKIT2_HIT_TEST 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Hit Test API implementation for WK2 */
650 #define ENABLE_TIZEN_WEBKIT2_PATCH_FOR_TC 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Patchs to pass TC */
651 #define ENABLE_TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Patchs to get text style for supporting email requirement */
652
653 #if ENABLE(TIZEN_PREFERENCE)
654 #define ENABLE_TIZEN_WEBKIT2_TEXT_ZOOM 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Enable/Disable text zoom on user's pinch zoom */
655 #endif
656 #define ENABLE_TIZEN_WEBKIT2_CONTEXT_MENU_TEXT_SELECTION_MODE 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Patchs to add "Text selection mode" options to context menu */
657 #define ENABLE_TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Patchs to create view with created page group with identifier */
658 #define ENABLE_TIZEN_WEBKIT2_SAME_PAGE_GROUP_FOR_CREATE_WINDOW_OPERATION 1 /* Jongseok Yang (js45.yang@samsung.com) : The page frome create window operation has same page group as the caller page */
659 #define ENABLE_TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Patchs to seperate load progress callback for supporting OSP requirement  - "load,progress,started", "load,progress", "load,progress,finished" */
660 #define ENABLE_TIZEN_WEBKIT2_CONTEXT_MENU_ICON_TYPE_SUPPORT 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Support icon type's option to context menu */
661 #define ENABLE_TIZEN_WEBKIT2_LOCAL_IMPLEMENTATION_FOR_ERROR 1 /* Jongseok Yang(js45.yang@samsung.com) : temporary pathes to maintain local implementation for error operation */
662 #define ENABLE_TIZEN_WEBKIT2_LOCAL_IMPLEMETATION_FOR_NAVIGATION_POLICY 1 /* Jongseok Yang(js45.yang@samsung.com) : temporary pathes to maintain local implementation for navigation policy operation */
663 #define ENABLE_TIZEN_WEBKIT2_LOCAL_IMPLEMETATION_FOR_FORM 1 /* Sangyong Park(sy302.park@samsung.com) : temporary pathes to maintain local implementation for form operation */
664 #define ENABLE_TIZEN_WEBKIT2_ABOUT_MEMORY 1 /* Jinwoo Song(jinwoo7.song@samsung.com) : Implement 'About:Memory' feature */
665 #define ENABLE_TIZEN_NATIVE_MEMORY_SNAPSHOT 1 /*KyungTae Kim(ktf.kim@samsung.com) : Native memory snapshot is a functionality for measuring native memory on WebCore*/
666 #define ENABLE_TIZEN_DOWNLOAD_ATTRIBUTE 1 /*KyungTae Kim(ktf.kim@samsung.com) : To support download attribute on Webkit2. It'll be removed when webkit.org/b/102914 is merged*/
667 #define ENABLE_TIZEN_WEBKIT2_TEXT_TRANSLATION 1 /* Bunam Jeon(bunam.jeon@samsung.com) : Support the text translation of webkit2 */
668 #define ENABLE_TIZEN_WEBKIT2_CLIPBOARD_HELPER 1 /* Jongseok Yang(js45.yang@samsung.com) : Module in UIProcess to support clipboard operation */
669 #define ENABLE_TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD 1 /* Taeyun An(ty.an@samsung.com) : Patches to display clipboard option in contextmenu */
670 #define ENABLE_TIZEN_WEBKIT2_SUPPORT_JAPANESE_IME 1 /* Jongseok Yang(js45.yang@samsung.com), Karthik Gopalan(karthikg.g@samsung.com), Vaibhav Sharma(vb.sharma@samsung.com) : Support Japanese IME */
671
672 /* Without this patch, WebProcess is always terminated abnormally because AUL sends SIGKILL to WebProcess right after UIProcess is terminated.
673  * This patch should be deleted if Tizen platform's process handling policy is changed. */
674 #define ENABLE_TIZEN_WEBKIT2_GIVE_SEPARATE_PROCESS_GROUP_ID_TO_WEBPROCESS 0 /* Keunsoon Lee(keunsoon.lee@samsung.com) : This patch separates WebProcess' process group id from UIProcess' one. */
675
676 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
677 #define ENABLE_TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Restore visible content rect on going back and forward */
678 #define ENABLE_TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION 1 /*Santosh Mahto(santosh.ma@samsung.com) : save and restore  the scrollpostion before page is not rendered fully. */
679 #endif
680 #define ENABLE_TIZEN_WEBKIT2_MEMORY_SAVING_MODE 1 /*Eunsol Park(eunsol47.park@samsung.com) : Used for lower memory usage profiling*/
681 #define ENABLE_TIZEN_WEBKIT2_CONTEXT_X_WINDOW 1 /* Changhyup Jwa(ch.jwa@samsung.com) : WebProcess cannot access to evas, so it needs to obtain window id to get window's orientation. Default root window has sync issue. */
682 #define ENABLE_TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Patchs for moving text selection handle from OSP */
683 #define ENABLE_TIZEN_WEBKIT2_FIX_INVAlID_SCROLL_FOR_NEW_PAGE 1 /* Jongseok Yang (js45.yang@samsung.com) : Patch to fix the invalid scroll position by open source patch */
684 #endif /* ENABLE(TIZEN_WEBKIT2) */
685
686 /* When displaying menu list using menu icon, a additional scrollbar is displayed in the screen center
687    So, this patch is to remove the logic for a additional scrollbar */
688 #define ENABLE_TIZEN_FIX_DRAWING_ADDITIONAL_SCROLLBAR 1 /* Jongseok Yang(js45.yang@samsung.com) */
689
690 /*
691   * Problem : An additional scrollbar is displayed in the screen center when loading is finished as auto fitting.
692   * Solution : Remove the Widget::frameRectsChanged for EFL port. */
693 #define ENABLE_TIZEN_FIX_SCROLLBAR_FOR_AUTO_FITTING 1 /* Jongseok Yang(js45.yang@samsung.com) */
694
695 /* The scrollbar just for ScrollView is disaplyed.
696    The scrollbar for other object is not displayed. (ex. DIV scrollbar) */
697 #define ENABLE_TIZEN_DISPLAY_SCROLLBAR_JUST_FOR_SCROLLVIEW 1 /* Jongseok Yang(js45.yang@samsung.com) */
698
699 /*
700   * Problem : Multiple History Items are getting created in History Item Tree for a error page, when you press Back or Forward Key,intead of reading present history.
701   * Becuse error page is loaded with Type standard evnethough we press back/forward.
702   * Solution : FrameLoader::Load is called with Back/Forward Load type when press back/forward. */
703 #define ENABLE_TIZEN_BACKFORWARD_LIST_ERRORPAGE 1 /* Basavaraj P S(basavaraj.ps@samsung.com) */
704 #define ENABLE_TIZEN_BACKFORWARD_LIST_CLEAR 1 /* Basavaraj P S(basavaraj.ps@samsung.com),  Exposing API to clear back forward list of a page*/
705 #define ENABLE_TIZEN_EXTERNAL_URL_CONTAINING_USERNAME_PASSWORD 1 /* Basavaraj P S(basavaraj.ps@samsung.com),  Support to authenticate external URL containing username and password*/
706
707 #if USE(ACCELERATED_COMPOSITING)
708 #define ENABLE_TIZEN_ACCELERATED_COMPOSITING 1 /* Hyowon Kim(hw1008.kim@samsung.com) */
709 #define ENABLE_TIZEN_FIX_REPAINTING_BUG_OF_COMPOSITED_LAYER 1 /* Hurnjoo Lee(hurnjoo.lee@samsung.com) : Fix a bug of rendering of Accelerated Compositing */
710 #define ENABLE_TIZEN_FIX_DEPTH_TEST_BUG_OF_WEBGL 1 /* YongGeol Jung(yg48.jung@samsung.com) : Fix webgl bug related to depth-test */
711 #if USE(TEXTURE_MAPPER)
712 #define WTF_USE_TIZEN_TEXTURE_MAPPER 1
713 #endif
714
715 #if ENABLE(TIZEN_WEBKIT2) && ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
716 #define ENABLE_TIZEN_ACCELERATED_2D_CANVAS_EFL 1 /* Kyungjin Kim(gen.kim@samsung.com), Hyunki Baik(hyunki.baik@samsung.com) : Accelerated 2D Canvas */
717 #endif
718 #if ENABLE(TIZEN_ACCELERATED_2D_CANVAS_EFL)
719 #if CPU(ARM)
720 #define ENABLE_TIZEN_CANVAS_CAIRO_GLES_RENDERING 1 /* Kyungjin Kim(gen.kim@samsung.com), Hyunki Baik(hyunki.baik@samsung.com) : canvas cairo/GLES rendering */
721 #else
722 #define ENABLE_TIZEN_CANVAS_SURFACE_LOCKING 1 /* Christophe Dumez(christophe.dumez@intel.com) : Accelerated 2D Canvas using EGL surface locking */
723 #endif
724 #endif
725 #if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING)
726 #define ENABLE_TIZEN_USE_XPIXMAP_DECODED_IMAGESOURCE 0 /* Byeongha Cho(byeongha.cho@samsung.com) : Use pixmap surface to decode image and share the buffer between CPU and GPU */
727 #if !ENABLE(TIZEN_USE_XPIXMAP_DECODED_IMAGESOURCE)
728 #define ENABLE_TIZEN_CAIROGLES_IMAGE_CACHE 1
729 #endif
730 #if ENABLE(TIZEN_CAIROGLES_IMAGE_CACHE)
731 #define ENABLE_TIZEN_CAIROGLES_IMAGE_AUTOSCALE 1
732 #endif
733 #define ENABLE_TIZEN_2D_CANVAS_JS_SUSPEND 0 /* Hyunki Baik(hyunki.baik@samsung.com):  Suspend JavasScript during UIProcess access the shared platformSurface for 2D Canvas */
734 #endif
735
736 #if ENABLE(TIZEN_WEBKIT2)
737 #define ENABLE_TIZEN_MOBILE_WEB_PRINT 1 /* Hyunsoo Shim(hyunsoo.shim@samsung.com) : Mobile Web Print for AC layer */
738 #endif
739 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
740 #define ENABLE_TIZEN_ACCELERATED_COMPOSITING_PLUGIN_LAYER_EFL 1 /* Hyunsoo Shim(hyunsoo.shim@samsung.com) : Accelerated Compositing plugin layer */
741 #if ENABLE(REQUEST_ANIMATION_FRAME)
742 #define ENABLE_TIZEN_SYNC_REQUEST_ANIMATION_FRAME 1 /* YongGeol Jung(yg48.jung@samsung.com) : Synchronize callback function of ScriptedAnimationController between UI Process and Web Process to 1 : 1 */
743 #endif
744 #endif
745 #define ENABLE_TIZEN_CSS_FIXED_ACCELERATION 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : Accelerated CSS FIXED elements */
746 #define ENABLE_TIZEN_EVAS_GL_DIRECT_RENDERING 1 /* Hyowon Kim(hw1008.kim@samsung.com) */
747 #if ENABLE(OVERFLOW_SCROLLING)
748 #define ENABLE_TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION 1 /* ChangSeok Oh(midow.oh@samsung.com) : Accelerated CSS overflow:scroll elements */
749 #if ENABLE (TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
750 #define ENABLE_TIZEN_CSS_OVERFLOW_SCROLL_FIX_WRONG_CLIPPING 1 /* Younghwan Cho (yhwan.cho@samsung.com) : patch for wrong clipping from 'Bug 91117 - Add support for compositing the contents of overflow:scroll areas', test-code */
751 #endif
752 #define ENABLE_TIZEN_INPUT_BOX_SCROLL 1 /* Prathmesh Manurkar(prathmesh.m@samsung.com) : Added for scrolling contents of input box */
753 #endif
754 #if ENABLE(TIZEN_WEBKIT2)
755 #if ENABLE(OVERFLOW_SCROLLING)
756 #define ENABLE_TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_ON_UI_SIDE 1 /* ChangSeok Oh(midow.oh@samsung.com) : Accelerated scrolling CSS overflow:scroll elements on UI Process. */
757 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_ON_UI_SIDE)
758 #define ENABLE_TIZEN_CSS_OVERFLOW_SCROLL_SCROLLBAR 1 /* Jaehun Lim(ljaehun.lim@samsung.com : paint scrollbars for overflow areas */
759 #endif
760 #endif
761 #else
762 #undef ENABLE_TIZEN_ACCELERATED_COMPOSITING_PLUGIN_LAYER_EFL /* Hurnjoo Lee(hurnjoo.lee@samsung.com) : Disable the feature for WebKit1 */
763 #endif
764 #endif
765
766 #if ENABLE(PAGE_VISIBILITY_API)
767 #define ENABLE_TIZEN_PAGE_VISIBILITY_API 1 /* Kihong Kwon(kihong.kwon@samsung.com) : Support the Page Visibility API */
768 #endif
769
770 #if ENABLE(SPELLCHECKING)
771 #define ENABLE_TIZEN_WEBKIT2_ASYNCHRONOUS_SPELLCHECKING 1 /* Grzegorz Czajkowski: WebKitTestRunner needs it to run tests from editing/spelling directory, imported from https://bugs.webkit.org/show_bug.cgi?id=81042. */
772 #endif
773
774 #define ENABLE_TIZEN_META_CHARSET_PARSER 1 /* Kangil Han(kangil.han@samsung.com) : Parser fix for <http://www.onnuritour.com>. Working on <https://bugs.webkit.org/show_bug.cgi?id=102677>. */
775 #define ENABLE_TIZEN_CSS_INSET_BORDER_BUG 1 /* Byeonga Cho(byeongha.cho@samsung.com : Fix CSS inset border bug in x86. This is workaround. FIX ME */
776 #define ENABLE_TIZEN_SHADOW_BLUR_SCRATCH_BUFFER_WITH_LAYER_BOUNDS 1 /* Pritam Nikam(pritam.nikam@samsung.com) */
777
778 #define ENABLE_TIZEN_DFG_UPDATE_TAG_FOR_REGEXP_TEST 1 /* Hojong Han(hojong.han@samsung.com) : Fix crash while using Naver map. Working on <https://bugs.webkit.org/show_bug.cgi?id=105756> */
779 #define ENABLE_TIZEN_DFG_STORE_CELL_TAG_FOR_ARGUMENTS 1 /* Hojong Han(hojong.han@samsung.com) : Store cell tag for arguments */
780 #define ENABLE_TIZEN_JSC_CACHEFLUSH_PAGE_BY_PAGE 1 /* Hojong Han(hojong.han@samsung.com) : Fix YarrJIT crash */
781 #define ENABLE_TIZEN_SET_PROPERTY_ATTRIBUTE_CORRECTLY 1 /* Hojong Han(hojong.han@samsung.com) : Fix overwritting Read-only property, set from WRT */
782
783 #define ENABLE_TIZEN_WRT_LAUNCHING_PERFORMANCE 1 /* Byungwoo Lee(bw80.lee@samsung.com) : Local patches to enhance web app launching performance */
784
785 #define ENABLE_TIZEN_REDUCE_KEY_LAGGING 1    /* Soon-Young Lee(sy5002.lee@samsung.com) : Temporary solution for a keylagging problem. FIXME */
786 #define ENABLE_TIZEN_TEXT_CODEC_MEMORY_REDUCTION 1 /*KyungTae Kim(ktf.kim@samsung.com) : Share Encode & Decode buffer for TextCodecUTF8 for memory reduction */
787 #define ENABLE_TIZEN_ADJUST_CONTENTS_SIZE_FOR_MINUS_X_WORKAROUND 1 /*KyungTae Kim(ktf.kim@samsung.com) : Workaround patch that adjusts contents size of minus x position contents */
788 #define ENABLE_TIZEN_EWK_CONTEXT_CACHE_MANAGER_NULL_CHECK_WORKAROUND 1 /* KyungTae Kim(ktf.kim@samsung.com) : Add null check to fix crash issue. */
789 #define ENABLE_TIZEN_FRAMEVIEW_NULL_CHECK_WORKAROUND 1 /* KyungTae Kim(ktf.kim@samsung.com) : Add null check to fix crash issue. */
790
791 #define ENABLE_TIZEN_DO_NOT_APPLY_SCROLLOFFSET_FOR_DELEGATESSCROLLING 1 /* Eunmi Lee(eunmi15.lee@samsung.com) : Fix the wrong position of hitTest result when we do hit test in the subFrame (It should be contributed to the opensource) */
792
793 #define ENABLE_TIZEN_WEBKIT2_FORM_DATABASE 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Form database support */
794
795 #define ENABLE_TIZEN_RESET_CACHEDFRAME_CONTENTSIZE_ON_NAVIGATION 1 /* Divakar.A (divakar.a@samsung.com) : Resetting contentSize of CachedFrameView on navigation. This flag will be removed once latest opensource merge is done. */
796
797 #define ENABLE_TIZEN_CSP 1 /* Seonae Kim(sunaeluv.kim@samsung.com) : Support CSP to provide EWK API to web applicatoin */
798 #define ENABLE_TIZEN_SUPPORT_MHTML 1 /* KwangYong Choi(ky0.choi@samsung.com) : Add support for exporting MHTML data */
799
800 #define ENABLE_TIZEN_MHTML_CSS_IMPORT_URL_RELATIVE_TO_PARENT 1 /*Santosh Mahto(santosh.ma@samsung.com) : URL of stylesheet specified in @import should be relative to parent Stylesheet  in page Serializing */
801
802 #define ENABLE_TIZEN_OFFLINE_PAGE_SAVE 1 /* Nikhil Bansal (n.bansal@samsung.com) : Tizen feature for offline page save */
803
804 #define ENABLE_TIZEN_SIGNAL_APP_BACK_FORWARD_LIST_CHANGED 1 /* Praveen(praveen.ks@samsung.com) : Add API to signal application for change in back forward list */
805
806 #define ENABLE_TIZEN_FIND_STRING 1 /* Jinwoo Song(jinwoo7.song@samsung.com) : Fix the bug to enable searching the web page which has the 'webkit-user-select: none' CSS property and value. */
807 #define ENABLE_TIZEN_FIND_STRING_HIGHLIGHT_CLEAR 1 /* Jinwoo Song(jinwoo7.song@samsung.com) : Fix the bug to clear the highlight when users tap editable areas such as input field. */
808
809 #define ENABLE_TIZEN_GET_EXTERNAL_RESOURCES_IN_MHTML_FROM_NETWORK 1 /* Praveen(praveen.ks@samsung.com) : Allow external resources in MHTML file to be fetched from network rather than failing them */
810 #define ENABLE_TIZEN_MHTML_CSS_MEDIA_RULE_RESOURCE 1 /* Santosh Mahto(santosh.ma@samsung.com) : Collect the subresource specified in css media rule in mhtml PageSerializing */
811
812 #define ENABLE_TIZEN_MAIN_THREAD_SCHEDULE_DISCARD_DUPLICATE_REQUEST 1 /* Jihye Kang(jye.kang@samsung.com) : Fix lockup while doing stress test for filewriter */
813
814 #define ENABLE_TIZEN_FULLSCREEN_API 1 /* Jongseok Yang(js45.yang@samsung.com) : Implement the smart function for fullscreen API */
815
816 #define ENABLE_TIZEN_WEBSOCKET_ADD_CANCELLABLE 1 /* Praveen (praveen.ks@samsung.com) : Add cancellable to input stream and cancel the cancellable when we close the platform */
817
818 #if ENABLE(WORKERS)
819 #define ENABLE_TIZEN_WORKERS 1 /* Jihye Kang(jye.kang@samsung.com) : Use allowUniversalAccessFromFileURLs setting for workers */
820 #endif
821
822 #define ENABLE_TIZEN_HW_MORE_BACK_KEY 1 /* Jongseok Yang(js45.yang@samsung.com), Kwangyong Choi (ky0.choi@samsung.net) : Add support for HW more/back keys */
823
824 #define ENABLE_TIZEN_TAKE_FOCUS 1 /* Jongseok Yang(js45.yang@samsung.com) : The focus should be controled by outside of webview object because EFL guarantees the focus control just for elemenatry */
825
826 #endif /* OS(TIZEN) */
827
828 /* ==== OS() - underlying operating system; only to be used for mandated low-level services like 
829    virtual memory, not to choose a GUI toolkit ==== */
830
831 /* OS(ANDROID) - Android */
832 #ifdef ANDROID
833 #define WTF_OS_ANDROID 1
834 #endif
835
836 /* OS(AIX) - AIX */
837 #ifdef _AIX
838 #define WTF_OS_AIX 1
839 #endif
840
841 /* OS(DARWIN) - Any Darwin-based OS, including Mac OS X and iPhone OS */
842 #ifdef __APPLE__
843 #define WTF_OS_DARWIN 1
844
845 #include <Availability.h>
846 #include <AvailabilityMacros.h>
847 #include <TargetConditionals.h>
848 #endif
849
850 /* OS(IOS) - iOS */
851 /* OS(MAC_OS_X) - Mac OS X (not including iOS) */
852 #if OS(DARWIN) && ((defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) \
853     || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)                 \
854     || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR))
855 #define WTF_OS_IOS 1
856 #elif OS(DARWIN) && defined(TARGET_OS_MAC) && TARGET_OS_MAC
857 #define WTF_OS_MAC_OS_X 1
858
859 /* FIXME: These can be removed after sufficient time has passed since the removal of BUILDING_ON / TARGETING macros. */
860
861 #define ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED 0 / 0
862 #define ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED 0 / 0
863
864 #define BUILDING_ON_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
865 #define BUILDING_ON_SNOW_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
866 #define BUILDING_ON_LION ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
867
868 #define TARGETING_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
869 #define TARGETING_SNOW_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
870 #define TARGETING_LION ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
871 #endif
872
873 /* OS(FREEBSD) - FreeBSD */
874 #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
875 #define WTF_OS_FREEBSD 1
876 #endif
877
878 /* OS(HURD) - GNU/Hurd */
879 #ifdef __GNU__
880 #define WTF_OS_HURD 1
881 #endif
882
883 /* OS(LINUX) - Linux */
884 #ifdef __linux__
885 #define WTF_OS_LINUX 1
886 #endif
887
888 /* OS(NETBSD) - NetBSD */
889 #if defined(__NetBSD__)
890 #define WTF_OS_NETBSD 1
891 #endif
892
893 /* OS(OPENBSD) - OpenBSD */
894 #ifdef __OpenBSD__
895 #define WTF_OS_OPENBSD 1
896 #endif
897
898 /* OS(QNX) - QNX */
899 #if defined(__QNXNTO__)
900 #define WTF_OS_QNX 1
901 #endif
902
903 /* OS(SOLARIS) - Solaris */
904 #if defined(sun) || defined(__sun)
905 #define WTF_OS_SOLARIS 1
906 #endif
907
908 /* OS(WINCE) - Windows CE; note that for this platform OS(WINDOWS) is also defined */
909 #if defined(_WIN32_WCE)
910 #define WTF_OS_WINCE 1
911 #endif
912
913 /* OS(WINDOWS) - Any version of Windows */
914 #if defined(WIN32) || defined(_WIN32)
915 #define WTF_OS_WINDOWS 1
916 #endif
917
918 #define WTF_OS_WIN ERROR "USE WINDOWS WITH OS NOT WIN"
919 #define WTF_OS_MAC ERROR "USE MAC_OS_X WITH OS NOT MAC"
920
921 /* OS(UNIX) - Any Unix-like system */
922 #if   OS(AIX)              \
923     || OS(ANDROID)          \
924     || OS(DARWIN)           \
925     || OS(FREEBSD)          \
926     || OS(HURD)             \
927     || OS(LINUX)            \
928     || OS(NETBSD)           \
929     || OS(OPENBSD)          \
930     || OS(QNX)              \
931     || OS(SOLARIS)          \
932     || defined(unix)        \
933     || defined(__unix)      \
934     || defined(__unix__)
935 #define WTF_OS_UNIX 1
936 #endif
937
938 /* Operating environments */
939
940 /* FIXME: these are all mixes of OS, operating environment and policy choices. */
941 /* PLATFORM(CHROMIUM) */
942 /* PLATFORM(QT) */
943 /* PLATFORM(WX) */
944 /* PLATFORM(GTK) */
945 /* PLATFORM(BLACKBERRY) */
946 /* PLATFORM(MAC) */
947 /* PLATFORM(WIN) */
948 #if defined(BUILDING_CHROMIUM__)
949 #define WTF_PLATFORM_CHROMIUM 1
950 #elif defined(BUILDING_QT__)
951 #define WTF_PLATFORM_QT 1
952 #elif defined(BUILDING_WX__)
953 #define WTF_PLATFORM_WX 1
954 #elif defined(BUILDING_GTK__)
955 #define WTF_PLATFORM_GTK 1
956 #elif defined(BUILDING_BLACKBERRY__)
957 #define WTF_PLATFORM_BLACKBERRY 1
958 #elif OS(DARWIN)
959 #define WTF_PLATFORM_MAC 1
960 #elif OS(WINDOWS)
961 #define WTF_PLATFORM_WIN 1
962 #endif
963
964 /* PLATFORM(IOS) */
965 /* FIXME: this is sometimes used as an OS switch and sometimes for higher-level things */
966 #if (defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
967 #define WTF_PLATFORM_IOS 1
968 #endif
969
970 /* PLATFORM(IOS_SIMULATOR) */
971 #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR
972 #define WTF_PLATFORM_IOS 1
973 #define WTF_PLATFORM_IOS_SIMULATOR 1
974 #endif
975
976 /* Graphics engines */
977
978 /* USE(CG) and PLATFORM(CI) */
979 #if PLATFORM(MAC) || PLATFORM(IOS)
980 #define WTF_USE_CG 1
981 #endif
982 #if PLATFORM(MAC) || PLATFORM(IOS) || (PLATFORM(WIN) && USE(CG))
983 #define WTF_USE_CA 1
984 #endif
985
986 /* USE(SKIA) for Win/Linux/Mac/Android */
987 #if PLATFORM(CHROMIUM)
988 #if OS(DARWIN)
989 #define WTF_USE_SKIA 1
990 #define WTF_USE_ICCJPEG 1
991 #define WTF_USE_QCMSLIB 1
992 #elif OS(ANDROID)
993 #define WTF_USE_SKIA 1
994 #define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1
995 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_DITHERING 1
996 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING 1
997 #else
998 #define WTF_USE_SKIA 1
999 #define WTF_USE_ICCJPEG 1
1000 #define WTF_USE_QCMSLIB 1
1001 #endif
1002 #endif
1003
1004 #if PLATFORM(BLACKBERRY)
1005 #define USE_SYSTEM_MALLOC 1
1006 #define WTF_USE_MERSENNE_TWISTER_19937 1
1007 #define WTF_USE_SKIA 1
1008 #endif
1009
1010 #if PLATFORM(GTK)
1011 #define WTF_USE_CAIRO 1
1012 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
1013 #endif
1014
1015
1016 #if OS(WINCE)
1017 #define WTF_USE_MERSENNE_TWISTER_19937 1
1018 #endif
1019
1020 /* On Windows, use QueryPerformanceCounter by default */
1021 #if OS(WINDOWS)
1022 #define WTF_USE_QUERY_PERFORMANCE_COUNTER  1
1023 #endif
1024
1025 #if OS(WINCE) && !PLATFORM(QT)
1026 #define NOSHLWAPI      /* shlwapi.h not available on WinCe */
1027
1028 /* MSDN documentation says these functions are provided with uspce.lib.  But we cannot find this file. */
1029 #define __usp10__      /* disable "usp10.h" */
1030
1031 #define _INC_ASSERT    /* disable "assert.h" */
1032 #define assert(x)
1033
1034 #endif  /* OS(WINCE) && !PLATFORM(QT) */
1035
1036 #if PLATFORM(QT)
1037 #ifndef WTF_USE_ICU_UNICODE
1038 #define WTF_USE_QT4_UNICODE 1
1039 #endif
1040 #elif OS(WINCE)
1041 #define WTF_USE_WINCE_UNICODE 1
1042 #elif PLATFORM(GTK)
1043 /* The GTK+ Unicode backend is configurable */
1044 #else
1045 #define WTF_USE_ICU_UNICODE 1
1046 #endif
1047
1048 #if PLATFORM(MAC) && !PLATFORM(IOS)
1049 #if CPU(X86_64)
1050 #define WTF_USE_PLUGIN_HOST_PROCESS 1
1051 #endif
1052 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
1053 #define ENABLE_GESTURE_EVENTS 1
1054 #define ENABLE_RUBBER_BANDING 1
1055 #define WTF_USE_SCROLLBAR_PAINTER 1
1056 #endif
1057 #if !defined(ENABLE_JAVA_BRIDGE)
1058 #define ENABLE_JAVA_BRIDGE 1
1059 #endif
1060 #if !defined(ENABLE_DASHBOARD_SUPPORT)
1061 #define ENABLE_DASHBOARD_SUPPORT 1
1062 #endif
1063 #define WTF_USE_CF 1
1064 #define WTF_USE_PTHREADS 1
1065 #define HAVE_PTHREAD_RWLOCK 1
1066 #define HAVE_READLINE 1
1067 #define HAVE_RUNLOOP_TIMER 1
1068 #define ENABLE_FULLSCREEN_API 1
1069 #define ENABLE_SMOOTH_SCROLLING 1
1070 #define ENABLE_WEB_ARCHIVE 1
1071 #define ENABLE_WEB_AUDIO 1
1072 #if defined(ENABLE_VIDEO)
1073 #define ENABLE_VIDEO_TRACK 1
1074 #endif
1075 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
1076 #define HAVE_LAYER_HOSTING_IN_WINDOW_SERVER 1
1077 #endif
1078 #define WTF_USE_APPKIT 1
1079 #define WTF_USE_SECURITY_FRAMEWORK 1
1080 #endif /* PLATFORM(MAC) && !PLATFORM(IOS) */
1081
1082 #if PLATFORM(CHROMIUM) && OS(DARWIN)
1083 #define WTF_USE_CF 1
1084 #define WTF_USE_PTHREADS 1
1085 #define HAVE_PTHREAD_RWLOCK 1
1086
1087 #define WTF_USE_WK_SCROLLBAR_PAINTER 1
1088 #endif
1089
1090 #if PLATFORM(IOS)
1091 #define DONT_FINALIZE_ON_MAIN_THREAD 1
1092 #endif
1093
1094 #if PLATFORM(QT) && OS(DARWIN)
1095 #define WTF_USE_CF 1
1096 #endif
1097
1098 #if OS(DARWIN) && !PLATFORM(GTK) && !PLATFORM(QT)
1099 #define ENABLE_PURGEABLE_MEMORY 1
1100 #endif
1101
1102 #if PLATFORM(IOS)
1103 #define ENABLE_CONTEXT_MENUS 0
1104 #define ENABLE_DRAG_SUPPORT 0
1105 #define ENABLE_GEOLOCATION 1
1106 #define ENABLE_ICONDATABASE 0
1107 #define ENABLE_INSPECTOR 1
1108 #define ENABLE_JAVA_BRIDGE 0
1109 #define ENABLE_NETSCAPE_PLUGIN_API 0
1110 #define ENABLE_ORIENTATION_EVENTS 1
1111 #define ENABLE_REPAINT_THROTTLING 1
1112 #define ENABLE_WEB_ARCHIVE 1
1113 #define HAVE_NETWORK_CFDATA_ARRAY_CALLBACK 1
1114 #define HAVE_PTHREAD_RWLOCK 1
1115 #define HAVE_READLINE 1
1116 #define WTF_USE_CF 1
1117 #define WTF_USE_CFNETWORK 1
1118 #define WTF_USE_PTHREADS 1
1119
1120 #if PLATFORM(IOS_SIMULATOR)
1121     #define ENABLE_CLASSIC_INTERPRETER 1
1122     #define ENABLE_JIT 0
1123     #define ENABLE_YARR_JIT 0
1124 #else
1125     #define ENABLE_CLASSIC_INTERPRETER 0
1126     #define ENABLE_JIT 1
1127     #define ENABLE_LLINT 1
1128     #define ENABLE_YARR_JIT 1
1129 #endif
1130
1131 #define WTF_USE_APPKIT 0
1132 #define WTF_USE_SECURITY_FRAMEWORK 0
1133 #endif
1134
1135 #if PLATFORM(WIN) && !OS(WINCE)
1136 #define WTF_USE_CF 1
1137 #endif
1138
1139 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !PLATFORM(WIN_CAIRO)
1140 #define WTF_USE_CFNETWORK 1
1141 #endif
1142
1143 #if USE(CFNETWORK) || PLATFORM(MAC) || PLATFORM(IOS)
1144 #define WTF_USE_CFURLCACHE 1
1145 #define WTF_USE_CFURLSTORAGESESSIONS 1
1146 #endif
1147
1148 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !PLATFORM(QT)
1149 #define ENABLE_WEB_ARCHIVE 1
1150 #endif
1151
1152 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !PLATFORM(WIN_CAIRO) && !PLATFORM(QT)
1153 #define ENABLE_FULLSCREEN_API 1
1154 #endif
1155
1156 #if PLATFORM(WX)
1157 #if !CPU(PPC)
1158 #define ENABLE_ASSEMBLER 1
1159 #define ENABLE_JIT 1
1160 #endif
1161 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
1162 #define ENABLE_LLINT 0
1163 #if OS(DARWIN)
1164 #define WTF_USE_CF 1
1165 #define ENABLE_WEB_ARCHIVE 1
1166 #endif
1167 #endif
1168
1169 #if OS(UNIX) && (PLATFORM(GTK) || PLATFORM(QT))
1170 #define WTF_USE_PTHREADS 1
1171 #define HAVE_PTHREAD_RWLOCK 1
1172 #endif
1173
1174 #if !defined(HAVE_ACCESSIBILITY)
1175 #if PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && !OS(ANDROID))
1176 #define HAVE_ACCESSIBILITY 1
1177 #endif
1178 #endif /* !defined(HAVE_ACCESSIBILITY) */
1179
1180 #if OS(UNIX)
1181 #define HAVE_SIGNAL_H 1
1182 #define WTF_USE_OS_RANDOMNESS 1
1183 #endif
1184
1185 #if (OS(FREEBSD) || OS(OPENBSD)) && !defined(__GLIBC__)
1186 #define HAVE_PTHREAD_NP_H 1
1187 #endif
1188
1189 #if !defined(HAVE_VASPRINTF)
1190 #if !COMPILER(MSVC) && !COMPILER(RVCT) && !COMPILER(MINGW) && !(COMPILER(GCC) && OS(QNX))
1191 #define HAVE_VASPRINTF 1
1192 #endif
1193 #endif
1194
1195 #if !defined(HAVE_STRNSTR)
1196 #if OS(DARWIN) || (OS(FREEBSD) && !defined(__GLIBC__))
1197 #define HAVE_STRNSTR 1
1198 #endif
1199 #endif
1200
1201 #if !OS(WINDOWS) && !OS(SOLARIS) \
1202     && !OS(RVCT) \
1203     && !OS(ANDROID)
1204 #define HAVE_TM_GMTOFF 1
1205 #define HAVE_TM_ZONE 1
1206 #define HAVE_TIMEGM 1
1207 #endif
1208
1209 #if OS(DARWIN)
1210
1211 #define HAVE_ERRNO_H 1
1212 #define HAVE_LANGINFO_H 1
1213 #define HAVE_MMAP 1
1214 #define HAVE_MERGESORT 1
1215 #define HAVE_SBRK 1
1216 #define HAVE_STRINGS_H 1
1217 #define HAVE_SYS_PARAM_H 1
1218 #define HAVE_SYS_TIME_H 1
1219 #define HAVE_SYS_TIMEB_H 1
1220 #define WTF_USE_ACCELERATE 1
1221
1222 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
1223
1224 #define HAVE_DISPATCH_H 1
1225 #define HAVE_HOSTED_CORE_ANIMATION 1
1226
1227 #if !PLATFORM(IOS)
1228 #define HAVE_MADV_FREE_REUSE 1
1229 #define HAVE_MADV_FREE 1
1230 #define HAVE_PTHREAD_SETNAME_NP 1
1231 #endif
1232
1233 #endif
1234
1235 #if PLATFORM(IOS)
1236 #define HAVE_MADV_FREE 1
1237 #define HAVE_PTHREAD_SETNAME_NP 1
1238 #endif
1239
1240 #elif OS(WINDOWS)
1241
1242 #if !OS(WINCE)
1243 #define HAVE_SYS_TIMEB_H 1
1244 #define HAVE_ALIGNED_MALLOC 1
1245 #define HAVE_ISDEBUGGERPRESENT 1
1246 #endif
1247 #define HAVE_VIRTUALALLOC 1
1248 #define WTF_USE_OS_RANDOMNESS 1
1249
1250 #elif OS(QNX)
1251
1252 #define HAVE_ERRNO_H 1
1253 #define HAVE_MMAP 1
1254 #define HAVE_MADV_FREE_REUSE 1
1255 #define HAVE_MADV_FREE 1
1256 #define HAVE_SBRK 1
1257 #define HAVE_STRINGS_H 1
1258 #define HAVE_SYS_PARAM_H 1
1259 #define HAVE_SYS_TIME_H 1
1260 #define WTF_USE_PTHREADS 1
1261
1262 #elif OS(ANDROID)
1263
1264 #define HAVE_ERRNO_H 1
1265 #define HAVE_NMAP 1
1266 #define HAVE_SBRK 1
1267 #define HAVE_STRINGS_H 1
1268 #define HAVE_SYS_PARAM_H 1
1269 #define HAVE_SYS_TIME_H 1
1270
1271 #else
1272
1273 /* FIXME: is this actually used or do other platforms generate their own config.h? */
1274
1275 #define HAVE_ERRNO_H 1
1276 #define HAVE_LANGINFO_H 1
1277 #define HAVE_MMAP 1
1278 #define HAVE_SBRK 1
1279 #define HAVE_STRINGS_H 1
1280 #define HAVE_SYS_PARAM_H 1
1281 #define HAVE_SYS_TIME_H 1
1282
1283 #endif
1284
1285 /* ENABLE macro defaults */
1286
1287 #if PLATFORM(QT)
1288 /* We must not customize the global operator new and delete for the Qt port. */
1289 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
1290 #if !OS(UNIX)
1291 #define USE_SYSTEM_MALLOC 1
1292 #endif
1293 #endif
1294
1295 #if PLATFORM(EFL)
1296 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
1297 #endif
1298
1299 #if !defined(ENABLE_ICONDATABASE)
1300 #define ENABLE_ICONDATABASE 1
1301 #endif
1302
1303 #if !defined(ENABLE_SQL_DATABASE)
1304 #define ENABLE_SQL_DATABASE 1
1305 #endif
1306
1307 #if !defined(ENABLE_JAVASCRIPT_DEBUGGER)
1308 #define ENABLE_JAVASCRIPT_DEBUGGER 1
1309 #endif
1310
1311 #if !defined(ENABLE_FTPDIR)
1312 #define ENABLE_FTPDIR 1
1313 #endif
1314
1315 #if !defined(ENABLE_CONTEXT_MENUS)
1316 #define ENABLE_CONTEXT_MENUS 1
1317 #endif
1318
1319 #if !defined(ENABLE_DRAG_SUPPORT)
1320 #define ENABLE_DRAG_SUPPORT 1
1321 #endif
1322
1323 #if !defined(ENABLE_INSPECTOR)
1324 #define ENABLE_INSPECTOR 1
1325 #endif
1326
1327 #if !defined(ENABLE_NETSCAPE_PLUGIN_API)
1328 #define ENABLE_NETSCAPE_PLUGIN_API 1
1329 #endif
1330
1331 #if !defined(ENABLE_GLOBAL_FASTMALLOC_NEW)
1332 #define ENABLE_GLOBAL_FASTMALLOC_NEW 1
1333 #endif
1334
1335 #if !defined(ENABLE_PARSED_STYLE_SHEET_CACHING)
1336 #define ENABLE_PARSED_STYLE_SHEET_CACHING 1
1337 #endif
1338
1339 #if !defined(ENABLE_SUBPIXEL_LAYOUT)
1340 #if PLATFORM(CHROMIUM)
1341 #define ENABLE_SUBPIXEL_LAYOUT 1 
1342 #else
1343 #define ENABLE_SUBPIXEL_LAYOUT 0
1344 #endif
1345 #endif
1346
1347 #define ENABLE_DEBUG_WITH_BREAKPOINT 0
1348 #define ENABLE_SAMPLING_COUNTERS 0
1349 #define ENABLE_SAMPLING_FLAGS 0
1350 #define ENABLE_SAMPLING_REGIONS 0
1351 #define ENABLE_OPCODE_SAMPLING 0
1352 #define ENABLE_CODEBLOCK_SAMPLING 0
1353 #if ENABLE(CODEBLOCK_SAMPLING) && !ENABLE(OPCODE_SAMPLING)
1354 #error "CODEBLOCK_SAMPLING requires OPCODE_SAMPLING"
1355 #endif
1356 #if ENABLE(OPCODE_SAMPLING) || ENABLE(SAMPLING_FLAGS) || ENABLE(SAMPLING_REGIONS)
1357 #define ENABLE_SAMPLING_THREAD 1
1358 #endif
1359
1360 #if !defined(ENABLE_TEXT_CARET) && !PLATFORM(IOS)
1361 #define ENABLE_TEXT_CARET 1
1362 #endif
1363
1364 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64)
1365 #if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
1366     || (CPU(IA64) && !CPU(IA64_32)) \
1367     || CPU(ALPHA) \
1368     || CPU(SPARC64) \
1369     || CPU(S390X) \
1370     || CPU(PPC64)
1371 #define WTF_USE_JSVALUE64 1
1372 #else
1373 #define WTF_USE_JSVALUE32_64 1
1374 #endif
1375 #endif /* !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64) */
1376
1377 /* Disable the JIT on versions of GCC prior to 4.1 */
1378 #if !defined(ENABLE_JIT) && COMPILER(GCC) && !GCC_VERSION_AT_LEAST(4, 1, 0)
1379 #define ENABLE_JIT 0
1380 #endif
1381
1382 /* JIT is not implemented for Windows 64-bit */
1383 #if !defined(ENABLE_JIT) && OS(WINDOWS) && CPU(X86_64)
1384 #define ENABLE_JIT 0
1385 #endif
1386
1387 #if !defined(ENABLE_JIT) && CPU(SH4) && PLATFORM(QT)
1388 #define ENABLE_JIT 1
1389 #endif
1390
1391 /* The JIT is enabled by default on all x86, x86-64, ARM & MIPS platforms. */
1392 #if !defined(ENABLE_JIT) \
1393     && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(MIPS)) \
1394     && (OS(DARWIN) || !COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 1, 0)) \
1395     && !OS(WINCE) \
1396     && !OS(QNX)
1397 #define ENABLE_JIT 1
1398 #endif
1399
1400 /* If possible, try to enable a disassembler. This is optional. We proceed in two
1401    steps: first we try to find some disassembler that we can use, and then we
1402    decide if the high-level disassembler API can be enabled. */
1403 #if !defined(WTF_USE_UDIS86) && ENABLE(JIT) && PLATFORM(MAC) && (CPU(X86) || CPU(X86_64))
1404 #define WTF_USE_UDIS86 1
1405 #endif
1406
1407 #if !defined(ENABLE_DISASSEMBLER) && USE(UDIS86)
1408 #define ENABLE_DISASSEMBLER 1
1409 #endif
1410
1411 /* On some of the platforms where we have a JIT, we want to also have the 
1412    low-level interpreter. */
1413 #if !defined(ENABLE_LLINT) \
1414     && ENABLE(JIT) \
1415     && (OS(DARWIN) || OS(LINUX)) \
1416     && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(GTK)) \
1417     && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2))
1418 #define ENABLE_LLINT 1
1419 #endif
1420
1421 #if !defined(ENABLE_DFG_JIT) && ENABLE(JIT)
1422 /* Enable the DFG JIT on X86 and X86_64.  Only tested on Mac and GNU/Linux. */
1423 #if (CPU(X86) || CPU(X86_64)) && (PLATFORM(MAC) || OS(LINUX))
1424 #define ENABLE_DFG_JIT 1
1425 #endif
1426 /* Enable the DFG JIT on ARMv7.  Only tested on iOS. */
1427 #if CPU(ARM_THUMB2) && (PLATFORM(IOS) || PLATFORM(BLACKBERRY) || OS(TIZEN))
1428 #define ENABLE_DFG_JIT 1
1429 #endif
1430 /* Enable the DFG JIT on ARM. */
1431 #if CPU(ARM_TRADITIONAL) && !OS(TIZEN)
1432 #define ENABLE_DFG_JIT 1
1433 #endif
1434 #endif
1435
1436 /* Profiling of types and values used by JIT code. DFG_JIT depends on it, but you
1437    can enable it manually with DFG turned off if you want to use it as a standalone
1438    profiler. In that case, you probably want to also enable VERBOSE_VALUE_PROFILE
1439    below. */
1440 #if !defined(ENABLE_VALUE_PROFILER) && ENABLE(DFG_JIT)
1441 #define ENABLE_VALUE_PROFILER 1
1442 #endif
1443
1444 #if !defined(ENABLE_VERBOSE_VALUE_PROFILE) && ENABLE(VALUE_PROFILER)
1445 #define ENABLE_VERBOSE_VALUE_PROFILE 0
1446 #endif
1447
1448 #if !defined(ENABLE_SIMPLE_HEAP_PROFILING)
1449 #define ENABLE_SIMPLE_HEAP_PROFILING 0
1450 #endif
1451
1452 /* Counts uses of write barriers using sampling counters. Be sure to also
1453    set ENABLE_SAMPLING_COUNTERS to 1. */
1454 #if !defined(ENABLE_WRITE_BARRIER_PROFILING)
1455 #define ENABLE_WRITE_BARRIER_PROFILING 0
1456 #endif
1457
1458 /* Ensure that either the JIT or the interpreter has been enabled. */
1459 #if !defined(ENABLE_CLASSIC_INTERPRETER) && !ENABLE(JIT) && !ENABLE(LLINT)
1460 #define ENABLE_CLASSIC_INTERPRETER 1
1461 #endif
1462
1463 /* If the jit and classic interpreter is not available, enable the LLInt C Loop: */
1464 #if !ENABLE(JIT) && !ENABLE(CLASSIC_INTERPRETER)
1465     #define ENABLE_LLINT 1
1466     #define ENABLE_LLINT_C_LOOP 1
1467     #define ENABLE_DFG_JIT 0
1468 #endif
1469
1470 /* Do a sanity check to make sure that we at least have one execution engine in
1471    use: */
1472 #if !(ENABLE(JIT) || ENABLE(CLASSIC_INTERPRETER) || ENABLE(LLINT))
1473 #error You have to have at least one execution model enabled to build JSC
1474 #endif
1475 /* Do a sanity check to make sure that we don't have both the classic interpreter
1476    and the llint C loop in use at the same time: */
1477 #if ENABLE(CLASSIC_INTERPRETER) && ENABLE(LLINT_C_LOOP)
1478 #error You cannot build both the classic interpreter and the llint C loop together
1479 #endif
1480
1481 /* Configure the JIT */
1482 #if CPU(X86) && COMPILER(MSVC)
1483 #define JSC_HOST_CALL __fastcall
1484 #elif CPU(X86) && COMPILER(GCC)
1485 #define JSC_HOST_CALL __attribute__ ((fastcall))
1486 #else
1487 #define JSC_HOST_CALL
1488 #endif
1489
1490 /* Configure the interpreter */
1491 #if COMPILER(GCC) || (RVCT_VERSION_AT_LEAST(4, 0, 0, 0) && defined(__GNUC__))
1492 #define HAVE_COMPUTED_GOTO 1
1493 #endif
1494 #if HAVE(COMPUTED_GOTO) && ENABLE(CLASSIC_INTERPRETER)
1495 #define ENABLE_COMPUTED_GOTO_CLASSIC_INTERPRETER 1
1496 #endif
1497
1498 /* Determine if we need to enable Computed Goto Opcodes or not: */
1499 #if (HAVE(COMPUTED_GOTO) && ENABLE(LLINT)) || ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER)
1500 #define ENABLE_COMPUTED_GOTO_OPCODES 1
1501 #endif
1502
1503 /* Regular Expression Tracing - Set to 1 to trace RegExp's in jsc.  Results dumped at exit */
1504 #define ENABLE_REGEXP_TRACING 0
1505
1506 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
1507 #if !defined(ENABLE_YARR_JIT) && (ENABLE(JIT) || ENABLE(LLINT_C_LOOP)) && !PLATFORM(CHROMIUM)
1508 #define ENABLE_YARR_JIT 1
1509
1510 /* Setting this flag compares JIT results with interpreter results. */
1511 #define ENABLE_YARR_JIT_DEBUG 0
1512 #endif
1513
1514 #if ENABLE(JIT) || ENABLE(YARR_JIT)
1515 #define ENABLE_ASSEMBLER 1
1516 #endif
1517
1518 /* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.
1519    On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */
1520 #if ENABLE(ASSEMBLER)
1521 #if CPU(X86_64) || PLATFORM(IOS)
1522 #define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1
1523 #else
1524 #define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1
1525 #endif
1526 #endif
1527
1528 #if !defined(ENABLE_PAN_SCROLLING) && OS(WINDOWS)
1529 #define ENABLE_PAN_SCROLLING 1
1530 #endif
1531
1532 /* Use the QXmlStreamReader implementation for XMLDocumentParser */
1533 /* Use the QXmlQuery implementation for XSLTProcessor */
1534 #if PLATFORM(QT)
1535 #if !USE(LIBXML2)
1536 #define WTF_USE_QXMLSTREAM 1
1537 #define WTF_USE_QXMLQUERY 1
1538 #endif
1539 #endif
1540
1541 /* Accelerated compositing */
1542 #if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO))
1543 #define WTF_USE_ACCELERATED_COMPOSITING 1
1544 #endif
1545
1546 #if PLATFORM(MAC) || PLATFORM(IOS)
1547 #define ENABLE_CSS_IMAGE_SET 1
1548 #endif
1549
1550
1551 /* Qt always uses Texture Mapper */
1552 #if PLATFORM(QT)
1553 #define WTF_USE_TEXTURE_MAPPER 1
1554 #if USE(3D_GRAPHICS)
1555 #define WTF_USE_TEXTURE_MAPPER_GL 1
1556 #endif
1557 #endif
1558
1559 #if ENABLE(WEBGL) && !defined(WTF_USE_3D_GRAPHICS)
1560 #define WTF_USE_3D_GRAPHICS 1
1561 #endif
1562
1563 /* Compositing on the UI-process in WebKit2 */
1564 #if PLATFORM(QT)
1565 #define WTF_USE_UI_SIDE_COMPOSITING 1
1566 #endif
1567
1568 #if PLATFORM(MAC) || PLATFORM(IOS)
1569 #define WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK 1
1570 #endif
1571
1572 #if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(EFL)))
1573 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
1574 #endif
1575
1576 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
1577 #define ENABLE_THREADED_SCROLLING 1
1578 #endif
1579
1580 /* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
1581 #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
1582
1583 /* FIXME: Eventually we should enable this for all platforms and get rid of the define. */
1584 #if PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
1585 #define WTF_USE_PLATFORM_STRATEGIES 1
1586 #endif
1587
1588 #if PLATFORM(WIN)
1589 #define WTF_USE_CROSS_PLATFORM_CONTEXT_MENUS 1
1590 #endif
1591
1592 #if PLATFORM(MAC) && HAVE(ACCESSIBILITY)
1593 #define WTF_USE_ACCESSIBILITY_CONTEXT_MENUS 1
1594 #endif
1595
1596 #if CPU(ARM_THUMB2)
1597 #define ENABLE_BRANCH_COMPACTION 1
1598 #endif
1599
1600 #if !defined(ENABLE_THREADING_LIBDISPATCH) && HAVE(DISPATCH_H)
1601 #define ENABLE_THREADING_LIBDISPATCH 1
1602 #elif !defined(ENABLE_THREADING_OPENMP) && defined(_OPENMP)
1603 #define ENABLE_THREADING_OPENMP 1
1604 #elif !defined(THREADING_GENERIC)
1605 #define ENABLE_THREADING_GENERIC 1
1606 #endif
1607
1608 #if ENABLE(GLIB_SUPPORT)
1609 #include <wtf/gobject/GTypedefs.h>
1610 #endif
1611
1612 /* FIXME: This define won't be needed once #27551 is fully landed. However, 
1613    since most ports try to support sub-project independence, adding new headers
1614    to WTF causes many ports to break, and so this way we can address the build
1615    breakages one port at a time. */
1616 #if !defined(WTF_USE_EXPORT_MACROS) && (PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(WX) || PLATFORM(BLACKBERRY))
1617 #define WTF_USE_EXPORT_MACROS 1
1618 #endif
1619
1620 #if !defined(WTF_USE_EXPORT_MACROS_FOR_TESTING) && (PLATFORM(GTK) || PLATFORM(WIN))
1621 #define WTF_USE_EXPORT_MACROS_FOR_TESTING 1
1622 #endif
1623
1624 #if (PLATFORM(QT) && !OS(DARWIN)) || PLATFORM(GTK) || PLATFORM(EFL)
1625 #define WTF_USE_UNIX_DOMAIN_SOCKETS 1
1626 #endif
1627
1628 #if !defined(ENABLE_COMPARE_AND_SWAP) && (OS(WINDOWS) || (COMPILER(GCC) && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2))))
1629 #define ENABLE_COMPARE_AND_SWAP 1
1630 #endif
1631
1632 #define ENABLE_OBJECT_MARK_LOGGING 0
1633
1634 #if !defined(ENABLE_PARALLEL_GC) && !ENABLE(OBJECT_MARK_LOGGING) && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(BLACKBERRY) || PLATFORM(GTK) || OS(TIZEN)) && ENABLE(COMPARE_AND_SWAP)
1635 #define ENABLE_PARALLEL_GC 1
1636 #elif PLATFORM(QT)
1637 // Parallel GC is temporarily disabled on Qt because of regular crashes, see https://bugs.webkit.org/show_bug.cgi?id=90957 for details
1638 #define ENABLE_PARALLEL_GC 0
1639 #endif
1640
1641 #if !defined(ENABLE_GC_VALIDATION) && !defined(NDEBUG)
1642 #define ENABLE_GC_VALIDATION 1
1643 #endif
1644
1645 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
1646 #define WTF_USE_AVFOUNDATION 1
1647 #endif
1648
1649 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
1650 #define WTF_USE_COREMEDIA 1
1651 #endif
1652
1653 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(BLACKBERRY)
1654 #define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1
1655 #endif
1656
1657 #if PLATFORM(MAC) || PLATFORM(BLACKBERRY)
1658 #define WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1
1659 #endif
1660
1661 #if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
1662 #define HAVE_INVERTED_WHEEL_EVENTS 1
1663 #endif
1664
1665 #if PLATFORM(MAC)
1666 #define WTF_USE_COREAUDIO 1
1667 #endif
1668
1669 #if !defined(WTF_USE_V8) && PLATFORM(CHROMIUM)
1670 #define WTF_USE_V8 1
1671 #endif
1672
1673 /* Not using V8 implies using JSC and vice versa */
1674 #if !USE(V8)
1675 #define WTF_USE_JSC 1
1676 #endif
1677
1678 #if ENABLE(NOTIFICATIONS) && PLATFORM(MAC)
1679 #define ENABLE_TEXT_NOTIFICATIONS_ONLY 1
1680 #endif
1681
1682 #if !defined(WTF_USE_ZLIB) && !PLATFORM(QT)
1683 #define WTF_USE_ZLIB 1
1684 #endif
1685
1686 #if PLATFORM(QT)
1687 #include <qglobal.h>
1688 #if defined(QT_OPENGL_ES_2) && !defined(WTF_USE_OPENGL_ES_2)
1689 #define WTF_USE_OPENGL_ES_2 1
1690 #endif
1691 #endif
1692
1693 #endif /* WTF_Platform_h */