float default_minimum_page_scale_factor;
float default_maximum_page_scale_factor;
+#if BUILDFLAG(IS_EFL)
+ bool TizenCompatibilityModeEnabled() const {
+ return (tizen_version_major && tizen_version_major < 3);
+ }
+ unsigned tizen_version_major = 7;
+ unsigned tizen_version_minor = 5;
+ unsigned tizen_version_release = 0;
+#endif
+
// Whether download UI should be hidden on this page.
bool hide_download_ui;
return r.strict_mime_type_check_for_worker_scripts_enabled;
}
+#if BUILDFLAG(IS_EFL)
+ static uint64_t tizen_version_major(
+ const blink::web_pref::WebPreferences& r) {
+ return r.tizen_version_major;
+ }
+
+ static uint64_t tizen_version_minor(
+ const blink::web_pref::WebPreferences& r) {
+ return r.tizen_version_minor;
+ }
+
+ static uint64_t tizen_version_release(
+ const blink::web_pref::WebPreferences& r) {
+ return r.tizen_version_release;
+ }
+#endif
+
static bool Read(blink::mojom::WebPreferencesDataView r,
blink::web_pref::WebPreferences* out);
};
float default_minimum_page_scale_factor;
float default_maximum_page_scale_factor;
+ [EnableIf=is_efl]
+ uint64 tizen_version_major;
+
+ [EnableIf=is_efl]
+ uint64 tizen_version_minor;
+
+ [EnableIf=is_efl]
+ uint64 tizen_version_release;
+
// Whether download UI should be hidden on this page.
bool hide_download_ui;
#if BUILDFLAG(IS_EFL)
static void EnableInputMultipleFieldsUI(bool);
static void EnableAcceleratedSmallCanvases(bool);
+ BLINK_PLATFORM_EXPORT static void SetTizenCompatibilityModeEnabled(bool);
#endif
WebRuntimeFeatures() = delete;
virtual void SetSelectionClipboardBufferAvailable(bool) = 0;
virtual void SetAccessibilityIncludeSvgGElement(bool) = 0;
virtual void SetWebXRImmersiveArAllowed(bool) = 0;
+#if BUILDFLAG(IS_EFL)
+ virtual void SetTizenVersion(unsigned, unsigned, unsigned) = 0;
+ virtual bool TizenCompatibilityModeEnabled() const = 0;
+#endif
protected:
~WebSettings() = default;
settings_->SetWebXRImmersiveArAllowed(webxr_immersive_ar_allowed);
}
+#if BUILDFLAG(IS_EFL)
+void WebSettingsImpl::SetTizenVersion(unsigned major,
+ unsigned minor,
+ unsigned release) {
+ settings_->SetTizenVersion(major, minor, release);
+}
+
+bool WebSettingsImpl::TizenCompatibilityModeEnabled() const {
+ return settings_->TizenCompatibilityModeEnabled();
+}
+#endif
+
} // namespace blink
void SetAccessibilityIncludeSvgGElement(bool) override;
void SetWebXRImmersiveArAllowed(bool webxr_immersive_ar_allowed) override;
+#if BUILDFLAG(IS_EFL)
+ void SetTizenVersion(unsigned, unsigned, unsigned) override;
+ bool TizenCompatibilityModeEnabled() const override;
+#endif
+
bool RenderVSyncNotificationEnabled() const {
return render_v_sync_notification_enabled_;
}
prefs.dont_send_key_events_to_javascript);
settings->SetWebAppScope(WebString::FromASCII(prefs.web_app_scope.spec()));
+#if BUILDFLAG(IS_EFL)
+ settings->SetTizenVersion(prefs.tizen_version_major,
+ prefs.tizen_version_minor,
+ prefs.tizen_version_release);
+#endif
+
#if BUILDFLAG(IS_ANDROID)
settings->SetAllowCustomScrollbarInMainFrame(false);
settings->SetAccessibilityFontScaleFactor(prefs.font_scale_factor);
delegate_->SettingsChanged(change_type);
}
+#if BUILDFLAG(IS_EFL)
+void Settings::SetTizenVersion(unsigned major,
+ unsigned minor,
+ unsigned release) {
+ if (tizen_compatibility_settings_.major == major &&
+ tizen_compatibility_settings_.minor == minor &&
+ tizen_compatibility_settings_.release == release)
+ return;
+
+ tizen_compatibility_settings_.major = major;
+ tizen_compatibility_settings_.minor = minor;
+ tizen_compatibility_settings_.release = release;
+
+ Invalidate(SettingsDelegate::ChangeType::kTizenVersionChange);
+}
+
+bool Settings::TizenCompatibilityModeEnabled() const {
+ return tizen_compatibility_settings_.TizenCompatibilityModeEnabled();
+}
+#endif
+
} // namespace blink
SETTINGS_GETTERS_AND_SETTERS
+#if BUILDFLAG(IS_EFL)
+ void SetTizenVersion(unsigned major, unsigned minor, unsigned release);
+ bool TizenCompatibilityModeEnabled() const;
+#endif
+
void SetDelegate(SettingsDelegate*);
private:
GenericFontFamilySettings generic_font_family_settings_;
+#if BUILDFLAG(IS_EFL)
+ struct {
+ unsigned major;
+ unsigned minor;
+ unsigned release;
+ bool TizenCompatibilityModeEnabled() const { return (major && major < 3); }
+ } tizen_compatibility_settings_;
+#endif
+
SETTINGS_MEMBER_VARIABLES
};
kSpatialNavigation,
kUniversalAccess,
kVisionDeficiency,
+#if BUILDFLAG(IS_EFL)
+ kTizenVersionChange,
+#endif
};
virtual void SettingsChanged(ChangeType) = 0;
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom-blink-forward.h"
#include "third_party/blink/public/platform/platform.h"
+
+#if BUILDFLAG(IS_EFL)
+#include "third_party/blink/public/platform/web_runtime_features.h"
+#endif
+
#include "third_party/blink/public/web/blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
#include "third_party/blink/renderer/core/core_export.h"
main_local_frame->GetDocument()->VisionDeficiencyChanged();
break;
}
+#if BUILDFLAG(IS_EFL)
+ case ChangeType::kTizenVersionChange: {
+ WebRuntimeFeatures::SetTizenCompatibilityModeEnabled(
+ GetSettings().TizenCompatibilityModeEnabled());
+ break;
+ }
+#endif
}
}
void WebRuntimeFeatures::EnableAcceleratedSmallCanvases(bool enable) {
RuntimeEnabledFeatures::SetAcceleratedSmallCanvasesEnabled(enable);
}
+
+void WebRuntimeFeatures::SetTizenCompatibilityModeEnabled(bool enable) {
+ RuntimeEnabledFeatures::SetTizenCompatibilityModeEnabled(enable);
+}
+
#endif
} // namespace blink
status: "stable",
},
{
+ name: "TizenCompatibilityMode",
+ },
+ {
name: "TimeZoneChangeEvent",
status: "experimental",
},
Eina_Bool ewk_settings_tizen_compatibility_mode_set(Ewk_Settings* settings, unsigned major, unsigned minor, unsigned release)
{
- LOG_EWK_API_MOCKUP();
- return false;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+ settings->getPreferences().tizen_version_major = major;
+ settings->getPreferences().tizen_version_minor = minor;
+ settings->getPreferences().tizen_version_release = release;
+ ewkUpdateWebkitPreferences(settings->getEvasObject());
+ return true;
}
Eina_Bool ewk_settings_webkit_text_size_adjust_enabled_get(const Ewk_Settings* settings)
evas_object_smart_callback_add(web_view_elm_host_, "unfocused",
&Window::OnHostFocusedOut, this);
+ std::string tizen_version = browser_.GetTizenVersion();
+ if (!tizen_version.empty()) {
+ std::vector<unsigned> parsed_tizen_version =
+ ParseTizenVersion(tizen_version);
+ ewk_settings_tizen_compatibility_mode_set(
+ GetEwkSettings(), parsed_tizen_version[0], parsed_tizen_version[1],
+ parsed_tizen_version[2]);
+ }
+
evas_object_smart_callback_add(web_view_, "title,changed",
&Window::OnTitleChanged, this);
evas_object_smart_callback_add(web_view_, "url,changed",