[Webkit-unassigned] [Bug 55455] [EFL] HTML saving feature

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 15 00:15:44 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=55455





--- Comment #4 from Grzegorz <g.czajkowski at samsung.com>  2011-04-15 00:15:44 PST ---
(In reply to comment #3)
> (In reply to comment #0)
> > Saves a html source into file given by parameter.
> > It also creates directory with resources.
> 
> This feature can be useful when user wants to see a page source. It's allowed to browse web page with offline mode.

This feature should allow to:

1) get a source of page (without any modification of WebKit's object). Similar to desktop Browsers right click on page -> show page source.

2) save a page to disk. This function should copy needed objects for instance, images collection for modifications of paths to the local paths. API delivered in current patch modifies src attribute of images, saves page source and and the end restores default values of src. I think it's not good practise.

Let me suggest API:
1)
/**
 * Gets html source of frame.
 *
 * @param o smart frame object
 * @param frame_source stores the frame source, value should be freed after use
 * @param url URL, value should be freed after use
 */
Eina_Bool ewk_frame_source_get(Evas_Object *o, char** frame_source);

2)
/**
 * @param [in] o frame smart object
 * @param [in] path a path with the file name where a content of web page is saved, the path must exist, the file doesn't have to exist
 * @param [in][out] list_src_images a table where the src values of images are stored, if you're not intrested in that list, give @c 0, otherwise a table should be freed after use
 * @param [in][out] list_size a size of list_src_images, if you're not intrested in that size, give @c 0
 * @return @c EINA_TRUE on success, @c EINA_FALSE if the file given by param already exists or other error occured 
 */
Eina_Bool ewk_frame_dump_to_file(Evas_Object* o, const char* path, char*** list_src_images, unsigned* list_size)

Wha's your opinion on that?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list