summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/efl
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebKit/efl
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebKit/efl')
-rw-r--r--Source/WebKit/efl/ChangeLog336
-rw-r--r--Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp4
-rw-r--r--Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h2
-rw-r--r--Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp16
-rw-r--r--Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h8
-rw-r--r--Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp14
-rw-r--r--Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h3
-rw-r--r--Source/WebKit/efl/ewk/ewk_cookies.cpp51
-rw-r--r--Source/WebKit/efl/ewk/ewk_cookies.h31
-rw-r--r--Source/WebKit/efl/ewk/ewk_frame.cpp5
-rw-r--r--Source/WebKit/efl/ewk/ewk_main.cpp31
-rw-r--r--Source/WebKit/efl/ewk/ewk_settings.cpp108
-rw-r--r--Source/WebKit/efl/ewk/ewk_settings.h4
-rw-r--r--Source/WebKit/efl/ewk/ewk_view.cpp81
14 files changed, 533 insertions, 161 deletions
diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog
index 2068ccc..a781c80 100644
--- a/Source/WebKit/efl/ChangeLog
+++ b/Source/WebKit/efl/ChangeLog
@@ -1,3 +1,339 @@
+2011-03-07 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
+ https://bugs.webkit.org/show_bug.cgi?id=55827
+
+ Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
+ and pass the entire response, instead of just the MIMEType.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForResponse):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+
+2011-03-04 Grzegorz Czajkowski <g.czajkowski@samsung.com>
+
+ Reviewed by Kent Tamura.
+
+ [EFL] Doxygen documentation for ewk_settings
+ https://bugs.webkit.org/show_bug.cgi?id=55667
+
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_default_user_agent_get): only style is fixed
+ * ewk/ewk_settings.h:
+
+2011-03-03 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=55721
+ Global IconDatabase should be returned by reference, not as a pointer
+
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_icon_database_path_set):
+ (ewk_settings_icon_database_path_get):
+ (ewk_settings_icon_database_clear):
+ (ewk_settings_icon_database_icon_surface_get):
+ (ewk_settings_icon_database_icon_object_add):
+
+2011-03-03 Alexey Proskuryakov <ap@apple.com>
+
+ Removing an include of WebCoreKeyboardUIMode.h that Ive just added. It's already included
+ via ChromeClient.h
+
+ * WebCoreSupport/ChromeClientEfl.h:
+
+2011-03-02 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
+ https://bugs.webkit.org/show_bug.cgi?id=55633
+ <rdar://problem/8963023>
+
+ * WebCoreSupport/ChromeClientEfl.cpp: (WebCore::ChromeClientEfl::keyboardUIMode):
+ * WebCoreSupport/ChromeClientEfl.h:
+ Implement keyboardUIMode() instead of tabsToLinks(). No change in functionality, since
+ this platform doesn't observe or have full keyboard access state.
+
+2011-03-01 Joseph Pecoraro <joepeck@webkit.org>
+
+ Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_viewport_attributes_compute):
+
+2011-03-01 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Viewport Warning/Error Messages Are Now Inaccurate
+ https://bugs.webkit.org/show_bug.cgi?id=53707
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_viewport_attributes_compute): pass a Document into computeViewportAttributes for warnings to be reported to.
+
+2011-02-28 Chang Shu <cshu@webkit.org>
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove the support of Frame::isContentEditable and its dependencies.
+ https://bugs.webkit.org/show_bug.cgi?id=54292
+
+ Remove the WebKit side implementation.
+
+ * WebCoreSupport/EditorClientEfl.cpp:
+ * WebCoreSupport/EditorClientEfl.h:
+
+2011-02-27 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kent Tamura.
+
+ [EFL] Restore parameters of efl header files.
+ https://bugs.webkit.org/show_bug.cgi?id=55292
+
+ Restore parameters in efl header files.
+
+ * ewk/ewk_frame.h:
+ * ewk/ewk_tiled_backing_store.h:
+ * ewk/ewk_tiled_matrix.h:
+ * ewk/ewk_tiled_model.h:
+ * ewk/ewk_view.cpp:
+ (ewk_view_pre_render_relative_radius):
+ * ewk/ewk_view.h:
+ * ewk/ewk_window_features.h:
+
+2011-02-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kent Tamura.
+
+ [EFL] Replace WTF_USE_SOUP macro with USE(SOUP)
+ https://bugs.webkit.org/show_bug.cgi?id=55296
+
+ ewk_cookies.cpp and ewk_main.cpp are using WTF_USE_SOUP macro.
+ So, according to policy decision macro usage, the macro needs to
+ be changed with USE(SOUP).
+
+ * ewk/ewk_cookies.cpp:
+ (ewk_cookies_file_set):
+ (ewk_cookies_clear):
+ (ewk_cookies_get_all):
+ (ewk_cookies_cookie_del):
+ (ewk_cookies_cookie_free):
+ (ewk_cookies_policy_set):
+ (ewk_cookies_policy_get):
+ * ewk/ewk_main.cpp:
+ (_ewk_init_body):
+
+2011-02-24 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Drop the "U; " encryption level from the User Agent string.
+ https://bugs.webkit.org/show_bug.cgi?id=54566
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::composeUserAgent):
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_default_user_agent_get):
+
+2011-02-23 Patrick Gansterer <paroga@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Use AtomicString::fromUTF8 instead of String::fromUTF8 for AtomicStrings
+ https://bugs.webkit.org/show_bug.cgi?id=54992
+
+ Also remove the WTF namespace from AtomicString and String.
+
+ * ewk/ewk_view.cpp:
+
+2011-02-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Drop the language tag part from the User Agent string
+ https://bugs.webkit.org/show_bug.cgi?id=54560
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::composeUserAgent):
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_default_user_agent_get):
+
+2011-02-21 Lukasz Slachciak <l.slachciak@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Fixed missing spatial navigation setting initialization. Doxygen comments added.
+ https://bugs.webkit.org/show_bug.cgi?id=54806
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new): spatial navigation setting initialization added
+
+2011-02-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kent Tamura.
+
+ [EFL] Fix coding style errors in tiled BS and ewk_window_feature.h
+ https://bugs.webkit.org/show_bug.cgi?id=54842
+
+ Fix style errors in ewk files.
+
+ * ewk/ewk_tiled_backing_store.h:
+ * ewk/ewk_tiled_matrix.h:
+ * ewk/ewk_tiled_model.h:
+ * ewk/ewk_window_features.h:
+
+2011-02-19 Lukasz Slachciak <l.slachciak@samsung.com>
+
+ Reviewed by Andreas Kling.
+
+ [EFL] Eliminated error when .webkit directory doesn't exist.
+ https://bugs.webkit.org/show_bug.cgi?id=54813
+
+ * ewk/ewk_main.cpp:
+ (_ewk_init_body):
+
+2011-02-19 Lukasz Slachciak <l.slachciak@samsung.com>
+
+ Unreviewed build fix.
+
+ SoupSession build break fix
+ https://bugs.webkit.org/show_bug.cgi?id=54796
+
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_proxy_uri_set):
+
+2011-02-19 Lukasz Slachciak <l.slachciak@samsung.com>
+
+ Reviewed by Andreas Kling.
+
+ [EFL] Use standard WebCore::homeDirectoryPath method instead of reimplementing it
+ https://webkit.org/b/54781
+
+ * ewk/ewk_main.cpp:
+ (_ewk_init_body):
+
+2011-02-19 Charlie Reis <creis@chromium.org>
+
+ Reviewed by Mihai Parparita.
+
+ Ensure loading has stopped in HistoryController::goToItem
+ https://bugs.webkit.org/show_bug.cgi?id=54517
+
+ Add a FrameLoaderClient callback for whether to stop loading before goToItem.
+
+ Test: http/tests/navigation/forward-to-fragment-fires-onload.html
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::shouldStopLoadingForHistoryItem): Added.
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+
+2011-02-18 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kent Tamura.
+
+ [EFL] Fix coding style errors in ewk_frame.h
+ https://bugs.webkit.org/show_bug.cgi?id=54718
+
+ Fix style errors in ewk_frame.h.
+
+ * ewk/ewk_frame.h:
+
+2011-02-18 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Remove proxy feature of soup when proxy is null
+ https://bugs.webkit.org/show_bug.cgi?id=54621
+
+ When proxy value is NULL, remove proxy feature in soup.
+
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_proxy_uri_set):
+
+2011-02-18 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kent Tamura.
+
+ [EFL] Fix coding style errors in ewk_view.h
+ https://bugs.webkit.org/show_bug.cgi?id=54624
+
+ Fix style errors in ewk_view.h.
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_pre_render_relative_radius):
+ * ewk/ewk_view.h:
+
+2011-02-18 Patrick Gansterer <paroga@webkit.org>
+
+ Unreviewed build fix after r78634 and r78786.
+
+ * CMakeListsEfl.txt:
+
+2011-02-17 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Kent Tamura.
+
+ [EFL] Possible crash of ewk_frame_contents_set
+ https://bugs.webkit.org/show_bug.cgi?id=54091
+
+ Use length of contents if contents_size parameter is bigger than length
+ of contents.
+
+ * ewk/ewk_frame.cpp:
+ (_ewk_frame_contents_set_internal):
+
+2011-02-17 Grzegorz Czajkowski <g.czajkowski@samsung.com>
+
+ Reviewed by Kent Tamura.
+
+ Doxygen documentation for ewk cookies
+ https://bugs.webkit.org/show_bug.cgi?id=54553
+
+ * ewk/ewk_cookies.cpp:
+ (ewk_cookies_file_set):
+ (ewk_cookies_policy_set):
+ (ewk_cookies_policy_get):
+ * ewk/ewk_cookies.h:
+
+2011-02-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Unreviewed build fix.
+
+ [EFL] Build break on r78634
+ https://bugs.webkit.org/show_bug.cgi?id=54602
+
+ Build error because of r78634.
+
+ * CMakeListsEfl.txt:
+
+2011-01-26 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Ryosuke Niwa.
+
+ Refactoring: Extract TextCheckerClient from EditorClient
+ https://bugs.webkit.org/show_bug.cgi?id=53213
+
+ * WebCoreSupport/EditorClientEfl.h:
+ (WebCore::EditorClientEfl::textChecker):
+
+2011-02-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Add EditorClient callbacks to override isDOMPasteAllowed and javaScriptCanAccessClipboard
+ https://bugs.webkit.org/show_bug.cgi?id=52417
+
+ Added two callback functions, canCopyCut and canPaste to EditorClient. They are currently
+ not implemented.
+
+ * WebCoreSupport/EditorClientEfl.cpp:
+ (WebCore::EditorClientEfl::canCopyCut): Added.
+ (WebCore::EditorClientEfl::canPaste): Added.
+ * WebCoreSupport/EditorClientEfl.h:
+
2011-02-08 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
diff --git a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index 6425c39..a1851c5 100644
--- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -305,9 +305,9 @@ bool ChromeClientEfl::shouldInterruptJavaScript()
return ewk_view_should_interrupt_javascript(m_view);
}
-bool ChromeClientEfl::tabsToLinks() const
+KeyboardUIMode ChromeClientEfl::keyboardUIMode()
{
- return true;
+ return KeyboardAccessTabsToLinks;
}
IntRect ChromeClientEfl::windowResizerRect() const
diff --git a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index c17fe10..09b0f4f 100644
--- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -91,7 +91,7 @@ public:
virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result);
virtual void setStatusbarText(const String&);
virtual bool shouldInterruptJavaScript();
- virtual bool tabsToLinks() const;
+ virtual WebCore::KeyboardUIMode keyboardUIMode();
virtual IntRect windowResizerRect() const;
diff --git a/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
index a9e45dd..c86c924 100644
--- a/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
@@ -145,12 +145,6 @@ void EditorClientEfl::didSetSelectionTypesForPasteboard()
notImplemented();
}
-bool EditorClientEfl::isEditable()
-{
- notImplemented();
- return false;
-}
-
void EditorClientEfl::registerCommandForUndo(WTF::PassRefPtr<EditCommand>)
{
notImplemented();
@@ -166,6 +160,16 @@ void EditorClientEfl::clearUndoRedoOperations()
notImplemented();
}
+bool EditorClientEfl::canCopyCut(bool defaultValue) const
+{
+ return defaultValue;
+}
+
+bool EditorClientEfl::canPaste(bool defaultValue) const
+{
+ return defaultValue;
+}
+
bool EditorClientEfl::canUndo() const
{
notImplemented();
diff --git a/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h b/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
index e25b1e6..575a50d 100644
--- a/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
@@ -34,6 +34,7 @@
#define EditorClientEfl_h
#include "EditorClient.h"
+#include "TextCheckerClient.h"
#include <wtf/Forward.h>
@@ -42,7 +43,7 @@ typedef struct _Evas_Object Evas_Object;
namespace WebCore {
class Page;
-class EditorClientEfl : public EditorClient {
+class EditorClientEfl : public EditorClient, public TextCheckerClient {
public:
EditorClientEfl(Evas_Object *view);
~EditorClientEfl();
@@ -60,8 +61,6 @@ public:
virtual void toggleGrammarChecking();
virtual int spellCheckerDocumentTag();
- virtual bool isEditable();
-
virtual bool shouldBeginEditing(Range*);
virtual bool shouldEndEditing(Range*);
virtual bool shouldInsertNode(Node*, Range*, EditorInsertAction);
@@ -83,6 +82,8 @@ public:
virtual void registerCommandForRedo(WTF::PassRefPtr<EditCommand>);
virtual void clearUndoRedoOperations();
+ virtual bool canCopyCut(bool defaultValue) const;
+ virtual bool canPaste(bool defaultValue) const;
virtual bool canUndo() const;
virtual bool canRedo() const;
@@ -114,6 +115,7 @@ public:
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
+ virtual TextCheckerClient* textChecker() { return this; }
private:
Evas_Object *m_view;
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
index acbab30..3ea8c2a 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
@@ -43,7 +43,6 @@
#include "FrameTree.h"
#include "FrameView.h"
#include "HTMLFormElement.h"
-#include "Language.h"
#include "MIMETypeRegistry.h"
#include "NotImplemented.h"
#include "Page.h"
@@ -118,10 +117,8 @@ static String composeUserAgent()
// Comment
ua += " (";
ua += agentPlatform(); // Platform
- ua += "; U; "; // Security
- ua += agentOS(); // OS-or-CPU
ua += "; ";
- ua += defaultLanguage(); // Localization information
+ ua += agentOS(); // OS-or-CPU
ua += ") ";
// WebKit Product
@@ -317,11 +314,11 @@ void FrameLoaderClientEfl::dispatchDidReceiveResponse(DocumentLoader*, unsigned
m_response = response;
}
-void FrameLoaderClientEfl::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const String& MIMEType, const ResourceRequest&)
+void FrameLoaderClientEfl::dispatchDecidePolicyForResponse(FramePolicyFunction function, const ResourceResponse& response, const ResourceRequest&)
{
// we need to call directly here (currently callPolicyFunction does that!)
ASSERT(function);
- if (canShowMIMEType(MIMEType))
+ if (canShowMIMEType(response.mimeType()))
callPolicyFunction(function, PolicyUse);
else
callPolicyFunction(function, PolicyDownload);
@@ -510,6 +507,11 @@ bool FrameLoaderClientEfl::shouldGoToHistoryItem(HistoryItem* item) const
return item;
}
+bool FrameLoaderClientEfl::shouldStopLoadingForHistoryItem(HistoryItem* item) const
+{
+ return true;
+}
+
void FrameLoaderClientEfl::didDisplayInsecureContent()
{
notImplemented();
diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index 14ebc1c..424c66b 100644
--- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -115,7 +115,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
- virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String& MIMEType, const ResourceRequest&);
+ virtual void dispatchDecidePolicyForResponse(FramePolicyFunction, const ResourceResponse&, const ResourceRequest&);
virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, WTF::PassRefPtr<FormState>, const String& frameName);
virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, WTF::PassRefPtr<FormState>);
virtual void cancelPolicyCheck();
@@ -164,6 +164,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual void updateGlobalHistory();
virtual void updateGlobalHistoryRedirectLinks();
virtual bool shouldGoToHistoryItem(HistoryItem*) const;
+ virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const;
virtual void didDisplayInsecureContent();
virtual void didRunInsecureContent(SecurityOrigin*, const KURL&);
diff --git a/Source/WebKit/efl/ewk/ewk_cookies.cpp b/Source/WebKit/efl/ewk/ewk_cookies.cpp
index 2564fc7..7558154 100644
--- a/Source/WebKit/efl/ewk/ewk_cookies.cpp
+++ b/Source/WebKit/efl/ewk/ewk_cookies.cpp
@@ -21,7 +21,7 @@
#include "config.h"
#include "ewk_cookies.h"
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
#include "CookieJarSoup.h"
#endif
#include "EWebKit.h"
@@ -29,7 +29,7 @@
#include <Eina.h>
#include <eina_safety_checks.h>
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
#include <glib.h>
#include <libsoup/soup.h>
#endif
@@ -37,17 +37,17 @@
/**
- * Set the path where the cookies are going to be stored. Use NULL for keep
+ * Sets the path where the cookies are going to be stored. Use @c NULL for keep
* them just in memory.
*
* @param filename path to the cookies.txt file.
*
- * @returns EINA_FALSE if it wasn't possible to create the cookie jar,
- * EINA_FALSE otherwise.
+ * @return @c EINA_FALSE if it wasn't possible to create the cookie jar,
+ * @c EINA_FALSE otherwise.
*/
EAPI Eina_Bool ewk_cookies_file_set(const char *filename)
{
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
SoupCookieJar* cookieJar = 0;
if (filename)
cookieJar = soup_cookie_jar_text_new(filename, FALSE);
@@ -74,11 +74,11 @@ EAPI Eina_Bool ewk_cookies_file_set(const char *filename)
}
/**
- * Clear all the cookies from the cookie jar.
+ * Clears all the cookies from the cookie jar.
*/
EAPI void ewk_cookies_clear()
{
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
GSList* l;
GSList* p;
SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
@@ -94,12 +94,12 @@ EAPI void ewk_cookies_clear()
/**
* Returns a list of cookies in the cookie jar.
*
- * @returns an Eina_List with all the cookies in the cookie jar.
+ * @return an @c Eina_List with all the cookies in the cookie jar.
*/
EAPI Eina_List* ewk_cookies_get_all(void)
{
Eina_List* el = 0;
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
GSList* l;
GSList* p;
SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
@@ -123,17 +123,17 @@ EAPI Eina_List* ewk_cookies_get_all(void)
return el;
}
-/*
+/**
* Deletes a cookie from the cookie jar.
*
* Note that the fields name, value, domain and path are used to match this
* cookie in the cookie jar.
*
- * @param cookie an Ewk_Cookie that has the info relative to that cookie.
+ * @param cookie an @c Ewk_Cookie that has the info relative to that cookie.
*/
EAPI void ewk_cookies_cookie_del(Ewk_Cookie *cookie)
{
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
EINA_SAFETY_ON_NULL_RETURN(cookie);
GSList* l;
GSList* p;
@@ -155,14 +155,14 @@ EAPI void ewk_cookies_cookie_del(Ewk_Cookie *cookie)
#endif
}
-/*
- * Free the memory used by a cookie.
+/**
+ * Frees the memory used by a cookie.
*
* @param cookie the Ewk_Cookie struct that will be freed.
*/
EAPI void ewk_cookies_cookie_free(Ewk_Cookie *cookie)
{
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
EINA_SAFETY_ON_NULL_RETURN(cookie);
free(cookie->name);
free(cookie->value);
@@ -172,19 +172,15 @@ EAPI void ewk_cookies_cookie_free(Ewk_Cookie *cookie)
#endif
}
-/*
- * Set the cookies accept policy.
- *
- * Possible values are: EWK_COOKIE_JAR_ACCEPT_ALWAYS, which accepts every
- * cookie sent from any page; EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY, which
- * accepts cookies only from the main page; and EWK_COOKIE_JAR_ACCEPT_NEVER,
- * which rejects all cookies.
+/**
+ * Sets the cookies accept policy.
*
* @param p the acceptance policy
+ * @see Ewk_Cookie_Policy
*/
EAPI void ewk_cookies_policy_set(Ewk_Cookie_Policy p)
{
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
SoupCookieJarAcceptPolicy policy;
@@ -205,15 +201,16 @@ EAPI void ewk_cookies_policy_set(Ewk_Cookie_Policy p)
#endif
}
-/*
+/**
* Gets the acceptance policy used in the current cookie jar.
*
- * @returns the current acceptance policy
+ * @return the current acceptance policy
+ * @see Ewk_Cookie_Policy
*/
EAPI Ewk_Cookie_Policy ewk_cookies_policy_get()
{
Ewk_Cookie_Policy ewk_policy = EWK_COOKIE_JAR_ACCEPT_ALWAYS;
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
SoupCookieJarAcceptPolicy policy;
diff --git a/Source/WebKit/efl/ewk/ewk_cookies.h b/Source/WebKit/efl/ewk/ewk_cookies.h
index 6ba3c9a..19eac0f 100644
--- a/Source/WebKit/efl/ewk/ewk_cookies.h
+++ b/Source/WebKit/efl/ewk/ewk_cookies.h
@@ -18,6 +18,11 @@
Boston, MA 02110-1301, USA.
*/
+/**
+ * @file ewk_cookies.h
+ * @brief The Ewk cookies API.
+ */
+
#ifndef ewk_cookies_h
#define ewk_cookies_h
@@ -28,24 +33,44 @@
extern "C" {
#endif
+/**
+ * \struct _Ewk_Cookie
+ *
+ * @brief Describes properties of an HTTP cookie.
+ */
struct _Ewk_Cookie {
+ /// the cookie name
char *name;
+ /// the cookie value
char *value;
+ /// the "domain" attribute, or else the hostname that the cookie came from
char *domain;
+ /// the "path" attribute, or @c 0
char *path;
+ /// the cookie expiration time, or @c 0 for a session cookie
time_t expires;
+ /// @c EINA_TRUE if the cookie should only be tranferred over SSL
Eina_Bool secure;
- Eina_Bool http_only;
+ /// @c EINA_TRUE if the cookie should not be exposed to scripts
+ Eina_Bool http_only;
};
-
+/// Creates a type name for the _Ewk_Cookie.
typedef struct _Ewk_Cookie Ewk_Cookie;
+/**
+ * \enum _Ewk_Cookie_Policy
+ *
+ * @brief Contains a policy for the cookies.
+ */
enum _Ewk_Cookie_Policy {
+ /// Rejects all cookies.
EWK_COOKIE_JAR_ACCEPT_NEVER,
+ /// Accepts every cookie sent from any page.
EWK_COOKIE_JAR_ACCEPT_ALWAYS,
+ /// Accepts cookies only from the main page.
EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY
};
-
+/// Creates a type name for the _Ewk_Cookie_Policy.
typedef enum _Ewk_Cookie_Policy Ewk_Cookie_Policy;
/************************** Exported functions ***********************/
diff --git a/Source/WebKit/efl/ewk/ewk_frame.cpp b/Source/WebKit/efl/ewk/ewk_frame.cpp
index 1a159c5..0e2f903 100644
--- a/Source/WebKit/efl/ewk/ewk_frame.cpp
+++ b/Source/WebKit/efl/ewk/ewk_frame.cpp
@@ -510,8 +510,9 @@ Eina_Bool ewk_frame_contents_size_get(const Evas_Object* o, Evas_Coord* w, Evas_
static Eina_Bool _ewk_frame_contents_set_internal(Ewk_Frame_Smart_Data *sd, const char* contents, size_t contents_size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri)
{
- if (contents_size < 1)
- contents_size = strlen(contents);
+ size_t len = strlen(contents);
+ if (contents_size < 1 || contents_size > len)
+ contents_size = len;
if (!mime_type)
mime_type = "text/html";
if (!encoding)
diff --git a/Source/WebKit/efl/ewk/ewk_main.cpp b/Source/WebKit/efl/ewk/ewk_main.cpp
index 26dec81..c1c8e02 100644
--- a/Source/WebKit/efl/ewk/ewk_main.cpp
+++ b/Source/WebKit/efl/ewk/ewk_main.cpp
@@ -1,6 +1,6 @@
/*
Copyright (C) 2009-2010 ProFUSION embedded systems
- Copyright (C) 2009-2010 Samsung Electronics
+ Copyright (C) 2009-2011 Samsung Electronics
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -21,15 +21,15 @@
#include "config.h"
#include "ewk_main.h"
-#include "appcache/ApplicationCacheStorage.h"
#include "EWebKit.h"
+#include "FileSystem.h"
#include "Logging.h"
#include "PageCache.h"
#include "PageGroup.h"
+#include "appcache/ApplicationCacheStorage.h"
#include "ewk_private.h"
#include "ewk_settings.h"
#include "runtime/InitializeThreading.h"
-#include "wtf/Threading.h"
#include <Ecore.h>
#include <Ecore_Evas.h>
@@ -38,6 +38,7 @@
#include <Evas.h>
#include <stdlib.h>
#include <sys/stat.h>
+#include <wtf/Threading.h>
#if ENABLE(GLIB_SUPPORT)
#include <glib-object.h>
@@ -49,7 +50,7 @@
#endif
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
// REMOVE-ME: see todo below
#include "ResourceHandle.h"
#include <libsoup/soup.h>
@@ -159,28 +160,26 @@ Eina_Bool _ewk_init_body(void)
WebCore::pageCache()->setCapacity(3);
WebCore::PageGroup::setShouldTrackVisitedLinks(true);
- // set default location of web database path and appcache dir
- const char* home = getenv("HOME");
- if (!home) // don't forget about the homeless
- home = "/tmp"; // this directory must always exist
-
- // anyway, check it first
+ String home = WebCore::homeDirectoryPath();
struct stat state;
- if (stat(home, &state) == -1) {
+ // check home directory first
+ if (stat(home.utf8().data(), &state) == -1) {
// Exit now - otherwise you may have some crash later
int errnowas = errno;
CRITICAL("Can't access HOME dir (or /tmp) - no place to save databases: %s", strerror(errnowas));
return EINA_FALSE;
}
- 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());
+ WTF::String wkdir = home + "/.webkit";
+ if (WebCore::makeAllDirectories(wkdir)) {
+ ewk_settings_web_database_path_set(wkdir.utf8().data());
+ ewk_settings_icon_database_path_set(wkdir.utf8().data());
- WebCore::cacheStorage().setCacheDirectory(wkdir);
+ WebCore::cacheStorage().setCacheDirectory(wkdir);
+ }
// TODO: this should move to WebCore, already reported to webkit-gtk folks:
-#ifdef WTF_USE_SOUP
+#if USE(SOUP)
if (1) {
SoupSession* session = WebCore::ResourceHandle::defaultSession();
soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_SNIFFER);
diff --git a/Source/WebKit/efl/ewk/ewk_settings.cpp b/Source/WebKit/efl/ewk/ewk_settings.cpp
index 54e6645..69934c0 100644
--- a/Source/WebKit/efl/ewk/ewk_settings.cpp
+++ b/Source/WebKit/efl/ewk/ewk_settings.cpp
@@ -29,7 +29,6 @@
#include "Image.h"
#include "IntSize.h"
#include "KURL.h"
-#include "Language.h"
#include "ewk_private.h"
#include <Eina.h>
@@ -81,7 +80,7 @@ static WTF::String _ewk_settings_webkit_os_version_get()
* this value is 1MB.
*
* @return the current default database quota in bytes
- **/
+ */
uint64_t ewk_settings_web_database_default_quota_get()
{
return _ewk_default_web_database_quota;
@@ -91,8 +90,7 @@ uint64_t ewk_settings_web_database_default_quota_get()
* Sets the current path to the directory WebKit will write Web
* Database databases.
*
- * @path: the new database directory path
- *
+ * @param path the new database directory path
*/
void ewk_settings_web_database_path_set(const char *path)
{
@@ -108,13 +106,13 @@ void ewk_settings_web_database_path_set(const char *path)
}
/**
- * Return directory path where web database is stored.
+ * Returns directory path where web database is stored.
*
- * @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().
+ * 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().
+ *
+ * @return database path or @c 0 if none or web database is not supported
*/
const char *ewk_settings_web_database_path_get()
{
@@ -126,16 +124,16 @@ const char *ewk_settings_web_database_path_get()
}
/**
- * Sets directory where to store icon database, opening database.
+ * Sets directory where to store icon database, opening or closing database.
*
* @param directory where to store icon database, must be
- * write-able. If @c NULL is given, then database is closed.
+ * write-able, if @c 0 is given, then database is closed
*
- * @return @c EINA_TRUE on success, @c EINA_FALSE on errors.
+ * @return @c EINA_TRUE on success, @c EINA_FALSE on errors
*/
Eina_Bool ewk_settings_icon_database_path_set(const char *directory)
{
- WebCore::iconDatabase()->delayDatabaseCleanup();
+ WebCore::iconDatabase().delayDatabaseCleanup();
if (directory) {
struct stat st;
@@ -156,15 +154,15 @@ Eina_Bool ewk_settings_icon_database_path_set(const char *directory)
return EINA_FALSE;
}
- WebCore::iconDatabase()->setEnabled(true);
- WebCore::iconDatabase()->open(WTF::String::fromUTF8(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();
+ WebCore::iconDatabase().setEnabled(false);
+ WebCore::iconDatabase().close();
if (_ewk_icon_database_path) {
eina_stringshare_del(_ewk_icon_database_path);
_ewk_icon_database_path = 0;
@@ -174,26 +172,26 @@ Eina_Bool ewk_settings_icon_database_path_set(const char *directory)
}
/**
- * Return directory path where icon database is stored.
+ * Returns directory path where icon database is stored.
+ *
+ * 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().
*
- * @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().
+ * @return database path or @c 0 if none is set or database is closed
*/
const char* ewk_settings_icon_database_path_get(void)
{
- if (!WebCore::iconDatabase()->isEnabled())
+ if (!WebCore::iconDatabase().isEnabled())
return 0;
- if (!WebCore::iconDatabase()->isOpen())
+ if (!WebCore::iconDatabase().isOpen())
return 0;
return _ewk_icon_database_path;
}
/**
- * Remove all known icons from database.
+ * Removes all known icons from database.
*
* Database must be opened with ewk_settings_icon_database_path_set()
* in order to work.
@@ -203,31 +201,31 @@ const char* ewk_settings_icon_database_path_get(void)
*/
Eina_Bool ewk_settings_icon_database_clear(void)
{
- if (!WebCore::iconDatabase()->isEnabled())
+ if (!WebCore::iconDatabase().isEnabled())
return EINA_FALSE;
- if (!WebCore::iconDatabase()->isOpen())
+ if (!WebCore::iconDatabase().isOpen())
return EINA_FALSE;
- WebCore::iconDatabase()->removeAllIcons();
+ WebCore::iconDatabase().removeAllIcons();
return EINA_TRUE;
}
/**
- * Query icon for given URL, returning associated cairo surface.
+ * Queries icon for given URL, returning associated cairo surface.
*
- * @note in order to have this working, one must open icon database
+ * @note In order to have this working, one must open icon database
* with ewk_settings_icon_database_path_set().
*
- * @param url which url to query icon.
+ * @param url which url to query icon
*
- * @return cairo surface if any, or NULL on failure.
+ * @return cairo surface if any, or @c 0 on failure
*/
cairo_surface_t* ewk_settings_icon_database_icon_surface_get(const char *url)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
- WebCore::Image *icon = WebCore::iconDatabase()->iconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
+ WebCore::Image *icon = WebCore::iconDatabase().iconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
if (!icon) {
ERR("no icon for url %s", url);
@@ -238,19 +236,19 @@ cairo_surface_t* ewk_settings_icon_database_icon_surface_get(const char *url)
}
/**
- * Create Evas_Object of type image representing the given URL.
+ * Creates Evas_Object of type image representing the given URL.
*
* This is an utility function that creates an Evas_Object of type
* image set to have fill always match object size
* (evas_object_image_filled_add()), saving some code to use it from Evas.
*
- * @note in order to have this working, one must open icon database
+ * @note In order to have this working, one must open icon database
* with ewk_settings_icon_database_path_set().
*
- * @param url which url to query icon.
- * @param canvas evas instance where to add resulting object.
+ * @param url which url to query icon
+ * @param canvas evas instance where to add resulting object
*
- * @return newly allocated Evas_Object instance or @c NULL on
+ * @return newly allocated Evas_Object instance or @c 0 on
* errors. Delete the object with evas_object_del().
*/
Evas_Object* ewk_settings_icon_database_icon_object_add(const char* url, Evas* canvas)
@@ -259,7 +257,7 @@ Evas_Object* ewk_settings_icon_database_icon_object_add(const char* url, Evas* c
EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
- WebCore::Image* icon = WebCore::iconDatabase()->iconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
+ WebCore::Image* icon = WebCore::iconDatabase().iconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
cairo_surface_t* surface;
if (!icon) {
@@ -274,15 +272,22 @@ Evas_Object* ewk_settings_icon_database_icon_object_add(const char* url, Evas* c
/**
* Sets the given proxy URI to network backend.
*
- * @param proxy URI.
+ * @param proxy URI to set
*/
void ewk_settings_proxy_uri_set(const char* proxy)
{
#if USE(SOUP)
+ SoupSession* session = WebCore::ResourceHandle::defaultSession();
+
+ if (!proxy) {
+ ERR("no proxy uri. remove proxy feature in soup.");
+ soup_session_remove_feature_by_type(session, SOUP_TYPE_PROXY_RESOLVER);
+ return;
+ }
+
SoupURI* uri = soup_uri_new(proxy);
EINA_SAFETY_ON_NULL_RETURN(uri);
- SoupSession* session = WebCore::ResourceHandle::defaultSession();
g_object_set(session, SOUP_SESSION_PROXY_URI, uri, NULL);
soup_uri_free(uri);
#elif USE(CURL)
@@ -293,7 +298,7 @@ void ewk_settings_proxy_uri_set(const char* proxy)
/**
* Gets the proxy URI from the network backend.
*
- * @return current proxy URI or @c 0 if it's not set.
+ * @return current proxy URI or @c 0 if it's not set
*/
const char* ewk_settings_proxy_uri_get()
{
@@ -315,15 +320,16 @@ const char* ewk_settings_proxy_uri_get()
}
/**
-* @internal
-* Gets the default user agent string.
-*
-* @return A pointer to an eina_stringshare containing the user agent string.
-*/
+ * @internal
+ *
+ * Gets the default user agent string.
+ *
+ * @return a pointer to an eina_stringshare containing the user agent string
+ */
const char* ewk_settings_default_user_agent_get()
{
WTF::String ua_version = makeString(String::number(WEBKIT_USER_AGENT_MAJOR_VERSION), '.', String::number(WEBKIT_USER_AGENT_MINOR_VERSION), '+');
- WTF::String static_ua = makeString("Mozilla/5.0 (", _ewk_settings_webkit_platform_get(), "; U; ", _ewk_settings_webkit_os_version_get(), "; ", WebCore::defaultLanguage(), ") AppleWebKit/", ua_version) + makeString(" (KHTML, like Gecko) Version/5.0 Safari/", ua_version);
+ WTF::String static_ua = makeString("Mozilla/5.0 (", _ewk_settings_webkit_platform_get(), "; ", _ewk_settings_webkit_os_version_get(), ") AppleWebKit/", ua_version) + makeString(" (KHTML, like Gecko) Version/5.0 Safari/", ua_version);
return eina_stringshare_add(static_ua.utf8().data());
-}
+}
diff --git a/Source/WebKit/efl/ewk/ewk_settings.h b/Source/WebKit/efl/ewk/ewk_settings.h
index d1e12c0..0a495da 100644
--- a/Source/WebKit/efl/ewk/ewk_settings.h
+++ b/Source/WebKit/efl/ewk/ewk_settings.h
@@ -32,9 +32,9 @@ extern "C" {
#endif
/**
- * @file
+ * @file ewk_settings.h
*
- * General purpose settings, not tied to any view object.
+ * @brief General purpose settings, not tied to any view object.
*/
EAPI uint64_t ewk_settings_web_database_default_quota_get();
diff --git a/Source/WebKit/efl/ewk/ewk_view.cpp b/Source/WebKit/efl/ewk/ewk_view.cpp
index ce09f64..ab0629a 100644
--- a/Source/WebKit/efl/ewk/ewk_view.cpp
+++ b/Source/WebKit/efl/ewk/ewk_view.cpp
@@ -1,6 +1,6 @@
/*
Copyright (C) 2009-2010 ProFUSION embedded systems
- Copyright (C) 2009-2010 Samsung Electronics
+ Copyright (C) 2009-2011 Samsung Electronics
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -527,7 +527,7 @@ static WTF::PassRefPtr<WebCore::Frame> _ewk_view_core_frame_new(Ewk_View_Smart_D
CRITICAL("Could not create frame loader client.");
return 0;
}
- flc->setCustomUserAgent(WTF::String::fromUTF8(priv->settings.user_agent));
+ flc->setCustomUserAgent(String::fromUTF8(priv->settings.user_agent));
return WebCore::Frame::create(priv->page, owner, flc);
}
@@ -538,7 +538,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
{
Ewk_View_Private_Data* priv =
(Ewk_View_Private_Data*)calloc(1, sizeof(Ewk_View_Private_Data));
- WTF::AtomicString s;
+ AtomicString s;
WebCore::KURL url;
if (!priv) {
@@ -618,6 +618,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->settings.resizable_textareas = priv->page_settings->textAreasAreResizable();
priv->settings.private_browsing = priv->page_settings->privateBrowsingEnabled();
priv->settings.caret_browsing = priv->page_settings->caretBrowsingEnabled();
+ priv->settings.spatial_navigation = priv->page_settings->isSpatialNavigationEnabled();
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();
@@ -1436,7 +1437,7 @@ Eina_Bool ewk_view_text_search(const Evas_Object* o, const char* string, Eina_Bo
else
direction = WebCore::FindDirectionBackward;
- return priv->page->findString(WTF::String::fromUTF8(string), sensitive, direction, wrap);
+ return priv->page->findString(String::fromUTF8(string), sensitive, direction, wrap);
}
/**
@@ -1462,7 +1463,7 @@ unsigned int ewk_view_text_matches_mark(Evas_Object* o, const char* string, Eina
else
sensitive = WTF::TextCaseInsensitive;
- return priv->page->markAllMatchesForText(WTF::String::fromUTF8(string), sensitive, highlight, limit);
+ return priv->page->markAllMatchesForText(String::fromUTF8(string), sensitive, highlight, limit);
}
/**
@@ -1532,7 +1533,7 @@ char* ewk_view_selection_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
- WTF::CString s = priv->page->focusController()->focusedOrMainFrame()->editor()->selectedText().utf8();
+ CString s = priv->page->focusController()->focusedOrMainFrame()->editor()->selectedText().utf8();
if (s.isNull())
return 0;
return strdup(s.data());
@@ -1540,7 +1541,7 @@ char* ewk_view_selection_get(const Evas_Object* o)
static Eina_Bool _ewk_view_editor_command(Ewk_View_Private_Data* priv, const char* command)
{
- return priv->page->focusController()->focusedOrMainFrame()->editor()->command(WTF::String::fromUTF8(command)).execute();
+ return priv->page->focusController()->focusedOrMainFrame()->editor()->command(String::fromUTF8(command)).execute();
}
/**
@@ -2367,7 +2368,7 @@ Eina_Bool ewk_view_setting_user_agent_set(Evas_Object* o, const char* user_agent
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
if (eina_stringshare_replace(&priv->settings.user_agent, user_agent)) {
WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->main_frame->loader()->client());
- client->setCustomUserAgent(WTF::String::fromUTF8(user_agent));
+ client->setCustomUserAgent(String::fromUTF8(user_agent));
}
return EINA_TRUE;
}
@@ -2384,7 +2385,7 @@ Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object* o, const char* uri)
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
if (eina_stringshare_replace(&priv->settings.user_stylesheet, uri)) {
- WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(uri));
+ WebCore::KURL kurl(WebCore::KURL(), String::fromUTF8(uri));
priv->page_settings->setUserStyleSheetLocation(kurl);
}
return EINA_TRUE;
@@ -2645,7 +2646,7 @@ const char* ewk_view_setting_encoding_custom_get(const Evas_Object* o)
Evas_Object* main_frame = ewk_view_frame_main_get(o);
WebCore::Frame* core_frame = ewk_frame_core_get(main_frame);
- WTF::String overrideEncoding = core_frame->loader()->documentLoader()->overrideEncoding();
+ String overrideEncoding = core_frame->loader()->documentLoader()->overrideEncoding();
if (overrideEncoding.isEmpty())
return 0;
@@ -2670,7 +2671,7 @@ Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object* o, const char *encod
WebCore::Frame* core_frame = ewk_frame_core_get(main_frame);
DBG("%s", encoding);
eina_stringshare_replace(&priv->settings.encoding_custom, encoding);
- core_frame->loader()->reloadWithOverrideEncoding(WTF::String::fromUTF8(encoding));
+ core_frame->loader()->reloadWithOverrideEncoding(String::fromUTF8(encoding));
return EINA_TRUE;
}
@@ -2687,7 +2688,7 @@ Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* enco
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
if (eina_stringshare_replace(&priv->settings.encoding_default, encoding))
- priv->page_settings->setDefaultTextEncodingName(WTF::String::fromUTF8(encoding));
+ priv->page_settings->setDefaultTextEncodingName(String::fromUTF8(encoding));
return EINA_TRUE;
}
@@ -2734,7 +2735,7 @@ Eina_Bool ewk_view_setting_cache_directory_set(Evas_Object* o, const char* path)
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
if (eina_stringshare_replace(&priv->settings.cache_directory, path))
- WebCore::cacheStorage().setCacheDirectory(WTF::String::fromUTF8(path));
+ WebCore::cacheStorage().setCacheDirectory(String::fromUTF8(path));
return EINA_TRUE;
}
@@ -2821,10 +2822,8 @@ Eina_Bool ewk_view_setting_font_standard_set(Evas_Object* o, const char* family)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
- if (eina_stringshare_replace(&priv->settings.font_standard, family)) {
- WTF::AtomicString s = WTF::String::fromUTF8(family);
- priv->page_settings->setStandardFontFamily(s);
- }
+ if (eina_stringshare_replace(&priv->settings.font_standard, family))
+ priv->page_settings->setStandardFontFamily(AtomicString::fromUTF8(family));
return EINA_TRUE;
}
@@ -2839,10 +2838,8 @@ Eina_Bool ewk_view_setting_font_cursive_set(Evas_Object* o, const char* family)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
- if (eina_stringshare_replace(&priv->settings.font_cursive, family)) {
- WTF::AtomicString s = WTF::String::fromUTF8(family);
- priv->page_settings->setCursiveFontFamily(s);
- }
+ if (eina_stringshare_replace(&priv->settings.font_cursive, family))
+ priv->page_settings->setCursiveFontFamily(AtomicString::fromUTF8(family));
return EINA_TRUE;
}
@@ -2857,10 +2854,8 @@ Eina_Bool ewk_view_setting_font_fantasy_set(Evas_Object* o, const char* family)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
- if (eina_stringshare_replace(&priv->settings.font_fantasy, family)) {
- WTF::AtomicString s = WTF::String::fromUTF8(family);
- priv->page_settings->setFantasyFontFamily(s);
- }
+ if (eina_stringshare_replace(&priv->settings.font_fantasy, family))
+ priv->page_settings->setFantasyFontFamily(AtomicString::fromUTF8(family));
return EINA_TRUE;
}
@@ -2875,10 +2870,8 @@ Eina_Bool ewk_view_setting_font_monospace_set(Evas_Object* o, const char* family
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
- if (eina_stringshare_replace(&priv->settings.font_monospace, family)) {
- WTF::AtomicString s = WTF::String::fromUTF8(family);
- priv->page_settings->setFixedFontFamily(s);
- }
+ if (eina_stringshare_replace(&priv->settings.font_monospace, family))
+ priv->page_settings->setFixedFontFamily(AtomicString::fromUTF8(family));
return EINA_TRUE;
}
@@ -2893,10 +2886,8 @@ Eina_Bool ewk_view_setting_font_serif_set(Evas_Object* o, const char* family)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
- if (eina_stringshare_replace(&priv->settings.font_serif, family)) {
- WTF::AtomicString s = WTF::String::fromUTF8(family);
- priv->page_settings->setSerifFontFamily(s);
- }
+ if (eina_stringshare_replace(&priv->settings.font_serif, family))
+ priv->page_settings->setSerifFontFamily(AtomicString::fromUTF8(family));
return EINA_TRUE;
}
@@ -2911,13 +2902,17 @@ Eina_Bool ewk_view_setting_font_sans_serif_set(Evas_Object* o, const char* famil
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
- if (eina_stringshare_replace(&priv->settings.font_sans_serif, family)) {
- WTF::AtomicString s = WTF::String::fromUTF8(family);
- priv->page_settings->setSansSerifFontFamily(s);
- }
+ if (eina_stringshare_replace(&priv->settings.font_sans_serif, family))
+ priv->page_settings->setSansSerifFontFamily(AtomicString::fromUTF8(family));
return EINA_TRUE;
}
+/**
+ * Gets if the spatial naviagtion is enabled.
+ *
+ * @param o view object to get spatial navigation setting.
+ * @return @c EINA_TRUE if spatial navigation is enabled, @c EINA_FALSE if not or on errors.
+ */
Eina_Bool ewk_view_setting_spatial_navigation_get(Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
@@ -2925,6 +2920,12 @@ Eina_Bool ewk_view_setting_spatial_navigation_get(Evas_Object* o)
return priv->settings.spatial_navigation;
}
+/**
+ * Sets the spatial navigation.
+ *
+ * @param o view object to set spatial navigation setting.
+ * @return @c EINA_TRUE on success and @c EINA_FALSE on failure
+ */
Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enable)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
@@ -3022,10 +3023,8 @@ Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object* o, const
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
- if (eina_stringshare_replace(&priv->settings.local_storage_database_path, path)) {
- WTF::AtomicString s = WTF::String::fromUTF8(path);
- priv->page_settings->setLocalStorageDatabasePath(s);
- }
+ if (eina_stringshare_replace(&priv->settings.local_storage_database_path, path))
+ priv->page_settings->setLocalStorageDatabasePath(String::fromUTF8(path));
return EINA_TRUE;
}