RESOLVED FIXED 103342
[EFL][WK2] Add ewk_settings APIs for text autosizing
https://bugs.webkit.org/show_bug.cgi?id=103342
Summary [EFL][WK2] Add ewk_settings APIs for text autosizing
Jaehun Lim
Reported 2012-11-26 18:15:54 PST
Add ewk_settings_text_autosizing_enabled_get / set() functions.
Attachments
Patch (5.03 KB, patch)
2012-11-26 18:19 PST, Jaehun Lim
kenneth: review+
Fixed patch (4.85 KB, patch)
2012-12-06 22:10 PST, Jaehun Lim
no flags
Fixed patch (4.84 KB, patch)
2012-12-06 22:15 PST, Jaehun Lim
no flags
Patch (5.13 KB, patch)
2012-12-06 23:50 PST, Jaehun Lim
no flags
Jaehun Lim
Comment 1 2012-11-26 18:19:15 PST
Gyuyoung Kim
Comment 2 2012-12-06 17:59:22 PST
Comment on attachment 176138 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=176138&action=review > Source/WebKit2/ChangeLog:9 > + Text autosizing is disabled by default. I think this API is not meaningless if text autosizing is disabled. > Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:354 > + EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); I think we don't need to keep this line when disabling TEXT_AUTOSIZING > Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:368 > +#if ENABLE(TEXT_AUTOSIZING) ditto. > Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:370 > +#else Missing UNUSED_PARAM
Kenneth Rohde Christiansen
Comment 3 2012-12-06 18:02:29 PST
Comment on attachment 176138 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=176138&action=review >> Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:354 >> + EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); > > I think we don't need to keep this line when disabling TEXT_AUTOSIZING The line is correct and people could give a null pointer. I say leave it
Gyuyoung Kim
Comment 4 2012-12-06 18:07:07 PST
(In reply to comment #3) > (From update of attachment 176138 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=176138&action=review > > >> Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:354 > >> + EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); > > > > I think we don't need to keep this line when disabling TEXT_AUTOSIZING > > The line is correct and people could give a null pointer. > > I say leave it Ok, I don't mind this. Jaehun, please fix I pointed out.
Gyuyoung Kim
Comment 5 2012-12-06 18:11:03 PST
(In reply to comment #2) > (From update of attachment 176138 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=176138&action=review > > > Source/WebKit2/ChangeLog:9 > > + Text autosizing is disabled by default. > > I think this API is not meaningless if text autosizing is disabled. typo : not meaningless -> meaningless. Kenneth, what do you think about this? Do you think this API can be landed without enabling TEXT_AUTOSIZING ?
Gyuyoung Kim
Comment 6 2012-12-06 18:18:47 PST
Comment on attachment 176138 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=176138&action=review >>>> Source/WebKit2/UIProcess/API/efl/ewk_settings.cpp:354 >>>> + EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); >>> >>> I think we don't need to keep this line when disabling TEXT_AUTOSIZING >> >> The line is correct and people could give a null pointer. >> >> I say leave it > > Ok, I don't mind this. Jaehun, please fix I pointed out. I missed one thing. EFL port has used below line. To be compliant with existing implementation, I prefer to use below style. My first comment meant this. #if ENABLE(TEXT_AUTOSIZING) EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); settings->preferences()->setTextAutosizingEnabled(enable); return true; #else UNUSED_PARAM(enable); return false; #endif } For example, Eina_Bool ewk_settings_fullscreen_enabled_get(const Ewk_Settings* settings) { #if ENABLE(FULLSCREEN_API) EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false); return settings->preferences()->fullScreenEnabled(); #else return false; #endif }
Jaehun Lim
Comment 7 2012-12-06 22:10:34 PST
Created attachment 178160 [details] Fixed patch I fixed my patch according to Gyuyoung's comments. Gyuyoung, Please review again.
Jaehun Lim
Comment 8 2012-12-06 22:15:31 PST
Created attachment 178162 [details] Fixed patch Fixed patch
Jaehun Lim
Comment 9 2012-12-06 23:50:29 PST
Kenneth Rohde Christiansen
Comment 10 2012-12-07 02:36:11 PST
Comment on attachment 178167 [details] Patch Please enable text autosizing in the build system soon
WebKit Review Bot
Comment 11 2012-12-07 02:48:47 PST
Comment on attachment 178167 [details] Patch Clearing flags on attachment: 178167 Committed r136941: <http://trac.webkit.org/changeset/136941>
WebKit Review Bot
Comment 12 2012-12-07 02:48:52 PST
All reviewed patches have been landed. Closing bug.
Jaehun Lim
Comment 13 2012-12-09 15:53:24 PST
(In reply to comment #10) > (From update of attachment 178167 [details]) > Please enable text autosizing in the build system soon I'll make another bug to enable TEXT_AUTOSIZING soon. But there is one problem how to define "HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP" in http://trac.webkit.org/browser/trunk/Source/WebCore/page/Settings.cpp#L140. I'll enable it after resolving https://bugs.webkit.org/show_bug.cgi?id=94371.
Note You need to log in before you can comment on or make changes to this bug.