WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
100066
[WK2] Add APIs to get/set encoding detector
https://bugs.webkit.org/show_bug.cgi?id=100066
Summary
[WK2] Add APIs to get/set encoding detector
Yuni Jeong
Reported
2012-10-22 20:07:38 PDT
It is required for enabling encoding detector.
Attachments
Patch
(6.67 KB, patch)
2012-10-22 22:06 PDT
,
Yuni Jeong
no flags
Details
Formatted Diff
Diff
Patch
(6.67 KB, patch)
2012-10-30 02:13 PDT
,
Yuni Jeong
no flags
Details
Formatted Diff
Diff
Patch
(6.74 KB, patch)
2012-10-31 23:37 PDT
,
Yuni Jeong
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Yuni Jeong
Comment 1
2012-10-22 22:06:01 PDT
Created
attachment 170062
[details]
Patch
Jinwoo Song
Comment 2
2012-10-25 09:00:41 PDT
Comment on
attachment 170062
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=170062&action=review
> Source/WebKit2/ChangeLog:3 > + [EFL][WK2] Add APIs to get/set encoding detector
This patch not only adds ewk setting APIs but also adds WKPreference APIs. So it is not proper to add [EFL] prefix to the title.
> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:165 > + ASSERT_FALSE(ewk_setting_uses_encoding_detector_get(settings));
It would be better to add comments that the default setting value is 'false' to explain why ASSERT_FALSE() is used.
Kangil Han
Comment 3
2012-10-25 17:04:16 PDT
Comment on
attachment 170062
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=170062&action=review
> Source/WebKit2/UIProcess/API/C/WKPreferences.h:223 > +// Defaults to false.
IMHO, it depends on policy. So I would like to remove this comment.
>> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:165 >> + ASSERT_FALSE(ewk_setting_uses_encoding_detector_get(settings)); > > It would be better to add comments that the default setting value is 'false' to explain why ASSERT_FALSE() is used.
IMHO, it depends on policy. So I would like to remove this line of test.
Jinwoo Song
Comment 4
2012-10-25 17:33:19 PDT
Comment on
attachment 170062
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=170062&action=review
>> Source/WebKit2/UIProcess/API/C/WKPreferences.h:223 >> +// Defaults to false. > > IMHO, it depends on policy. So I would like to remove this comment.
There are default values for each setting member variables in Setting.cpp. I think its common to comment it.
>>> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_settings.cpp:165 >>> + ASSERT_FALSE(ewk_setting_uses_encoding_detector_get(settings)); >> >> It would be better to add comments that the default setting value is 'false' to explain why ASSERT_FALSE() is used. > > IMHO, it depends on policy. So I would like to remove this line of test.
Ditto.
Kangil Han
Comment 5
2012-10-25 20:11:37 PDT
Comment on
attachment 170062
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=170062&action=review
>>> Source/WebKit2/UIProcess/API/C/WKPreferences.h:223 >>> +// Defaults to false. >> >> IMHO, it depends on policy. So I would like to remove this comment. > > There are default values for each setting member variables in Setting.cpp. I think its common to comment it.
If we set this setting value true on ewk initialization step, as an example, this function should return true. It means it is port specific. Then, caller might have confusion between this comment and actual result. Actually, there was a discussion to enable encoding detector by default in efl port even though it hasn't been happened. :)
Chris Dumez
Comment 6
2012-10-25 21:46:40 PDT
(In reply to
comment #4
)
> (From update of
attachment 170062
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=170062&action=review
> > >> Source/WebKit2/UIProcess/API/C/WKPreferences.h:223 > >> +// Defaults to false. > > > > IMHO, it depends on policy. So I would like to remove this comment. > > There are default values for each setting member variables in Setting.cpp. I think its common to comment it.
I agree with Jinwoo here. It is good (and common practice) to document the default value (even if ports can override it). Ports document their default values in their port-specific API anyway.
Ryuan Choi
Comment 7
2012-10-25 22:17:42 PDT
(In reply to
comment #5
)
> (From update of
attachment 170062
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=170062&action=review
> > >>> Source/WebKit2/UIProcess/API/C/WKPreferences.h:223 > >>> +// Defaults to false. > >> > >> IMHO, it depends on policy. So I would like to remove this comment. > > > > There are default values for each setting member variables in Setting.cpp. I think its common to comment it. > > If we set this setting value true on ewk initialization step, as an example, this function should return true. > It means it is port specific. > > Then, caller might have confusion between this comment and actual result. > Actually, there was a discussion to enable encoding detector by default in efl port even though it hasn't been happened. :)
If someone changes default value, they should update doxygen also. I supports jinwoo and chris.
Kangil Han
Comment 8
2012-10-25 23:14:06 PDT
Okay, we can update when policy would be changed. ;)
Yuni Jeong
Comment 9
2012-10-30 02:13:14 PDT
Created
attachment 171403
[details]
Patch
Yuni Jeong
Comment 10
2012-10-30 02:18:46 PDT
As Jinwoo Song's comment, I removed [EFL] prefix in the title and added comment that encoding detector is not used by default to unit test for ewk_setting_uses_encoding_detector.
Kangil Han
Comment 11
2012-10-30 04:32:13 PDT
Comment on
attachment 171403
[details]
Patch LGTM, thanks.
Mikhail Pozdnyakov
Comment 12
2012-10-30 04:34:11 PDT
Comment on
attachment 171403
[details]
Patch LGTM
Ryuan Choi
Comment 13
2012-10-30 05:14:30 PDT
LGTM. I changed bug title to match with changelog.
Gyuyoung Kim
Comment 14
2012-10-30 05:33:16 PDT
Comment on
attachment 171403
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=171403&action=review
> Source/WebKit2/UIProcess/API/C/WKPreferences.cpp:947 > +void WKPreferencesSetUsesEncodingDetector(WKPreferencesRef preferencesRef, bool use)
To be consistent with existing APIs, it would be good if you use *enabled* or *flag* instead of *use*.
> Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:274 > +Eina_Bool ewk_setting_uses_encoding_detector_set(Ewk_Settings* settings, Eina_Bool use)
ditto. In this case, enable ?
Yuni Jeong
Comment 15
2012-10-31 23:37:07 PDT
Created
attachment 171779
[details]
Patch
Yuni Jeong
Comment 16
2012-10-31 23:39:14 PDT
To be consistent with existing APIs, i changed "use" to "enable".
WebKit Review Bot
Comment 17
2012-11-01 00:26:20 PDT
Comment on
attachment 171779
[details]
Patch Clearing flags on attachment: 171779 Committed
r133133
: <
http://trac.webkit.org/changeset/133133
>
WebKit Review Bot
Comment 18
2012-11-01 00:26:25 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug