diff options
Diffstat (limited to 'WebKit/efl')
-rw-r--r-- | WebKit/efl/CMakeListsEfl.txt | 10 | ||||
-rw-r--r-- | WebKit/efl/ChangeLog | 233 | ||||
-rw-r--r-- | WebKit/efl/DefaultTheme/default.edc | 3 | ||||
-rw-r--r-- | WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png | bin | 0 -> 952 bytes | |||
-rw-r--r-- | WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc | 108 | ||||
-rw-r--r-- | WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png | bin | 0 -> 509 bytes | |||
-rw-r--r-- | WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp | 19 | ||||
-rw-r--r-- | WebKit/efl/WebCoreSupport/ChromeClientEfl.h | 2 | ||||
-rw-r--r-- | WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp | 11 | ||||
-rw-r--r-- | WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h | 7 | ||||
-rw-r--r-- | WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp | 6 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_main.cpp | 1 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_private.h | 8 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_settings.cpp | 42 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_settings.h | 2 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_view.cpp | 230 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_view.h | 8 | ||||
-rw-r--r-- | WebKit/efl/ewk/ewk_view_single.c | 2 |
18 files changed, 602 insertions, 90 deletions
diff --git a/WebKit/efl/CMakeListsEfl.txt b/WebKit/efl/CMakeListsEfl.txt index c154b66..1964d15 100644 --- a/WebKit/efl/CMakeListsEfl.txt +++ b/WebKit/efl/CMakeListsEfl.txt @@ -92,10 +92,15 @@ SET(BUILD_DATA_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme) SET(BUILD_DATA_DIR ${BUILD_DATA_DIR} PARENT_SCOPE) FILE(MAKE_DIRECTORY ${BUILD_DATA_DIR}) +SET(WebKit_THEME_DEFINITION "") +IF (ENABLE_PROGRESS_TAG) + LIST(APPEND WebKit_THEME_DEFINITION "-DENABLE_PROGRESS_TAG") +ENDIF () + SET(WebKit_THEME ${BUILD_DATA_DIR}/default.edj) ADD_CUSTOM_COMMAND( OUTPUT ${WebKit_THEME} - COMMAND ${EDJE_CC_EXECUTABLE} -v -id ${WEBKIT_DIR}/efl/DefaultTheme ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WebKit_THEME} + COMMAND ${EDJE_CC_EXECUTABLE} -v -id ${WEBKIT_DIR}/efl/DefaultTheme ${WebKit_THEME_DEFINITION} ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WebKit_THEME} DEPENDS ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_knob_v.png @@ -159,6 +164,9 @@ ADD_CUSTOM_COMMAND( ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_hover.png ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_focus.png ${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file.edc + ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/progressbar.edc + ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/shelf_inset.png + ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/bt_base.png VERBATIM ) diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog index 7c6afe9..1795645 100644 --- a/WebKit/efl/ChangeLog +++ b/WebKit/efl/ChangeLog @@ -1,3 +1,236 @@ +2010-10-19 Ryuan Choi <ryuan.choi@samsung.com> + + Reviewed by Eric Seidel. + + [EFL] Add setting api for disabling auto resize window + https://bugs.webkit.org/show_bug.cgi?id=47787 + + * WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::setWindowRect): Return when + auto_resize_window was disabled. + * ewk/ewk_view.cpp: + (_ewk_view_priv_new): + (ewk_view_setting_enable_auto_resize_window_get): Added. + (ewk_view_setting_enable_auto_resize_window_set): Added. + * ewk/ewk_view.h: + +2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Dirk Schulze. + + Replace some String::format() usages by StringConcatenate in WebKit + https://bugs.webkit.org/show_bug.cgi?id=47714 + + * WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::agentOS): + +2010-10-14 Rafael Antognolli <antognolli@profusion.mobi> + + Reviewed by Eric Seidel. + + [EFL] Use data_set after data_get to keep refcount correct. + https://bugs.webkit.org/show_bug.cgi?id=47110 + + The call to evas_object_image_data_set was missed in this function, + which caused the refcount of the data being always increased on every + scroll. + + * ewk/ewk_view_single.c: + (_ewk_view_single_smart_scrolls_process): + +2010-10-14 Ryuan Choi <ryuan.choi@samsung.com> + + Reviewed by Eric Seidel. + + [EFL] Add setting api for enabling encoding detector + https://bugs.webkit.org/show_bug.cgi?id=45427 + + Add settings api for enabling encoding detector. + + * ewk/ewk_view.cpp: + (_ewk_view_priv_new): + (ewk_view_setting_encoding_detector_set): + (ewk_view_setting_encoding_detector_get): + * ewk/ewk_view.h: + +2010-10-13 Leandro Pereira <leandro@profusion.mobi> + + [EFL] Unreviewed. Build fix. + + * WebCoreSupport/FrameLoaderClientEfl.h: Use String instead of + WebCore::String. + +2010-10-13 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=43987 + Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder + to construct their internal result string. Remove ScriptString (this is now + redundant). + + * WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::dispatchDidLoadResourceByXMLHttpRequest): + * WebCoreSupport/FrameLoaderClientEfl.h: + +2010-10-13 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Support viewport configuration and add new arguments for WebKit EFL + https://bugs.webkit.org/show_bug.cgi?id=47084 + + Opera spec regarding to viewport meta tag was adjusted to WebCore. So, EFL port + needs to be modified according to the changes. + + * WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::dispatchViewportDataDidChange): + * WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::dispatchDidCommitLoad): + * ewk/ewk_private.h: + * ewk/ewk_view.cpp: + (_ewk_view_priv_new): + (_ewk_view_viewport_attributes_compute): + (ewk_view_viewport_attributes_set): + (ewk_view_viewport_attributes_get): + (ewk_view_device_pixel_ratio_get): + * ewk/ewk_view.h: + +2010-10-12 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Add a method to get target's dpi value + https://bugs.webkit.org/show_bug.cgi?id=47537 + + Add a method to get target dpi value using Ecore_X. + When we set layout size, we need to use the dpi value. + + * ewk/ewk_private.h: + * ewk/ewk_view.cpp: + (ewk_view_page_rect_get): + (ewk_view_dpi_get): + +2010-10-07 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Antonio Gomes. + + [EFL] Implement pageRect() function + https://bugs.webkit.org/show_bug.cgi?id=47395 + + Implement pageRect() in ChromeClientEfl using frameRect(). + + * CMakeListsEfl.txt: + * WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::pageRect): + * ewk/ewk_private.h: + * ewk/ewk_view.cpp: + (ewk_view_page_rect_get): Added. + +2010-10-06 Ryuan Choi <ryuan.choi@samsung.com> + + Reviewed by Antonio Gomes. + + [EFL] Support Progress Tag + https://bugs.webkit.org/show_bug.cgi?id=45951 + + Implement progressbar.edc to support progress tag + + * CMakeListsEfl.txt: + * DefaultTheme/default.edc: + * DefaultTheme/widget/progressbar: Added. + * DefaultTheme/widget/progressbar/bt_base.png: Added. + * DefaultTheme/widget/progressbar/progressbar.edc: Added. + * DefaultTheme/widget/progressbar/shelf_inset.png: Added. + +2010-10-05 Ryuan Choi <ryuan.choi@samsung.com> + + Reviewed by Antonio Gomes. + + [EFL] Remove strdup in ewk_setting.cpp using eina_stringshare + https://bugs.webkit.org/show_bug.cgi?id=46613 + + Add variables shared by eina_stringshare and remove strdup. + + * ewk/ewk_main.cpp: + (_ewk_init_body): + * ewk/ewk_settings.cpp: + (ewk_settings_web_database_path_set): + (ewk_settings_web_database_path_get): + (ewk_settings_icon_database_path_set): + (ewk_settings_icon_database_path_get): + * ewk/ewk_settings.h: + +2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Viewport data change notification by Bug 46755 + https://bugs.webkit.org/show_bug.cgi?id=46772 + + Bug 46755 changes virtual function regarding to viewport metatag. Thus, EFL port + should change the function as well in order to get viewport arguments. + + And, setInitLayoutCompleted / getInitLayoutCompleted() are removed because these functions + aren't needed anymore. + + * WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::dispatchViewportDataDidChange): + * WebCoreSupport/ChromeClientEfl.h: + * WebCoreSupport/FrameLoaderClientEfl.cpp: + (WebCore::FrameLoaderClientEfl::FrameLoaderClientEfl): + (WebCore::FrameLoaderClientEfl::dispatchDidCommitLoad): + (WebCore::FrameLoaderClientEfl::dispatchDidFirstLayout): + * WebCoreSupport/FrameLoaderClientEfl.h: + +2010-10-01 Rafael Antognolli <antognolli@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Remove check for InitLayoutCompleted on fixed_layout_size_set. + https://bugs.webkit.org/show_bug.cgi?id=47006 + + This check isn't needed and isn't done on the other ports. The fixed + layout property can be set before we have the first layout. + + * ewk/ewk_view.cpp: + (ewk_view_fixed_layout_size_set): + +2010-10-01 Rafael Antognolli <antognolli@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Call contents_resize when the main frame gets resized. + https://bugs.webkit.org/show_bug.cgi?id=47004 + + The previous implementation was just calling contents_resize when the + viewport size had changed. That's not enough, and contents_resize + shouldn't be called if the contents size didn't change. + + Now the contents_size_changed function is called directly from the + ChromeClientEfl. + + * WebCoreSupport/ChromeClientEfl.cpp: + (WebCore::ChromeClientEfl::contentsSizeChanged): + * ewk/ewk_private.h: + * ewk/ewk_view.cpp: + (_ewk_view_smart_calculate): + (ewk_view_fixed_layout_size_set): + (ewk_view_contents_size_changed): + +2010-09-29 João Paulo Rechi Vita <jprvita@profusion.mobi> + + Reviewed by Antonio Gomes. + + [EFL] General small fixes. + https://bugs.webkit.org/show_bug.cgi?id=46813 + + This commit spots a comparison between signed and unsigned integer + expressions, a missing return and a never-called function. + + * WebCoreSupport/FullscreenVideoControllerEfl.cpp: + (FullscreenVideoController::canPlay): + 2010-09-28 Jenn Braithwaite <jennb@chromium.org> Reviewed by Dmitry Titov. diff --git a/WebKit/efl/DefaultTheme/default.edc b/WebKit/efl/DefaultTheme/default.edc index 0496a24..7d750f4 100644 --- a/WebKit/efl/DefaultTheme/default.edc +++ b/WebKit/efl/DefaultTheme/default.edc @@ -68,6 +68,9 @@ collections { #include "widget/check/check.edc" #include "widget/entry/entry.edc" #include "widget/combo/combo.edc" +#ifdef ENABLE_PROGRESS_TAG +#include "widget/progressbar/progressbar.edc" +#endif #include "widget/file/file.edc" #include "widget/search/field/search_field.edc" #include "widget/search/cancel/search_cancel.edc" diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png b/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png Binary files differnew file mode 100644 index 0000000..2d1f179 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc b/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc new file mode 100644 index 0000000..2a34d54 --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc @@ -0,0 +1,108 @@ +/* + Copyright (C) 2010 Samsung Electronics + + This file is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +group { + name: "webkit/widget/progressbar"; + min: 0 11; /* if > 0, this is the minimum size that will be allocated. + * If wants to draw on top, just overflow usign edje's rel1/rel2 + */ + max: 999999 999999; + + images { + image: "widget/progressbar/shelf_inset.png" COMP; + image: "widget/progressbar/bt_base.png" COMP; + } + + script { + public message(Msg_Type:type, id, ...) { + if ((id == 0) && (type == MSG_FLOAT_SET)) { + new Float:x, Float:sx; + x = getfarg(2); + sx = getfarg(3); + + if (sx >= 0.0) { + set_drag_size(PART:"img.progressbar_fill", sx, 1.0); + set_drag(PART:"img.progressbar_fill", x, 0.0); + } + } + } + } + + parts { + part { + name: "rect.base"; + type: RECT; + description { + state: "default" 0.0; + min: 29 11; + max: 999999 99999; + color: 255 255 255 0; + } + } + part { + name: "rect.clipper"; + type: RECT; + description { + state: "default" 0.0; + color: 255 255 255 255; + } + description { + state: "hidden" 0.0; + color: 255 255 255 128; + } + } + + part { + name: "img.progressbar"; + type: IMAGE; + mouse_events: 0; + clip_to: "rect.clipper"; + description { + state: "default" 0.0; + min: 29 5; + rel1.to: "rect.base"; + rel2.to: "rect.base"; + align: 0.5 0.5; + image { + normal: "widget/progressbar/shelf_inset.png"; + border: 8 8 8 8; + } + } + } + part { + name: "img.progressbar_fill"; + type: IMAGE; + mouse_events: 0; + clip_to: "rect.clipper"; + dragable { + x: 1 1 0; + y: 0 0 0; + confine: "rect.base"; + } + description { + state: "default" 0.0; + min: 0 5; + align: 0.5 0.5; + image { + normal: "widget/progressbar/bt_base.png"; + border: 7 7 0 0; + } + } + } + } +} diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png b/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png Binary files differnew file mode 100644 index 0000000..bb1989d --- /dev/null +++ b/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp index 21747a1..257e824 100644 --- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp +++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp @@ -111,6 +111,9 @@ void ChromeClientEfl::setWindowRect(const FloatRect& rect) if (!m_view) return; + if (!ewk_view_setting_enable_auto_resize_window_get(m_view)) + return; + ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view)); ecore_evas_move(ee, intrect.x(), intrect.y()); ecore_evas_resize(ee, intrect.width(), intrect.height()); @@ -118,8 +121,10 @@ void ChromeClientEfl::setWindowRect(const FloatRect& rect) FloatRect ChromeClientEfl::pageRect() { - notImplemented(); - return FloatRect(); + if (!m_view) + return FloatRect(); + + return ewk_view_page_rect_get(m_view); } float ChromeClientEfl::scaleFactor() @@ -319,6 +324,8 @@ IntRect ChromeClientEfl::windowResizerRect() const void ChromeClientEfl::contentsSizeChanged(Frame* frame, const IntSize& size) const { ewk_frame_contents_size_changed(kit(frame), size.width(), size.height()); + if (ewk_view_frame_main_get(m_view) == kit(frame)) + ewk_view_contents_size_changed(m_view, size.width(), size.height()); } IntRect ChromeClientEfl::windowToScreen(const IntRect& rect) const @@ -513,13 +520,9 @@ void ChromeClientEfl::chooseIconForFiles(const Vector<String>&, FileChooser*) notImplemented(); } -void ChromeClientEfl::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const +void ChromeClientEfl::dispatchViewportDataDidChange(const ViewportArguments& arguments) const { - FrameLoaderClientEfl* client = static_cast<FrameLoaderClientEfl*>(frame->loader()->client()); - if (client->getInitLayoutCompleted()) - return; - - ewk_view_viewport_set(m_view, arguments.width, arguments.height, arguments.initialScale, arguments.minimumScale, arguments.maximumScale, arguments.userScalable); + ewk_view_viewport_attributes_set(m_view, arguments); } bool ChromeClientEfl::selectItemWritingDirectionIsNatural() diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h index d939ae6..4339b9a 100644 --- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h +++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h @@ -137,7 +137,7 @@ public: virtual void cancelGeolocationPermissionRequestForFrame(Frame*); virtual void iconForFiles(const Vector<String, 0u>&, PassRefPtr<FileChooser>); - virtual void didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const; + virtual void dispatchViewportDataDidChange(const ViewportArguments&) const; virtual bool selectItemWritingDirectionIsNatural(); virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp index 2d452d8..1b82239 100644 --- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp @@ -54,6 +54,7 @@ #include "ViewportArguments.h" #include "ewk_private.h" #include <wtf/text/CString.h> +#include <wtf/text/StringConcatenate.h> #if PLATFORM(UNIX) #include <sys/utsname.h> @@ -72,7 +73,6 @@ FrameLoaderClientEfl::FrameLoaderClientEfl(Evas_Object *view) , m_customUserAgent("") , m_pluginView(0) , m_hasSentResponseToPlugin(false) - , m_initLayoutCompleted(false) { } @@ -93,7 +93,7 @@ static String agentOS() #elif PLATFORM(UNIX) struct utsname name; if (uname(&name) != -1) - return String::format("%s %s", name.sysname, name.machine); + return makeString(name.sysname, ' ', name.machine); return "Unknown"; #elif PLATFORM(WIN_OS) @@ -615,8 +615,6 @@ void FrameLoaderClientEfl::dispatchDidChangeIcons() void FrameLoaderClientEfl::dispatchDidCommitLoad() { - m_initLayoutCompleted = false; - ewk_frame_uri_changed(m_frame); if (ewk_view_frame_main_get(m_view) != m_frame) return; @@ -624,7 +622,7 @@ void FrameLoaderClientEfl::dispatchDidCommitLoad() ewk_view_uri_changed(m_view); ViewportArguments arguments; - ewk_view_viewport_set(m_view, arguments.width, arguments.height, arguments.initialScale, arguments.minimumScale, arguments.maximumScale, arguments.userScalable); + ewk_view_viewport_attributes_set(m_view, arguments); } void FrameLoaderClientEfl::dispatchDidFinishDocumentLoad() @@ -634,7 +632,6 @@ void FrameLoaderClientEfl::dispatchDidFinishDocumentLoad() void FrameLoaderClientEfl::dispatchDidFirstLayout() { - m_initLayoutCompleted = true; ewk_frame_load_firstlayout_finished(m_frame); } @@ -763,7 +760,7 @@ bool FrameLoaderClientEfl::dispatchDidLoadResourceFromMemoryCache(DocumentLoader return false; } -void FrameLoaderClientEfl::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&) +void FrameLoaderClientEfl::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const String&) { notImplemented(); } diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h index 2b4414a..1b880e6 100644 --- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h +++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h @@ -55,9 +55,6 @@ class FrameLoaderClientEfl : public FrameLoaderClient { void setCustomUserAgent(const String &agent); const String& customUserAgent() const; - void setInitLayoutCompleted(bool completed) { m_initLayoutCompleted = completed; } - bool getInitLayoutCompleted() { return m_initLayoutCompleted; } - virtual bool hasWebView() const; virtual bool hasFrameView() const; @@ -94,7 +91,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient { virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier); virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&); virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length); - virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString& sourceString); + virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const String& sourceString); virtual void dispatchDidHandleOnloadEvents(); virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); @@ -218,8 +215,6 @@ class FrameLoaderClientEfl : public FrameLoaderClient { // Plugin view to redirect data to PluginView* m_pluginView; bool m_hasSentResponseToPlugin; - - bool m_initLayoutCompleted; }; } diff --git a/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp index 6e5d599..70deaef 100644 --- a/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp +++ b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp @@ -91,6 +91,7 @@ void FullscreenVideoController::exitFullscreen() bool FullscreenVideoController::canPlay() const { notImplemented(); + return false; } void FullscreenVideoController::play() @@ -178,11 +179,6 @@ void FullscreenVideoController::endSeek() notImplemented(); } -static String timeToString(float time) -{ - notImplemented(); -} - bool FullscreenVideoController::updateHudProgressBar() { notImplemented(); diff --git a/WebKit/efl/ewk/ewk_main.cpp b/WebKit/efl/ewk/ewk_main.cpp index 8c27478..26dec81 100644 --- a/WebKit/efl/ewk/ewk_main.cpp +++ b/WebKit/efl/ewk/ewk_main.cpp @@ -175,6 +175,7 @@ Eina_Bool _ewk_init_body(void) WTF::String wkdir = WTF::String(home) + "/.webkit"; ewk_settings_web_database_path_set(wkdir.utf8().data()); + ewk_settings_icon_database_path_set(wkdir.utf8().data()); WebCore::cacheStorage().setCacheDirectory(wkdir); diff --git a/WebKit/efl/ewk/ewk_private.h b/WebKit/efl/ewk/ewk_private.h index eaad13c..e2624a3 100644 --- a/WebKit/efl/ewk/ewk_private.h +++ b/WebKit/efl/ewk/ewk_private.h @@ -102,10 +102,12 @@ WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object *o, Evas_Objec WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* o, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually); void ewk_view_popup_new(Evas_Object *o, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect); -void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable); +void ewk_view_viewport_attributes_set(Evas_Object *o, const WebCore::ViewportArguments& arguments); void ewk_view_download_request(Evas_Object *o, Ewk_Download *download); +int ewk_view_dpi_get(); + Ewk_History *ewk_history_new(WebCore::BackForwardList *history); void ewk_history_free(Ewk_History *history); @@ -150,6 +152,10 @@ WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* o, const W Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* o, Ewk_Frame_Resource_Request* request); +void ewk_view_contents_size_changed(Evas_Object *o, Evas_Coord w, Evas_Coord h); + +WebCore::FloatRect ewk_view_page_rect_get(Evas_Object *o); + #ifdef __cplusplus } diff --git a/WebKit/efl/ewk/ewk_settings.cpp b/WebKit/efl/ewk/ewk_settings.cpp index 6d2be05..f2651a1 100644 --- a/WebKit/efl/ewk/ewk_settings.cpp +++ b/WebKit/efl/ewk/ewk_settings.cpp @@ -44,6 +44,8 @@ #include <libsoup/soup.h> #endif +static const char* _ewk_default_web_database_path = 0; +static const char* _ewk_icon_database_path = 0; static uint64_t _ewk_default_web_database_quota = 1 * 1024 * 1024; /** @@ -69,21 +71,27 @@ void ewk_settings_web_database_path_set(const char *path) #if ENABLE(DATABASE) WTF::String corePath = WTF::String::fromUTF8(path); WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(corePath); + if (!_ewk_default_web_database_path) + _ewk_default_web_database_path = eina_stringshare_add(corePath.utf8().data()); + else + eina_stringshare_replace(&_ewk_default_web_database_path, corePath.utf8().data()); + #endif } /** * Return directory path where web database is stored. * - * @return newly allocated string with database path. Note that return must be - * freed with free() as it's a strdup()ed copy of the string due reference - * counting. + * @return database path or NULL if none or web database is not supported. + * This is guaranteed to be eina_stringshare, so whenever possible + * save yourself some cpu cycles and use + * eina_stringshare_ref() instead of eina_stringshare_add() or + * strdup(). */ const char *ewk_settings_web_database_path_get() { #if ENABLE(DATABASE) - WTF::String path = WebCore::DatabaseTracker::tracker().databaseDirectoryPath(); - return strdup(path.utf8().data()); + return _ewk_default_web_database_path; #else return 0; #endif @@ -122,9 +130,17 @@ Eina_Bool ewk_settings_icon_database_path_set(const char *directory) WebCore::iconDatabase()->setEnabled(true); WebCore::iconDatabase()->open(WTF::String::fromUTF8(directory)); + if (!_ewk_icon_database_path) + _ewk_icon_database_path = eina_stringshare_add(directory); + else + eina_stringshare_replace(&_ewk_icon_database_path, directory); } else { WebCore::iconDatabase()->setEnabled(false); WebCore::iconDatabase()->close(); + if (_ewk_icon_database_path) { + eina_stringshare_del(_ewk_icon_database_path); + _ewk_icon_database_path = 0; + } } return EINA_TRUE; } @@ -132,22 +148,20 @@ Eina_Bool ewk_settings_icon_database_path_set(const char *directory) /** * Return directory path where icon database is stored. * - * @return newly allocated string with database path or @c NULL if - * none is set or database is closed. Note that return must be - * freed with free() as it's a strdup()ed copy of the string - * due reference counting. + * @return database path or @c NULL if none is set or database is closed. + * This is guaranteed to be eina_stringshare, so whenever possible + * save yourself some cpu cycles and use + * eina_stringshare_ref() instead of eina_stringshare_add() or + * strdup(). */ -char* ewk_settings_icon_database_path_get(void) +const char* ewk_settings_icon_database_path_get(void) { if (!WebCore::iconDatabase()->isEnabled()) return 0; if (!WebCore::iconDatabase()->isOpen()) return 0; - WTF::String path = WebCore::iconDatabase()->databasePath(); - if (path.isEmpty()) - return 0; - return strdup(path.utf8().data()); + return _ewk_icon_database_path; } /** diff --git a/WebKit/efl/ewk/ewk_settings.h b/WebKit/efl/ewk/ewk_settings.h index f2d77f7..3c1668f 100644 --- a/WebKit/efl/ewk/ewk_settings.h +++ b/WebKit/efl/ewk/ewk_settings.h @@ -42,7 +42,7 @@ EAPI void ewk_settings_web_database_path_set(const char *path); EAPI const char *ewk_settings_web_database_path_get(); EAPI Eina_Bool ewk_settings_icon_database_path_set(const char *path); -EAPI char *ewk_settings_icon_database_path_get(void); +EAPI const char *ewk_settings_icon_database_path_get(void); EAPI Eina_Bool ewk_settings_icon_database_clear(void); EAPI cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *url); diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp index 19efbfa..f1ca733 100644 --- a/WebKit/efl/ewk/ewk_view.cpp +++ b/WebKit/efl/ewk/ewk_view.cpp @@ -22,7 +22,7 @@ #include "config.h" #include "ewk_view.h" -#include "appcache/ApplicationCacheStorage.h" +#include "Chrome.h" #include "ChromeClientEfl.h" #include "ContextMenuClientEfl.h" #include "ContextMenuController.h" @@ -42,6 +42,7 @@ #include "PlatformMouseEvent.h" #include "PopupMenuClient.h" #include "ProgressTracker.h" +#include "appcache/ApplicationCacheStorage.h" #include "ewk_private.h" #include <Ecore.h> @@ -51,9 +52,15 @@ #include <inttypes.h> #include <sys/time.h> +#ifdef HAVE_ECORE_X +#include <Ecore_X.h> +#endif + #define ZOOM_MIN (0.05) #define ZOOM_MAX (4.0) +#define DEVICE_PIXEL_RATIO (1.0) + static const char EWK_VIEW_TYPE_STR[] = "EWK_View"; static const size_t EWK_VIEW_REPAINTS_SIZE_INITIAL = 32; @@ -68,6 +75,7 @@ struct _Ewk_View_Private_Data { WebCore::Page* page; WebCore::Settings* page_settings; WebCore::Frame* main_frame; + WebCore::ViewportArguments viewport_arguments; Ewk_History* history; struct { Ewk_Menu menu; @@ -104,9 +112,11 @@ struct _Ewk_View_Private_Data { const char* font_sans_serif; Eina_Bool auto_load_images:1; Eina_Bool auto_shrink_images:1; + Eina_Bool enable_auto_resize_window:1; Eina_Bool enable_scripts:1; Eina_Bool enable_plugins:1; Eina_Bool enable_frame_flattening:1; + Eina_Bool encoding_detector:1; Eina_Bool scripts_window_open:1; Eina_Bool resizable_textareas:1; Eina_Bool private_browsing:1; @@ -116,18 +126,11 @@ struct _Ewk_View_Private_Data { Eina_Bool offline_app_cache: 1; Eina_Bool page_cache: 1; struct { - float w; - float h; - float init_scale; - float min_scale; - float max_scale; - float user_scalable; - } viewport; - struct { float min_scale; float max_scale; Eina_Bool user_scalable:1; } zoom_range; + float device_pixel_ratio; } settings; struct { struct { @@ -569,6 +572,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->page_settings->setLocalStorageEnabled(true); priv->page_settings->setOfflineWebApplicationCacheEnabled(true); priv->page_settings->setUsesPageCache(true); + priv->page_settings->setUsesEncodingDetector(true); url = priv->page_settings->userStyleSheetLocation(); priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data()); @@ -603,6 +607,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.auto_load_images = priv->page_settings->loadsImagesAutomatically(); priv->settings.auto_shrink_images = priv->page_settings->shrinksStandaloneImagesToFit(); + priv->settings.enable_auto_resize_window = EINA_TRUE; priv->settings.enable_scripts = priv->page_settings->isJavaScriptEnabled(); priv->settings.enable_plugins = priv->page_settings->arePluginsEnabled(); priv->settings.enable_frame_flattening = priv->page_settings->frameFlatteningEnabled(); @@ -613,6 +618,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.local_storage = priv->page_settings->localStorageEnabled(); priv->settings.offline_app_cache = true; // XXX no function to read setting; this keeps the original setting priv->settings.page_cache = priv->page_settings->usesPageCache(); + priv->settings.encoding_detector = priv->page_settings->usesEncodingDetector(); // Since there's no scale separated from zooming in webkit-efl, this functionality of // viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl, @@ -620,6 +626,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->settings.zoom_range.min_scale = ZOOM_MIN; priv->settings.zoom_range.max_scale = ZOOM_MAX; priv->settings.zoom_range.user_scalable = EINA_TRUE; + priv->settings.device_pixel_ratio = DEVICE_PIXEL_RATIO; priv->main_frame = _ewk_view_core_frame_new(sd, priv, 0).get(); if (!priv->main_frame) { @@ -805,10 +812,6 @@ static void _ewk_view_smart_calculate(Evas_Object* o) view->resize(w, h); view->forceLayout(); view->adjustViewSize(); - IntSize size = view->contentsSize(); - if (!sd->api->contents_resize(sd, size.width(), size.height())) - ERR("failed to resize contents to %dx%d", - size.width(), size.height()); } evas_object_resize(sd->main_frame, w, h); sd->changed.frame_rect = EINA_TRUE; @@ -967,6 +970,26 @@ static void _ewk_view_zoom_animation_start(Ewk_View_Smart_Data* sd) (_ewk_view_zoom_animator_cb, sd); } +static WebCore::ViewportAttributes _ewk_view_viewport_attributes_compute(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + int desktop_width = 980; + int device_dpi = 160; + + int available_width = (int) priv->page->chrome()->client()->pageRect().width(); + int available_height = (int) priv->page->chrome()->client()->pageRect().height(); + + int device_width = (int) priv->page->chrome()->client()->windowRect().width(); + int device_height = (int) priv->page->chrome()->client()->windowRect().height(); + + IntSize available_size = IntSize(available_width, available_height); + WebCore::ViewportAttributes attributes = WebCore::computeViewportAttributes(priv->viewport_arguments, desktop_width, device_width, device_height, device_dpi, available_size); + + return attributes; +} + /** * Sets the smart class api without any backing store, enabling view * to be inherited. @@ -1052,10 +1075,6 @@ void ewk_view_fixed_layout_size_set(Evas_Object* o, Evas_Coord w, Evas_Coord h) EWK_VIEW_SD_GET_OR_RETURN(o, sd); EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv); - WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->main_frame->loader()->client()); - if (!client->getInitLayoutCompleted()) - return; - WebCore::FrameView* view = sd->_priv->main_frame->view(); if (w <= 0 && h <= 0) { if (!priv->fixed_layout.use) @@ -2282,6 +2301,39 @@ Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object* o, Eina_Bool auto return EINA_TRUE; } +/** + * Gets if view can be resized automatically. + * + * @param o view to check status + * + * @return EINA_TRUE if view can be resized, EINA_FALSE + * otherwise (errors, cannot be resized). + */ +Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.enable_auto_resize_window; +} + +/** + * Sets if view can be resized automatically. + * + * @param o View. + * @param resizable @c EINA_TRUE if we want to resize automatically; + * @c EINA_FALSE otherwise. It defaults to @c EINA_TRUE + * + * @return EINA_TRUE if auto_resize_window status set, EINA_FALSE + * otherwise (errors). + */ +Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object* o, Eina_Bool resizable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + priv->settings.enable_auto_resize_window = resizable; + return EINA_TRUE; +} + Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object* o) { EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); @@ -2512,6 +2564,37 @@ Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* enco return EINA_TRUE; } +/** + * Sets the encoding detector. + * + * @param o view object to set if encoding detector is enabled. + * @return @c EINA_TRUE on success and @c EINA_FALSE on failure + */ +Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + enable = !!enable; + if (priv->settings.encoding_detector != enable) { + priv->page_settings->setUsesEncodingDetector(enable); + priv->settings.encoding_detector = enable; + } + return EINA_TRUE; +} + +/** + * Gets if the encoding detector is enabled. + * + * @param o view object to get if encoding detector is enabled. + * @return @c EINA_TRUE if encoding detector is enabled, @c EINA_FALSE if not or on errors. + */ +Eina_Bool ewk_view_setting_encoding_detector_get(Evas_Object* o) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE); + EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE); + return priv->settings.encoding_detector; +} + const char* ewk_view_setting_cache_directory_get(const Evas_Object* o) { EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); @@ -2730,8 +2813,8 @@ Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enab /** * Gets if the local storage is enabled. * - * @param o view object to set if local storage is enabled. - * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not. + * @param o view object to get if local storage is enabled. + * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not or on errors. */ Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o) { @@ -4053,33 +4136,21 @@ void ewk_view_download_request(Evas_Object* o, Ewk_Download* download) * @internal * Reports the viewport has changed. * - * @param o view. - * @param w width. - * @param h height. - * @param init_scale initialScale value. - * @param max_scale maximumScale value. - * @param min_scale minimumScale value. - * @param user_scalable userscalable flag. + * @param arguments viewport argument. * * Emits signal: "viewport,changed" with no parameters. */ -void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable) +void ewk_view_viewport_attributes_set(Evas_Object *o, const WebCore::ViewportArguments& arguments) { EWK_VIEW_SD_GET(o, sd); EWK_VIEW_PRIV_GET(sd, priv); - - priv->settings.viewport.w = w; - priv->settings.viewport.h = h; - priv->settings.viewport.init_scale = init_scale; - priv->settings.viewport.min_scale = min_scale; - priv->settings.viewport.max_scale = max_scale; - priv->settings.viewport.user_scalable = user_scalable; - + + priv->viewport_arguments = arguments; evas_object_smart_callback_call(o, "viewport,changed", 0); } /** - * Gets data of viewport meta tag. + * Gets attributes of viewport meta tag. * * @param o view. * @param w width. @@ -4087,25 +4158,27 @@ void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, f * @param init_scale initial Scale value. * @param max_scale maximum Scale value. * @param min_scale minimum Scale value. + * @param device_pixel_ratio value. * @param user_scalable user Scalable value. */ -void ewk_view_viewport_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* user_scalable) +void ewk_view_viewport_attributes_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* device_pixel_ratio, Eina_Bool* user_scalable) { - EWK_VIEW_SD_GET(o, sd); - EWK_VIEW_PRIV_GET(sd, priv); + WebCore::ViewportAttributes attributes = _ewk_view_viewport_attributes_compute(o); if (w) - *w = priv->settings.viewport.w; + *w = attributes.layoutSize.width(); if (h) - *h = priv->settings.viewport.h; + *h = attributes.layoutSize.height(); if (init_scale) - *init_scale = priv->settings.viewport.init_scale; + *init_scale = attributes.initialScale; if (max_scale) - *max_scale = priv->settings.viewport.max_scale; + *max_scale = attributes.maximumScale; if (min_scale) - *min_scale = priv->settings.viewport.min_scale; + *min_scale = attributes.minimumScale; + if (device_pixel_ratio) + *device_pixel_ratio = attributes.devicePixelRatio; if (user_scalable) - *user_scalable = priv->settings.viewport.user_scalable; + *user_scalable = attributes.userScalable; } /** @@ -4195,6 +4268,22 @@ Eina_Bool ewk_view_user_scalable_get(Evas_Object* o) } /** + * Gets device pixel ratio value. + * + * @param o view. + * @param user_scalable where to return the current user scalable value. + * + * @return @c EINA_TRUE if zoom is enabled, @c EINA_FALSE if not. + */ +float ewk_view_device_pixel_ratio_get(Evas_Object* o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + return priv->settings.device_pixel_ratio; +} + +/** * @internal * Reports a requeset will be loaded. It's client responsibility to decide if * request would be used. If @return is true, loader will try to load. Else, @@ -4213,3 +4302,54 @@ Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* o, Ewk_Frame_Resource return sd->api->navigation_policy_decision(sd, request); } + +/** + * @internal + * Reports that the contents have resized. The ewk_view calls contents_resize, + * which can be reimplemented as needed. + * + * @param o view. + * @param w new content width. + * @param h new content height. + */ +void ewk_view_contents_size_changed(Evas_Object *o, int w, int h) +{ + EWK_VIEW_SD_GET_OR_RETURN(o, sd); + EINA_SAFETY_ON_NULL_RETURN(sd->api); + EINA_SAFETY_ON_NULL_RETURN(sd->api->contents_resize); + + if (!sd->api->contents_resize(sd, w, h)) + ERR("failed to resize contents to %dx%d", w, h); +} + +/** + * @internal + * Gets page size from frameview. + * + * @param o view. + * + * @return page size. + */ +WebCore::FloatRect ewk_view_page_rect_get(Evas_Object *o) +{ + EWK_VIEW_SD_GET(o, sd); + EWK_VIEW_PRIV_GET(sd, priv); + + WebCore::Frame* main_frame = priv->page->mainFrame(); + return main_frame->view()->frameRect(); +} + +/** + * @internal + * Gets dpi value. + * + * @return device's dpi value. + */ +int ewk_view_dpi_get() +{ +#ifdef HAVE_ECORE_X + return ecore_x_dpi_get(); +#else + return 160; +#endif +} diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h index 26bf97c..1c4de34 100644 --- a/WebKit/efl/ewk/ewk_view.h +++ b/WebKit/efl/ewk/ewk_view.h @@ -384,6 +384,8 @@ EAPI Eina_Bool ewk_view_setting_auto_load_images_set(Evas_Object *o, Eina_Boo EAPI Eina_Bool ewk_view_setting_auto_shrink_images_get(const Evas_Object *o); EAPI Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object *o, Eina_Bool automatic); +EAPI Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object *o); +EAPI Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object *o, Eina_Bool resizable); EAPI Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object *o); EAPI Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object *o, Eina_Bool enable); @@ -455,6 +457,9 @@ EAPI Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object * EAPI Eina_Bool ewk_view_setting_page_cache_get(Evas_Object* o); EAPI Eina_Bool ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable); +EAPI Eina_Bool ewk_view_setting_encoding_detector_get(Evas_Object* o); +EAPI Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable); + /* to be used by subclass implementations */ EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o); @@ -489,12 +494,13 @@ EAPI void ewk_view_paint_context_translate(Ewk_View_Paint_Context *ctxt, float x EAPI Eina_Bool ewk_view_paint(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area); EAPI Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area); -EAPI void ewk_view_viewport_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* user_scalable); +EAPI void ewk_view_viewport_attributes_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* device_pixel_ratio , Eina_Bool* user_scalable); EAPI Eina_Bool ewk_view_zoom_range_set(Evas_Object* o, float min_scale, float max_scale); EAPI float ewk_view_zoom_range_min_get(Evas_Object* o); EAPI float ewk_view_zoom_range_max_get(Evas_Object* o); EAPI void ewk_view_user_scalable_set(Evas_Object* o, Eina_Bool user_scalable); EAPI Eina_Bool ewk_view_user_scalable_get(Evas_Object* o); +EAPI float ewk_view_device_pixel_ratio_get(Evas_Object* o); #ifdef __cplusplus } diff --git a/WebKit/efl/ewk/ewk_view_single.c b/WebKit/efl/ewk/ewk_view_single.c index 803b219..85e5339 100644 --- a/WebKit/efl/ewk/ewk_view_single.c +++ b/WebKit/efl/ewk/ewk_view_single.c @@ -348,6 +348,8 @@ static Eina_Bool _ewk_view_single_smart_scrolls_process(Ewk_View_Smart_Data *sd) for (; sr < sr_end; sr++) _ewk_view_single_scroll_process_single(sd, pixels, ow, oh, sr); + evas_object_image_data_set(sd->backing_store, pixels); + return EINA_TRUE; } |