| Differences between
and this patch
- a/Source/WebKit2/ChangeLog +18 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2012-06-14  Christophe Dumez  <christophe.dumez@intel.com>
2
3
        [WK2][EFL] Implement navigation back/forward in Ewk_View
4
        https://bugs.webkit.org/show_bug.cgi?id=89173
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Add API for Ewk_View to ask the main frame to navigate backwards
9
        or forwards in history. Also add API to query if such navigation
10
        is possible.
11
12
        * UIProcess/API/efl/ewk_view.cpp:
13
        (ewk_view_back):
14
        (ewk_view_forward):
15
        (ewk_view_back_possible):
16
        (ewk_view_forward_possible):
17
        * UIProcess/API/efl/ewk_view.h:
18
1
2012-06-14  Kent Tamura  <tkent@chromium.org>
19
2012-06-14  Kent Tamura  <tkent@chromium.org>
2
20
3
        Validate form state strings in FormController::setStateForNewFormElements()
21
        Validate form state strings in FormController::setStateForNewFormElements()
- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +42 lines
Lines 532-537 void ewk_view_display(Evas_Object* ewkView, const IntRect& rect) a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp_sec1
532
    evas_object_image_data_update_add(smartData->image, rect.x(), rect.y(), rect.width(), rect.height());
532
    evas_object_image_data_update_add(smartData->image, rect.x(), rect.y(), rect.width(), rect.height());
533
}
533
}
534
534
535
Eina_Bool ewk_view_back(Evas_Object* ewkView)
536
{
537
    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
538
    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
539
540
    WKPageRef pageRef = toAPI(priv->pageClient->page());
541
    if (WKPageCanGoBack(pageRef)) {
542
        WKPageGoBack(pageRef);
543
        return true;
544
    }
545
    return false;
546
}
547
548
Eina_Bool ewk_view_forward(Evas_Object* ewkView)
549
{
550
    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
551
    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
552
553
    WKPageRef pageRef = toAPI(priv->pageClient->page());
554
    if (WKPageCanGoForward(pageRef)) {
555
        WKPageGoForward(pageRef);
556
        return true;
557
    }
558
    return false;
559
}
560
561
Eina_Bool ewk_view_back_possible(Evas_Object* ewkView)
562
{
563
    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
564
    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
565
566
    return WKPageCanGoBack(toAPI(priv->pageClient->page()));
567
}
568
569
Eina_Bool ewk_view_forward_possible(Evas_Object* ewkView)
570
{
571
    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
572
    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
573
574
    return WKPageCanGoForward(toAPI(priv->pageClient->page()));
575
}
576
535
void ewk_view_image_data_set(Evas_Object* ewkView, void* imageData, const IntSize& size)
577
void ewk_view_image_data_set(Evas_Object* ewkView, void* imageData, const IntSize& size)
536
{
578
{
537
    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
579
    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
- a/Source/WebKit2/UIProcess/API/efl/ewk_view.h +41 lines
Lines 164-169 EAPI Eina_Bool ewk_view_uri_set(Evas_Object *o, const char *uri); a/Source/WebKit2/UIProcess/API/efl/ewk_view.h_sec1
164
 */
164
 */
165
EAPI const char *ewk_view_uri_get(const Evas_Object *o);
165
EAPI const char *ewk_view_uri_get(const Evas_Object *o);
166
166
167
/**
168
 * Asks the main frame to navigate back in the history.
169
 *
170
 * @param o view object to navigate back
171
 *
172
 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
173
 *
174
 * @see ewk_frame_back()
175
 */
176
EAPI Eina_Bool    ewk_view_back(Evas_Object *o);
177
178
/**
179
 * Asks the main frame to navigate forward in the history.
180
 *
181
 * @param o view object to navigate forward
182
 *
183
 * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
184
 *
185
 * @see ewk_frame_forward()
186
 */
187
EAPI Eina_Bool    ewk_view_forward(Evas_Object *o);
188
189
/**
190
 * Queries if it is possible to navigate backwards one item in the history.
191
 *
192
 * @param o view object to query if backward navigation is possible
193
 *
194
 * @return @c EINA_TRUE if it is possible to navigate backwards in the history, @c EINA_FALSE otherwise
195
 */
196
EAPI Eina_Bool    ewk_view_back_possible(Evas_Object *o);
197
198
/**
199
 * Queries if it is possible to navigate forwards one item in the history.
200
 *
201
 * @param o view object to query if forward navigation is possible
202
 *
203
 * @return @c EINA_TRUE if it is possible to navigate forwards in the history, @c EINA_FALSE otherwise
204
 */
205
EAPI Eina_Bool    ewk_view_forward_possible(Evas_Object *o);
206
207
167
#ifdef __cplusplus
208
#ifdef __cplusplus
168
}
209
}
169
#endif
210
#endif
- a/Tools/ChangeLog +14 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2012-06-14  Christophe Dumez  <christophe.dumez@intel.com>
2
3
        [WK2][EFL] Implement navigation back/forward in Ewk_View
4
        https://bugs.webkit.org/show_bug.cgi?id=89173
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Implement navigation back / forward in MiniBrowser. Use
9
        'F1' to navigate back and 'F2' to navigate forward.
10
11
        * MiniBrowser/efl/main.c:
12
        (on_key_down):
13
        (browserCreate):
14
1
2012-06-14  Xianzhu Wang  <wangxianzhu@chromium.org>
15
2012-06-14  Xianzhu Wang  <wangxianzhu@chromium.org>
2
16
3
        [Chromium-Android] Initialize font rendering in DumpRenderTree
17
        [Chromium-Android] Initialize font rendering in DumpRenderTree
- a/Tools/MiniBrowser/efl/main.c -1 / +26 lines
Lines 26-31 static const int DEFAULT_WIDTH = 800; a/Tools/MiniBrowser/efl/main.c_sec1
26
static const int DEFAULT_HEIGHT = 600;
26
static const int DEFAULT_HEIGHT = 600;
27
static const char DEFAULT_URL[] = "http://www.google.com/";
27
static const char DEFAULT_URL[] = "http://www.google.com/";
28
28
29
#define info(format, args...)       \
30
    do {                            \
31
        if (verbose)                \
32
            printf(format, ##args); \
33
    } while (0)
34
35
static int verbose = 0;
36
29
typedef struct _MiniBrowser {
37
typedef struct _MiniBrowser {
30
    Ecore_Evas *ee;
38
    Ecore_Evas *ee;
31
    Evas *evas;
39
    Evas *evas;
Lines 56-61 static void on_ecore_evas_resize(Ecore_Evas *ee) a/Tools/MiniBrowser/efl/main.c_sec2
56
    evas_object_resize(webview, w, h);
64
    evas_object_resize(webview, w, h);
57
}
65
}
58
66
67
static void
68
on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
69
{
70
    Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info;
71
    if (!strcmp(ev->key, "F1")) {
72
        info("Back (F1) was pressed\n");
73
        if (!ewk_view_back(obj))
74
            info("Back ignored: No back history\n");
75
    } else if (!strcmp(ev->key, "F2")) {
76
        info("Forward (F2) was pressed\n");
77
        if (!ewk_view_forward(obj))
78
            info("Forward ignored: No forward history\n");
79
    }
80
}
81
59
static MiniBrowser *browserCreate(const char *url)
82
static MiniBrowser *browserCreate(const char *url)
60
{
83
{
61
    MiniBrowser *app = malloc(sizeof(MiniBrowser));
84
    MiniBrowser *app = malloc(sizeof(MiniBrowser));
Lines 81-88 static MiniBrowser *browserCreate(const char *url) a/Tools/MiniBrowser/efl/main.c_sec3
81
    /* Create webview */
104
    /* Create webview */
82
    app->browser = ewk_view_add(app->evas);
105
    app->browser = ewk_view_add(app->evas);
83
    evas_object_name_set(app->browser, "browser");
106
    evas_object_name_set(app->browser, "browser");
84
    evas_object_size_hint_weight_set(app->browser, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
85
107
108
    evas_object_event_callback_add(app->browser, EVAS_CALLBACK_KEY_DOWN, on_key_down, app);
109
110
    evas_object_size_hint_weight_set(app->browser, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
86
    evas_object_resize(app->browser, DEFAULT_WIDTH, DEFAULT_HEIGHT);
111
    evas_object_resize(app->browser, DEFAULT_WIDTH, DEFAULT_HEIGHT);
87
    evas_object_show(app->browser);
112
    evas_object_show(app->browser);
88
    evas_object_focus_set(app->browser, EINA_TRUE);
113
    evas_object_focus_set(app->browser, EINA_TRUE);

Return to Bug 89173