#define ENABLE_TIZEN_DRAW_SCALED_PATTERN 1 /* Kyungjin Kim(gen.kim@samsung.com) : Scale image prior to draw it's pattern to enhance performance */
#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 */
+#if ENABLE(TEXT_AUTOSIZING)
+#define ENABLE_TIZEN_TEXT_AUTOSIZING 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : for Tizen environment */
+#endif
+
/* Download Patches */
#define ENABLE_TIZEN_DOWNLOAD 1 /* Keunsoon Lee(keunsoon.lee@samsung.com) : */
, m_maximumHTMLParserDOMTreeDepth(defaultMaximumHTMLParserDOMTreeDepth)
#if ENABLE(TEXT_AUTOSIZING)
, m_textAutosizingFontScaleFactor(1)
+#if ENABLE(TIZEN_TEXT_AUTOSIZING)
+ , m_textAutosizingWindowSizeOverride(320, 480)
+#else
#if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP
, m_textAutosizingWindowSizeOverride(320, 480)
, m_textAutosizingEnabled(true)
, m_textAutosizingEnabled(false)
#endif
#endif
+#endif
, m_isSpatialNavigationEnabled(false)
, m_isJavaEnabled(false)
, m_isJavaEnabledForLocalFiles(true)
windowInfo.windowSize = m_document->settings()->textAutosizingWindowSizeOverride();
if (windowInfo.windowSize.isEmpty()) {
bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWidthOverride(mainFrame);
+#if ENABLE(TIZEN_TEXT_AUTOSIZING)
+ windowInfo.windowSize = mainFrame->view()->visibleContentRect(includeScrollbars).size();
+#else
windowInfo.windowSize = mainFrame->view()->unscaledVisibleContentSize(includeScrollbars ? ScrollableArea::IncludeScrollbars : ScrollableArea::ExcludeScrollbars);
+#endif
}
// Largest area of block that can be visible at once (assuming the main
return false;
#endif
}
+
+Eina_Bool ewk_settings_text_autosizing_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+#if ENABLE(TEXT_AUTOSIZING)
+ EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+
+ settings->preferences()->setTextAutosizingEnabled(enable);
+
+ return true;
+#else
+ UNUSED_PARAM(settings);
+ UNUSED_PARAM(enable);
+ return false;
+#endif
+}
+
+Eina_Bool ewk_settings_text_autosizing_enabled_get(const Ewk_Settings* settings)
+{
+#if ENABLE(TEXT_AUTOSIZING)
+ EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+
+ return settings->preferences()->textAutosizingEnabled();
+#else
+ UNUSED_PARAM(settings);
+ return false;
+#endif
+}
+
EAPI Eina_Bool ewk_settings_clear_text_selection_automatically_get(const Ewk_Settings* settings);
//#endif
+/**
+ * Enables/disables text autosizing.
+ *
+ * By default, the text autosizing is disabled.
+ *
+ * @param settings settings object to set the text autosizing
+ * @param enable @c EINA_TRUE to enable the text autosizing
+ * @c EINA_FALSE to disable
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ *
+ * @see ewk_settings_text_autosizing_enabled_get()
+ */
+EAPI Eina_Bool ewk_settings_text_autosizing_enabled_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns whether the text autosizing is enabled.
+ *
+ * The text autosizing is a feature which adjusts the font size of text in wide
+ * columns, and makes text more legible.
+ *
+ * @param settings settings object to query whether text autosizing is enabled
+ *
+ * @return @c EINA_TRUE if the text autosizing is enabled
+ * @c EINA_FALSE if not or on failure
+ */
+EAPI Eina_Bool ewk_settings_text_autosizing_enabled_get(const Ewk_Settings *settings);
+
#ifdef __cplusplus
}
#endif
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHARED_WORKERS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPELLCHECK ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_STYLE_SCOPED ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TEXT_AUTOSIZING OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TEXT_AUTOSIZING ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_ICON_LOADING ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIBRATION ON)