RESOLVED WONTFIX103860
[WK2][EFL] Add ewk API for creating a view with legacy behavior
https://bugs.webkit.org/show_bug.cgi?id=103860
Summary [WK2][EFL] Add ewk API for creating a view with legacy behavior
KyungTae Kim
Reported 2012-12-02 23:27:05 PST
The EFL WebKit2 MiniBrowser uses WK2 API for creating a view with legacy behavior (bug 103679). But, it seems not a good way because it's the only WK2 API that is used by the MiniBrowser, and it needs a type conversion between incompatible types that makes the below build warning: Tools/MiniBrowser/efl/main.c:1064:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] How about add a ewk API for creating a view with legacy behavior?
Attachments
Patch (4.33 KB, patch)
2012-12-02 23:37 PST, KyungTae Kim
kenneth: review-
KyungTae Kim
Comment 1 2012-12-02 23:37:00 PST
KyungTae Kim
Comment 3 2012-12-03 21:23:02 PST
(In reply to comment #2) > Please see https://bugs.webkit.org/show_bug.cgi?id=103679#c2 and https://bugs.webkit.org/show_bug.cgi?id=103679#c3. I agree with the comments. The 'setViewBehavior' and 'viewBehavior' should not to be APIs. What I suggest is a API for just what you want - creating a view with legacy behavior. (not 'setViewBehavior' for already created view) You need that functionality but there was no ewk_ API for that, so that API is necessary API I think. I think the alternative implementation would be the view creating API with behavior like below: enum Ewk_View_Behavior { EWK_VIEW_BEHAVIOR_DEFAULT, EWK_VEIW_BEHAVIOR_LEGACY }; ewk_view_smart_add_with_behavior(evas, smart, ewk_context_default_get(), EWK_VEIW_BEHAVIOR_LEGACY);
Gyuyoung Kim
Comment 4 2012-12-03 22:12:41 PST
(In reply to comment #3) > (In reply to comment #2) > > Please see https://bugs.webkit.org/show_bug.cgi?id=103679#c2 and https://bugs.webkit.org/show_bug.cgi?id=103679#c3. > > I agree with the comments. The 'setViewBehavior' and 'viewBehavior' should not to be APIs. > > What I suggest is a API for just what you want - creating a view with legacy behavior. > (not 'setViewBehavior' for already created view) > > You need that functionality but there was no ewk_ API for that, so that API is necessary API I think. > > I think the alternative implementation would be the view creating API with behavior like below: > > enum Ewk_View_Behavior { > EWK_VIEW_BEHAVIOR_DEFAULT, > EWK_VEIW_BEHAVIOR_LEGACY > }; > ewk_view_smart_add_with_behavior(evas, smart, ewk_context_default_get(), EWK_VEIW_BEHAVIOR_LEGACY); I don't agree to change API by MiniBrowser needs. Do you think this will be needed by real application(e.g. browser) ? Kenneth, what do you think ?
KyungTae Kim
Comment 5 2012-12-03 23:58:53 PST
(In reply to comment #4) > I don't agree to change API by MiniBrowser needs. Do you think this will be needed by real application(e.g. browser) ? Kenneth, what do you think ? I think this will be needed when we make a PC Browser with legacy behavior.
Mikhail Pozdnyakov
Comment 6 2012-12-04 00:31:46 PST
Think "legacy" means that it's not supposed to be used any more :) Don't think we should expose it.
Ryuan Choi
Comment 7 2012-12-05 18:10:13 PST
(In reply to comment #6) > Think "legacy" means that it's not supposed to be used any more :) Don't think we should expose it. By the way, exposing WK is also bad. We didn't expose it to application side.
KyungTae Kim
Comment 8 2012-12-05 21:17:35 PST
(In reply to comment #6) > Think "legacy" means that it's not supposed to be used any more :) Don't think we should expose it. If the "legacy" is "not supposed to be used", the WKViewCreate also need to do "default behavior" by default, not "legacy behavior". Anyway, the "legacy behavior" is needed for Minibrowser now, and may be needed for other applications that don't want to use the backing store.
Kenneth Rohde Christiansen
Comment 9 2012-12-06 01:17:39 PST
(In reply to comment #8) > (In reply to comment #6) > > Think "legacy" means that it's not supposed to be used any more :) Don't think we should expose it. > > If the "legacy" is "not supposed to be used", the WKViewCreate also need to do "default behavior" by default, not "legacy behavior". > Anyway, the "legacy behavior" is needed for Minibrowser now, and may be needed for other applications that don't want to use the backing store. If you don't want a proper browser featuring high performance features commonly known as HTML5 today, you can always use a WebKit snapshot from 2008 or earlier. Joke aside, I mean we cannot and don't want to support all kind of configurations and especially not ones that means sacrificing the platform. Even browsers like Chrome today uses a backing store by default. Get over it. There should not be any "may be used". We don't care about "may", we need to focus on what we "do need".
Kenneth Rohde Christiansen
Comment 10 2012-12-06 01:20:09 PST
Comment on attachment 177192 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177192&action=review > Source/WebKit2/UIProcess/API/efl/ewk_view.h:342 > EAPI Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context); > +EAPI Evas_Object *ewk_view_smart_add_with_legacy_behavior(Evas *e, Evas_Smart *smart, Ewk_Context *context); We decided to not expose these things publically. > Tools/MiniBrowser/efl/main.c:1062 > - if (legacy_behavior_enabled) { > - // Use raw WK2 api to create a view using legacy mode. > - window->ewk_view = (Evas_Object*)WKViewCreate(evas, 0, 0); > - } else { > - Evas_Smart *smart = evas_smart_class_new(&ewkViewClass->sc); > + MiniBrowser is a development tool. There is no problem using some internal API for the sake of being able to improve debugging some cases. The API is internal, it will not be documented, and even if people find it and use it, we have no guarantees it will stay there or not change behavior. That is fine.
KyungTae Kim
Comment 11 2012-12-06 01:47:56 PST
(In reply to comment #10) > MiniBrowser is a development tool. There is no problem using some internal API for the sake of being able to improve debugging some cases. > The API is internal, it will not be documented, and even if people find it and use it, we have no guarantees it will stay there or not change behavior. That is fine. OK. I understood your point. I'll close this bug. Then, I think the below warning need to be fixed in another way : Tools/MiniBrowser/efl/main.c:1064:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Note You need to log in before you can comment on or make changes to this bug.