diff --git a/WebKit/efl/Api/EWebFrame.h b/WebKit/efl/Api/EWebFrame.h index a2e198f..6d9fbd9 100644 --- a/WebKit/efl/Api/EWebFrame.h +++ b/WebKit/efl/Api/EWebFrame.h @@ -103,7 +103,7 @@ public: WebCore::String url() const; WebCore::String originalUrl() const; - void setHtml(const WebCore::String&); + void setHtml(const WebCore::String&, const WebCore::String& url = WebCore::String("")); void scroll(int dx, int dy); diff --git a/WebKit/efl/Api/EWebKit.h b/WebKit/efl/Api/EWebKit.h index c2ee4f7..1e676d1 100644 --- a/WebKit/efl/Api/EWebKit.h +++ b/WebKit/efl/Api/EWebKit.h @@ -121,7 +121,7 @@ extern "C" { WEBKIT_EFL_EXPORT const char *ewk_webframe_object_title_get(Evas_Object *frame); WEBKIT_EFL_EXPORT const char *ewk_webframe_object_url_get(Evas_Object *frame); WEBKIT_EFL_EXPORT const char *ewk_webframe_object_original_url_get(Evas_Object *frame); - WEBKIT_EFL_EXPORT void ewk_webframe_object_html_set(Evas_Object *frame, const char *contents); + WEBKIT_EFL_EXPORT void ewk_webframe_object_html_set(Evas_Object *frame, const char *contents, const char *base_url); WEBKIT_EFL_EXPORT void ewk_webframe_object_contents_size_get(Evas_Object *frame, int *w, int *h); WEBKIT_EFL_EXPORT void ewk_webframe_object_position_get(Evas_Object *frame, int *x, int *y); WEBKIT_EFL_EXPORT void ewk_webframe_object_scrollbar_value_get(Evas_Object *frame, int *x, int *y); diff --git a/WebKit/efl/Api/ewebframe.cpp b/WebKit/efl/Api/ewebframe.cpp index b813db7..933c187 100644 --- a/WebKit/efl/Api/ewebframe.cpp +++ b/WebKit/efl/Api/ewebframe.cpp @@ -144,9 +144,9 @@ String EWebFrame::originalUrl() const return d->frame->loader()->originalRequestURL().string(); } -void EWebFrame::setHtml(const String& html) +void EWebFrame::setHtml(const String& html, const String& baseUrl) { - KURL kurl = KURL(); + KURL kurl = KURL(baseUrl); ResourceRequest request(kurl); WTF::RefPtr data = SharedBuffer::create(html.utf8().data(), html.utf8().length()); SubstituteData substituteData(data, String("text/html"), String("utf-8"), kurl); diff --git a/WebKit/efl/Api/ewebkit.cpp b/WebKit/efl/Api/ewebkit.cpp index b10c21a..b5276c0 100644 --- a/WebKit/efl/Api/ewebkit.cpp +++ b/WebKit/efl/Api/ewebkit.cpp @@ -293,10 +293,13 @@ const char* ewk_webframe_object_original_url_get(Evas_Object* obj) return 0; } -void ewk_webframe_object_html_set(Evas_Object* obj, const char *html) +void ewk_webframe_object_html_set(Evas_Object* obj, const char* html, const char* base_url) { if (EWebFrame* webframe = eobject_cast(obj)) - webframe->setHtml(String(html)); + if(!base_url) + webframe->setHtml(String(html)); + else + webframe->setHtml(String(html), String(base_url)); } void ewk_webframe_object_contents_size_get(Evas_Object* obj, int* width, int* height)