[webkit-efl] About removing ewk_xxx_forward | backward_possible()
Gyuyoung Kim
gyuyoung.kim at samsung.com
Sun Oct 9 18:31:55 PDT 2011
Hello efl folks,
It seems to me that there are unnecessary APIs in ewk port. The APIs are
ewk_frame_back_possible(), ewk_frame_forward_possible(). I think the APIs
can be
enough to replace by ewk_frame_navigate_possible(). We just add a comment
regarding how to check if
backword and forward is possible via steps parameter of
ewk_frame_navigate_possible().
597 Eina_Bool ewk_frame_back_possible(Evas_Object* o)
598 {
599 return ewk_frame_navigate_possible(o, -1);
600 }
601
602 Eina_Bool ewk_frame_forward_possible(Evas_Object* o)
603 {
604 return ewk_frame_navigate_possible(o, 1);
605 }
606
607 Eina_Bool ewk_frame_navigate_possible(Evas_Object* o, int steps)
608 {
609 EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
610 EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
611 WebCore::Page* page = sd->frame->page();
612 return page->canGoBackOrForward(steps);
613 }
Ewk_view.cpp also has same APIs which using ewk_frame_back |
forward_possible().
1496 Eina_Bool ewk_view_back_possible(Evas_Object* o)
1497 {
1498 EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
1499 return ewk_frame_back_possible(sd->main_frame);
1500 }
1501
1502 Eina_Bool ewk_view_forward_possible(Evas_Object* o)
1503 {
1504 EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
1505 return ewk_frame_forward_possible(sd->main_frame);
1506 }
1507
1508 Eina_Bool ewk_view_navigate_possible(Evas_Object* o, int steps)
1509 {
1510 EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
1511 return ewk_frame_navigate_possible(sd->main_frame, steps);
1512 }
1513
I'd like to know how do webkit-efl developers think this removal.
Thanks,
Gyuyoung.
More information about the webkit-efl
mailing list