WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
diff (text/plain), 3.11 KB, created by
KwangYong Choi
on 2013-01-13 20:29:37 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
KwangYong Choi
Created:
2013-01-13 20:29:37 PST
Size:
3.11 KB
patch
obsolete
>diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 0543617..3ae07ce 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2013-01-11 KwangYong Choi <ky0.choi@samsung.com> >+ >+ [EFL] Add support for MHTML save/load feature to MiniBrowser >+ https://bugs.webkit.org/show_bug.cgi?id=106620 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Shortcuts for saving the current page as MHTML is ctrl + 's' >+ and for loading the saved page is ctrl + 'l'. >+ >+ * MiniBrowser/efl/CMakeLists.txt: >+ * MiniBrowser/efl/main.c: >+ (page_contents_callback): >+ (on_key_down): >+ > 2013-01-13 Alan Cutter <alancutter@chromium.org> > > Make "gardeners" an alias for "sheriffs" in sherrifbot >diff --git a/Tools/MiniBrowser/efl/CMakeLists.txt b/Tools/MiniBrowser/efl/CMakeLists.txt >index 922f355..a28af2f 100644 >--- a/Tools/MiniBrowser/efl/CMakeLists.txt >+++ b/Tools/MiniBrowser/efl/CMakeLists.txt >@@ -37,6 +37,7 @@ set(MiniBrowser_LIBRARIES > ${ECORE_EVAS_LIBRARIES} > ${ECORE_FILE_LIBRARIES} > ${EDJE_LIBRARIES} >+ ${EET_LIBRARIES} > ${EINA_LIBRARIES} > ${ELEMENTARY_LIBRARIES} > ${EO_LIBRARIES} >diff --git a/Tools/MiniBrowser/efl/main.c b/Tools/MiniBrowser/efl/main.c >index 3fa5b75..13ed556 100644 >--- a/Tools/MiniBrowser/efl/main.c >+++ b/Tools/MiniBrowser/efl/main.c >@@ -21,12 +21,15 @@ > #include "url_utils.h" > #include <Ecore.h> > #include <Ecore_Evas.h> >+#include <Eet.h> > #include <Eina.h> > #include <Elementary.h> > #include <Evas.h> > > static const char DEFAULT_URL[] = "http://www.google.com/"; > static const char APP_NAME[] = "EFL MiniBrowser"; >+static const char SAVED_CONTENTS_PATH[] = "/tmp/page.mht"; >+static const char SAVED_CONTENTS_URL[] = "file:///tmp/page.mht"; > static const int TOOL_BAR_ICON_SIZE = 24; > static const int TOOL_BAR_BUTTON_SIZE = 32; > static const double TOOLTIP_DELAY_SECONDS = 1.0; >@@ -258,6 +261,18 @@ static void window_close(Browser_Window *window) > elm_exit(); > } > >+static void page_contents_callback(Ewk_Page_Contents_Type type, const char *data) >+{ >+ Eet_File *ef; >+ >+ ef = eet_open(SAVED_CONTENTS_PATH, EET_FILE_MODE_WRITE); >+ if (!ef) >+ return; >+ >+ eet_write(ef, "MHTML data", data, strlen(data), 0 /* compress */); >+ eet_close(ef); >+} >+ > static void > on_key_down(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info) > { >@@ -320,6 +335,12 @@ on_key_down(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info) > if (zoom_level_set(ewk_view, DEFAULT_ZOOM_LEVEL)) > window->current_zoom_level = DEFAULT_ZOOM_LEVEL; > info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f\n", zoomLevels[window->current_zoom_level]); >+ } else if (ctrlPressed && !strcmp(ev->key, "s")) { >+ info("Save page (Ctrl + s) was pressed. Current page will be saved to /tmp/page.mht.\n"); >+ ewk_view_page_contents_get(ewk_view, EWK_PAGE_CONTENTS_TYPE_MHTML, page_contents_callback); >+ } else if (ctrlPressed && !strcmp(ev->key, "l")) { >+ info("Load page (Ctrl + l) was pressed. Loading /tmp/page.mht.\n"); >+ ewk_view_url_set(ewk_view, SAVED_CONTENTS_URL); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 106620
: 182501 |
204782
|
204908
|
204988
|
204996
|
205003
|
205169
|
205175
|
205236
|
205238
|
205245