Bug 126736

Summary: [EFL][WK2] Add APIs for setting and getting the default text encoding name
Product: WebKit Reporter: Jinwoo Song <jinwoo7.song>
Component: WebKit EFLAssignee: Jinwoo Song <jinwoo7.song>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, gyuyoung.kim, lucas.de.marchi, rakuco, yhnet.jung
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

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. ***