Bug 126736 - [EFL][WK2] Add APIs for setting and getting the default text encoding name
Summary: [EFL][WK2] Add APIs for setting and getting the default text encoding name
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jinwoo Song
URL:
Keywords:
: 100225 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-09 22:22 PST by Jinwoo Song
Modified: 2014-02-07 22:41 PST (History)
7 users (show)

See Also:


Attachments
Patch (4.98 KB, patch)
2014-01-09 22:33 PST, Jinwoo Song
no flags Details | Formatted Diff | Diff
Patch (4.99 KB, patch)
2014-01-09 22:54 PST, Jinwoo Song
no flags Details | Formatted Diff | Diff
Patch (5.05 KB, patch)
2014-01-09 23:09 PST, Jinwoo Song
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jinwoo Song 2014-01-09 22:22:15 PST
Browser needs a capability to set and get the default text encoding name.
Comment 1 Jinwoo Song 2014-01-09 22:33:47 PST
Created attachment 220803 [details]
Patch
Comment 2 Ryuan Choi 2014-01-09 22:47:08 PST
Comment on attachment 220803 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220803&action=review

> Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:190
> +    settings->preferences()->setDefaultTextEncodingName(String(encoding));

Maybe String::fromUTF8 ?

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:259
> + * @param settings settings object to query default text encoding nae

name
Comment 3 Gyuyoung Kim 2014-01-09 22:48:10 PST
Comment on attachment 220803 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220803&action=review

> Source/WebKit2/UIProcess/API/efl/ewk_settings.h:259
> + * @param settings settings object to query default text encoding nae

nae -> name ?

And, you need to add "The string is guaranteed to be stringshared." comment as well.
Comment 4 Jinwoo Song 2014-01-09 22:54:14 PST
Created attachment 220804 [details]
Patch
Comment 5 Jinwoo Song 2014-01-09 23:09:48 PST
Created attachment 220806 [details]
Patch

Applied comments from Ryuan and Gyuyoung.
Comment 6 Gyuyoung Kim 2014-01-09 23:14:26 PST
Comment on attachment 220806 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220806&action=review

> Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:179
> +    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, 0);

Can't we use nullptr instead of 0 ?
Comment 7 Jinwoo Song 2014-01-09 23:28:39 PST
Comment on attachment 220806 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220806&action=review

>> Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:179
>> +    EINA_SAFETY_ON_NULL_RETURN_VAL(settings, 0);
> 
> Can't we use nullptr instead of 0 ?

We may replace 0 with nullptr including other cases in another bug.
Comment 8 WebKit Commit Bot 2014-01-09 23:56:40 PST
Comment on attachment 220806 [details]
Patch

Clearing flags on attachment: 220806

Committed r161624: <http://trac.webkit.org/changeset/161624>
Comment 9 WebKit Commit Bot 2014-01-09 23:56:42 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Ryuan Choi 2014-02-07 22:41:14 PST
*** Bug 100225 has been marked as a duplicate of this bug. ***