summaryrefslogtreecommitdiffstats
path: root/WebKit/efl
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/efl')
-rw-r--r--WebKit/efl/CMakeListsEfl.txt2
-rw-r--r--WebKit/efl/ChangeLog137
-rw-r--r--WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp63
-rw-r--r--WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h2
-rw-r--r--WebKit/efl/ewk/ewk_frame.cpp39
-rw-r--r--WebKit/efl/ewk/ewk_view.cpp43
-rw-r--r--WebKit/efl/ewk/ewk_view.h3
7 files changed, 222 insertions, 67 deletions
diff --git a/WebKit/efl/CMakeListsEfl.txt b/WebKit/efl/CMakeListsEfl.txt
index 2ea5ee5..8b77260 100644
--- a/WebKit/efl/CMakeListsEfl.txt
+++ b/WebKit/efl/CMakeListsEfl.txt
@@ -16,7 +16,7 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
${EDJE_INCLUDE_DIRS}
${EFLDEPS_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
- ${LIBXML2_INCLUDE_DIRS}
+ ${LIBXML2_INCLUDE_DIR}
${LIBXSLT_INCLUDE_DIRS}
${SQLITE_INCLUDE_DIRS}
)
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index e805d2c..879a1af 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,140 @@
+2010-09-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
+ https://bugs.webkit.org/show_bug.cgi?id=42863
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_zoom_get):
+ (ewk_frame_zoom_set):
+ (ewk_frame_zoom_text_only_set):
+ Call functions on Frame instead of FrameView.
+
+2010-09-16 Darin Adler <darin@apple.com>
+
+ Fix build.
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_input_method_state_set): Updated for change
+ in name of isUrlField to isURLField.
+
+2010-09-14 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] ewk_frame_view_create_for_view set null as theme.
+ https://bugs.webkit.org/show_bug.cgi?id=45741
+
+ Add theme in ewk_view to use instead of frame's theme which is null in
+ ewk_frame_view_create_for_view.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_view_create_for_view):
+ * ewk/ewk_view.cpp:
+ (ewk_view_theme_set):
+ (ewk_view_theme_get):
+
+2010-09-14 Leandro Pereira <leandro@profusion.mobi>
+
+ [EFL] Unreviewed build fix: remove "virtual" keyword from
+ implementation file.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::canShowMIMETypeAsHTML):
+
+2010-09-13 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Unreviewed build fix.
+
+ [EFL] Fix build break when enabling HTML5 video support
+ https://bugs.webkit.org/show_bug.cgi?id=45674
+
+ The correct include variable for LibXml2 in cmake is
+ LIBXML2_INCLUDE_DIR instead of LIBXML2_INCLUDE_DIRS.
+
+ * CMakeListsEfl.txt:
+
+2010-09-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Add setting API for enabling page cache
+ https://bugs.webkit.org/show_bug.cgi?id=44931
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new):
+ (ewk_view_setting_page_cache_get): Added.
+ (ewk_view_setting_page_cache_set): Added.
+ * ewk/ewk_view.h:
+
+2010-09-13 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Paste should be implemented in WebCore like Copy and Cut for Mac also.
+ https://bugs.webkit.org/show_bug.cgi?id=45494
+ <rdar://problem/7660537>
+
+ On the Mac platform, the implementation of the paste operation is all done
+ at the WebKit level. In order to support it on WebKit2 it is necessary to
+ refactor the code and move this functionality at the level of WebCore like
+ we already have on Windows.
+ The original code relies on some in AppKit functions that call back into
+ WebKit causing problems in WebKit2. All this functionality has been moved
+ at the level of the editor client where it can be dealt with appropriately.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::canShowMIMETypeAsHTML): Added stub.
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+
+2010-09-11 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Fix EFL build after r67274
+ https://bugs.webkit.org/show_bug.cgi?id=45584
+
+ Remove include of ZoomMode.h and change setZoomFactor and zoomFactor
+ to proper apis chaged by r67264.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_zoom_get):
+ (ewk_frame_zoom_set):
+ (ewk_frame_zoom_text_only_get):
+ (ewk_frame_zoom_text_only_set):
+
+2010-09-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ Move code from WebKit-layer to DocumentLoader
+ https://bugs.webkit.org/show_bug.cgi?id=45569
+
+ This code didn't know that setEncoding could be called multiple times
+ safely.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::FrameLoaderClientEfl):
+ (WebCore::FrameLoaderClientEfl::committedLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchDidReceiveResponse):
+ (WebCore::FrameLoaderClientEfl::finishedLoading):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFailLoading):
+ (WebCore::FrameLoaderClientEfl::setMainDocumentError):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+
+2010-09-10 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Main resource bytes shouldn't bounce through FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=45496
+
+ Now return the bytes to the DocumentLoader.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::committedLoad):
+
2010-09-08 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
index 8ec783a..056687c 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
@@ -67,7 +67,6 @@ namespace WebCore {
FrameLoaderClientEfl::FrameLoaderClientEfl(Evas_Object *view)
: m_view(view)
, m_frame(0)
- , m_firstData(false)
, m_userAgent("")
, m_customUserAgent("")
, m_pluginView(0)
@@ -182,20 +181,10 @@ void FrameLoaderClientEfl::dispatchWillSubmitForm(FramePolicyFunction function,
callPolicyFunction(function, PolicyUse);
}
-
void FrameLoaderClientEfl::committedLoad(DocumentLoader* loader, const char* data, int length)
{
- if (!m_pluginView) {
- if (!m_frame)
- return;
-
- FrameLoader* fl = loader->frameLoader();
- if (m_firstData) {
- fl->writer()->setEncoding(m_response.textEncodingName(), false);
- m_firstData = false;
- }
- fl->addData(data, length);
- }
+ if (!m_pluginView)
+ loader->commitData(data, length);
// We re-check here as the plugin can have been created
if (m_pluginView) {
@@ -325,7 +314,6 @@ void FrameLoaderClientEfl::frameLoaderDestroyed()
void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader*, unsigned long, const ResourceResponse& response)
{
m_response = response;
- m_firstData = true;
}
void FrameLoaderClientEfl::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String& MIMEType, const ResourceRequest&)
@@ -690,6 +678,12 @@ bool FrameLoaderClientEfl::canHandleRequest(const ResourceRequest&) const
return true;
}
+bool FrameLoaderClientEfl::canShowMIMETypeAsHTML(const String& MIMEType) const
+{
+ notImplemented();
+ return false;
+}
+
bool FrameLoaderClientEfl::canShowMIMEType(const String& MIMEType) const
{
if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType))
@@ -719,17 +713,11 @@ String FrameLoaderClientEfl::generatedMIMETypeForURLScheme(const String&) const
void FrameLoaderClientEfl::finishedLoading(DocumentLoader* loader)
{
- if (!m_pluginView) {
- if (m_firstData) {
- FrameLoader* fl = loader->frameLoader();
- fl->writer()->setEncoding(m_response.textEncodingName(), false);
- m_firstData = false;
- }
- } else {
- m_pluginView->didFinishLoading();
- m_pluginView = 0;
- m_hasSentResponseToPlugin = false;
- }
+ if (!m_pluginView)
+ return;
+ m_pluginView->didFinishLoading();
+ m_pluginView = 0;
+ m_hasSentResponseToPlugin = false;
}
@@ -765,15 +753,7 @@ void FrameLoaderClientEfl::dispatchDidFinishLoading(DocumentLoader*, unsigned lo
void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& err)
{
- if (!shouldFallBack(err))
- return;
-
- if (m_firstData) {
- FrameLoader* fl = loader->frameLoader();
- fl->writer()->setEncoding(m_response.textEncodingName(), false);
- m_firstData = false;
- }
-
+ notImplemented();
}
bool FrameLoaderClientEfl::dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length)
@@ -904,16 +884,11 @@ void FrameLoaderClientEfl::dispatchUnableToImplementPolicy(const ResourceError&)
void FrameLoaderClientEfl::setMainDocumentError(DocumentLoader* loader, const ResourceError& error)
{
- if (!m_pluginView) {
- if (m_firstData) {
- loader->frameLoader()->writer()->setEncoding(m_response.textEncodingName(), false);
- m_firstData = false;
- }
- } else {
- m_pluginView->didFail(error);
- m_pluginView = 0;
- m_hasSentResponseToPlugin = false;
- }
+ if (!m_pluginView)
+ return;
+ m_pluginView->didFail(error);
+ m_pluginView = 0;
+ m_hasSentResponseToPlugin = false;
}
void FrameLoaderClientEfl::startDownload(const ResourceRequest&)
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index bd105cd..68f145d 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -181,6 +181,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual bool canHandleRequest(const ResourceRequest&) const;
virtual bool canShowMIMEType(const String&) const;
+ virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const;
virtual bool representationExistsForURLScheme(const String&) const;
virtual String generatedMIMETypeForURLScheme(const String&) const;
@@ -209,7 +210,6 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
Evas_Object *m_frame;
ResourceResponse m_response;
- bool m_firstData;
String m_userAgent;
String m_customUserAgent;
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp
index 8945ee7..038e105 100644
--- a/WebKit/efl/ewk/ewk_frame.cpp
+++ b/WebKit/efl/ewk/ewk_frame.cpp
@@ -45,7 +45,6 @@
#include "SharedBuffer.h"
#include "SubstituteData.h"
#include "WindowsKeyboardCodes.h"
-#include "ZoomMode.h"
#include "ewk_private.h"
#include <Eina.h>
@@ -71,7 +70,7 @@ struct Ewk_Frame_Smart_Data {
struct {
Evas_Coord w, h;
} contents_size;
- WebCore::ZoomMode zoom_mode;
+ Eina_Bool textZoom:1;
Eina_Bool editable:1;
};
@@ -1021,10 +1020,10 @@ float ewk_frame_zoom_get(const Evas_Object* o)
{
EWK_FRAME_SD_GET_OR_RETURN(o, sd, -1.0);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, -1.0);
- WebCore::FrameView* view = sd->frame->view();
- if (!view)
- return -1;
- return view->zoomFactor();
+
+ if (sd->textZoom)
+ return sd->frame->textZoomFactor();
+ return sd->frame->pageZoomFactor();
}
/**
@@ -1041,10 +1040,10 @@ Eina_Bool ewk_frame_zoom_set(Evas_Object* o, float zoom)
{
EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
- WebCore::FrameView* view = sd->frame->view();
- if (!view)
- return EINA_FALSE;
- view->setZoomFactor(zoom, sd->zoom_mode);
+ if (sd->textZoom)
+ sd->frame->setTextZoomFactor(zoom);
+ else
+ sd->frame->setPageZoomFactor(zoom);
return EINA_TRUE;
}
@@ -1058,7 +1057,7 @@ Eina_Bool ewk_frame_zoom_set(Evas_Object* o, float zoom)
Eina_Bool ewk_frame_zoom_text_only_get(const Evas_Object* o)
{
EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
- return sd->zoom_mode == WebCore::ZoomTextOnly;
+ return sd->textZoom;
}
/**
@@ -1073,15 +1072,15 @@ Eina_Bool ewk_frame_zoom_text_only_set(Evas_Object* o, Eina_Bool setting)
{
EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
- WebCore::ZoomMode zm = setting ? WebCore::ZoomTextOnly : WebCore::ZoomPage;
- if (sd->zoom_mode == zm)
+ if (sd->textZoom == setting)
return EINA_TRUE;
- sd->zoom_mode = zm;
- WebCore::FrameView* view = sd->frame->view();
- if (!view)
- return EINA_FALSE;
- view->setZoomFactor(view->zoomFactor(), sd->zoom_mode);
+ float zoom_level = sd->textZoom ? sd->frame->textZoomFactor() : sd->frame->pageZoomFactor();
+ sd->textZoom = setting;
+ if (sd->textZoom)
+ sd->frame->setPageAndTextZoomFactors(1, zoom_level);
+ else
+ sd->frame->setPageAndTextZoomFactors(zoom_level, 1);
return EINA_TRUE;
}
@@ -1953,7 +1952,9 @@ void ewk_frame_view_create_for_view(Evas_Object* o, Evas_Object* view)
sd->frame->createView(size, bg, !a, WebCore::IntSize(), false);
if (!sd->frame->view())
return;
- sd->frame->view()->setEdjeTheme(sd->theme);
+
+ const char* theme = ewk_view_theme_get(view);
+ sd->frame->view()->setEdjeTheme(theme);
sd->frame->view()->setEvasObject(o);
}
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 254fdfd..76e4bf5 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -90,6 +90,7 @@ struct _Ewk_View_Private_Data {
const char* encoding_default;
const char* encoding_custom;
const char* cache_directory;
+ const char* theme;
int font_minimum_size;
int font_minimum_logical_size;
int font_default_size;
@@ -112,6 +113,7 @@ struct _Ewk_View_Private_Data {
Eina_Bool spatial_navigation:1;
Eina_Bool local_storage:1;
Eina_Bool offline_app_cache: 1;
+ Eina_Bool page_cache: 1;
struct {
float w;
float h;
@@ -565,6 +567,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->page_settings->setPluginsEnabled(true);
priv->page_settings->setLocalStorageEnabled(true);
priv->page_settings->setOfflineWebApplicationCacheEnabled(true);
+ priv->page_settings->setUsesPageCache(true);
url = priv->page_settings->userStyleSheetLocation();
priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data());
@@ -605,6 +608,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->settings.caret_browsing = priv->page_settings->caretBrowsingEnabled();
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();
// 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,
@@ -1110,6 +1114,9 @@ void ewk_view_fixed_layout_size_get(Evas_Object* o, Evas_Coord* w, Evas_Coord* h
void ewk_view_theme_set(Evas_Object* o, const char* path)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
+ if (!eina_stringshare_replace(&priv->settings.theme, path))
+ return;
ewk_frame_theme_set(sd->main_frame, path);
}
@@ -1125,7 +1132,8 @@ void ewk_view_theme_set(Evas_Object* o, const char* path)
const char* ewk_view_theme_get(Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
- return ewk_frame_theme_get(sd->main_frame);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
+ return priv->settings.theme;
}
/**
@@ -2746,6 +2754,37 @@ Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable)
}
/**
+ * Gets if the page cache is enabled.
+ *
+ * @param o view object to set if page cache is enabled.
+ * @return @c EINA_TRUE if page cache is enabled, @c EINA_FALSE if not.
+ */
+Eina_Bool ewk_view_setting_page_cache_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.page_cache;
+}
+
+/**
+ * Sets the page cache.
+ *
+ * @param o view object to set if page cache is enabled.
+ * @return @c EINA_TRUE on success and @c EINA_FALSE on failure
+ */
+Eina_Bool ewk_view_setting_page_cache_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.page_cache != enable) {
+ priv->page_settings->setUsesPageCache(enable);
+ priv->settings.page_cache = enable;
+ }
+ return EINA_TRUE;
+}
+
+/**
* Similar to evas_object_smart_data_get(), but does type checking.
*
* @param o view object to query internal data.
@@ -3211,7 +3250,7 @@ void ewk_view_input_method_state_set(Evas_Object* o, Eina_Bool active)
priv->imh |= inputElement->isTelephoneField() * EWK_IMH_TELEPHONE;
priv->imh |= inputElement->isNumberField() * EWK_IMH_NUMBER;
priv->imh |= inputElement->isEmailField() * EWK_IMH_EMAIL;
- priv->imh |= inputElement->isUrlField() * EWK_IMH_URL;
+ priv->imh |= inputElement->isURLField() * EWK_IMH_URL;
}
}
}
diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h
index c5d2d45..be27f68 100644
--- a/WebKit/efl/ewk/ewk_view.h
+++ b/WebKit/efl/ewk/ewk_view.h
@@ -450,6 +450,9 @@ EAPI Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_B
EAPI Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o);
EAPI Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable);
+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);
+
/* to be used by subclass implementations */
EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o);