Changeset 88631 in webkit
- Timestamp:
- Jun 13, 2011 1:56:53 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/gtk/ChangeLog
r88628 r88631 1 2011-06-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Export an API similar to WebKit1 6 https://bugs.webkit.org/show_bug.cgi?id=57820 7 8 * GNUmakefile.am: Add webkitwebviewcommon.h to public header list. 9 * webkit/webkitwebview.h: Move declarations common to WebKit2 to 10 webkitwebviewcommon.h. 11 * webkit/webkitwebviewcommon.h: Added. 12 1 13 2011-06-12 Adam Barth <abarth@webkit.org> 2 14 -
trunk/Source/WebKit/gtk/GNUmakefile.am
r88399 r88631 138 138 $(srcdir)/Source/WebKit/gtk/webkit/webkitwebsettings.h \ 139 139 $(srcdir)/Source/WebKit/gtk/webkit/webkitwebwindowfeatures.h \ 140 $(srcdir)/Source/WebKit/gtk/webkit/webkitwebview.h 140 $(srcdir)/Source/WebKit/gtk/webkit/webkitwebview.h \ 141 $(srcdir)/Source/WebKit/gtk/webkit/webkitwebviewcommon.h 141 142 142 143 webkitgtk_built_h_api += \ -
trunk/Source/WebKit/gtk/webkit/webkitwebview.h
r80561 r88631 33 33 #include <webkit/webkitwebhistoryitem.h> 34 34 #include <webkit/webkitwebsettings.h> 35 #include <webkit/webkitwebviewcommon.h> 35 36 36 37 G_BEGIN_DECLS … … 154 155 }; 155 156 156 WEBKIT_API GType157 webkit_web_view_get_type (void);158 159 WEBKIT_API GtkWidget *160 webkit_web_view_new (void);161 162 WEBKIT_API G_CONST_RETURN gchar *163 webkit_web_view_get_title (WebKitWebView *webView);164 165 157 WEBKIT_API G_CONST_RETURN gchar * 166 158 webkit_web_view_get_uri (WebKitWebView *webView); … … 188 180 189 181 WEBKIT_API void 190 webkit_web_view_go_back (WebKitWebView *webView);191 192 WEBKIT_API void193 182 webkit_web_view_go_back_or_forward (WebKitWebView *webView, 194 183 gint steps); 195 184 196 185 WEBKIT_API void 197 webkit_web_view_go_forward (WebKitWebView *webView);198 199 WEBKIT_API void200 186 webkit_web_view_stop_loading (WebKitWebView *webView); 201 187 … … 209 195 WEBKIT_API void 210 196 webkit_web_view_reload_bypass_cache (WebKitWebView *webView); 211 212 WEBKIT_API void213 webkit_web_view_load_uri (WebKitWebView *webView,214 const gchar *uri);215 197 216 198 WEBKIT_API void -
trunk/Source/WebKit2/ChangeLog
r88628 r88631 1 2011-06-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Export an API similar to WebKit1 6 https://bugs.webkit.org/show_bug.cgi?id=57820 7 8 Add first implementation of WebKitWebView, a class with the same 9 API than webkit1, that wraps the C API to provide a high level 10 WebKit2 API for GTK port. 11 12 * GNUmakefile.am: Add new files to compilation. 13 * UIProcess/API/gtk/WebKitWebView.cpp: Added. 14 (webkit_web_view_init): 15 (webkit_web_view_class_init): 16 (webkit_web_view_new): 17 (webkit_web_view_load_uri): 18 (webkit_web_view_go_back): 19 (webkit_web_view_go_forward): 20 * UIProcess/API/gtk/WebKitWebView.h: Added. 21 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 22 (webkitWebViewBaseCreate): 23 (webkitWebViewBaseCreateWebPage): 24 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: 25 * UIProcess/API/gtk/webkit/webkit.h: Added. 26 1 27 2011-06-12 Adam Barth <abarth@webkit.org> 2 28 -
trunk/Source/WebKit2/GNUmakefile.am
r88463 r88631 66 66 $(WebKit2)/UIProcess/API/C/WKResourceCacheManager.h \ 67 67 $(WebKit2)/UIProcess/API/cpp/WKRetainPtr.h \ 68 $(WebKit2)/UIProcess/API/gtk/WebKitWebViewBase.h 68 $(WebKit2)/UIProcess/API/gtk/WebKitWebView.h \ 69 $(WebKit2)/UIProcess/API/gtk/WebKitWebViewBase.h \ 70 $(WebKit2)/UIProcess/API/gtk/webkit/webkit.h 69 71 70 72 nodist_libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \ … … 361 363 Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h \ 362 364 Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp \ 365 Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h \ 366 Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp \ 363 367 Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.h \ 364 368 Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp \ 365 369 Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h \ 370 Source/WebKit2/UIProcess/API/gtk/webkit/webkit.h \ 366 371 Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp \ 367 372 Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h \ -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
r87689 r88631 338 338 { 339 339 WebKitWebViewBase* webkitWebViewBase = WEBKIT_WEB_VIEW_BASE(g_object_new(WEBKIT_TYPE_WEB_VIEW_BASE, NULL)); 340 webkitWebViewBaseCreateWebPage(webkitWebViewBase, toAPI(context), toAPI(pageGroup)); 341 return webkitWebViewBase; 342 } 343 344 GtkIMContext* webkitWebViewBaseGetIMContext(WebKitWebViewBase* webkitWebViewBase) 345 { 346 return webkitWebViewBase->priv->imContext; 347 } 348 349 WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase* webkitWebViewBase) 350 { 351 return webkitWebViewBase->priv->pageProxy.get(); 352 } 353 354 void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, WKContextRef context, WKPageGroupRef pageGroup) 355 { 340 356 WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv; 341 357 342 priv->pageProxy = context->createWebPage(priv->pageClient.get(), pageGroup);358 priv->pageProxy = toImpl(context)->createWebPage(priv->pageClient.get(), toImpl(pageGroup)); 343 359 priv->pageProxy->initializeWebPage(); 344 345 return webkitWebViewBase;346 }347 348 GtkIMContext* webkitWebViewBaseGetIMContext(WebKitWebViewBase* webkitWebViewBase)349 {350 return webkitWebViewBase->priv->imContext;351 }352 353 WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase* webkitWebViewBase)354 {355 return webkitWebViewBase->priv->pageProxy.get();356 360 } 357 361 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
r87689 r88631 31 31 #include "WebKitWebViewBase.h" 32 32 #include "WebPageProxy.h" 33 #include <WebKit2/WebKit2.h> 33 34 34 35 using namespace WebKit; … … 42 43 WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase*); 43 44 45 void webkitWebViewBaseCreateWebPage(WebKitWebViewBase*, WKContextRef, WKPageGroupRef); 46 44 47 void webkitWebViewBaseSetTooltipText(WebKitWebViewBase*, const char*); 45 48 -
trunk/Tools/ChangeLog
r88630 r88631 1 2011-06-13 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Export an API similar to WebKit1 6 https://bugs.webkit.org/show_bug.cgi?id=57820 7 8 Build GtkLauncher2 for WebKit2. It's actually the same GtkLauncher 9 code, but linking to libwebkit2gtk. 10 11 * GNUmakefile.am: 12 * GtkLauncher/main.c: 13 (createBrowser): 14 (main): 15 1 16 2011-06-12 MORITA Hajime <morrita@google.com> 2 17 -
trunk/Tools/GNUmakefile.am
r88513 r88631 4 4 Programs/ImageDiff 5 5 6 if ENABLE_WEBKIT2 7 noinst_PROGRAMS += \ 8 Programs/GtkLauncher2 9 endif 10 6 11 # GtkLauncher 12 gtklauncher_sources = \ 13 Tools/GtkLauncher/main.c 14 15 gtklauncher_cflags = \ 16 -fno-strict-aliasing \ 17 $(global_cflags) \ 18 $(GTK_CFLAGS) \ 19 $(LIBSOUP_CFLAGS) 20 21 gtklauncher_ldadd = \ 22 libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \ 23 $(GTK_LIBS) \ 24 $(GLIB_LIBS) \ 25 $(LIBSOUP_LIBS) \ 26 $(WINMM_LIBS) 27 28 gtklauncher_ldflags = \ 29 -no-fast-install \ 30 -no-install 31 7 32 Programs_GtkLauncher_CPPFLAGS = \ 8 33 -I$(srcdir)/Source/WebKit/gtk \ … … 14 39 15 40 Programs_GtkLauncher_SOURCES = \ 16 Tools/GtkLauncher/main.c41 $(gtklauncher_sources) 17 42 18 43 Programs_GtkLauncher_CFLAGS = \ 19 44 -ansi \ 20 -fno-strict-aliasing \ 21 $(global_cflags) \ 22 $(GTK_CFLAGS) \ 23 $(LIBSOUP_CFLAGS) 45 $(gtklauncher_cflags) 24 46 25 47 Programs_GtkLauncher_LDADD = \ 26 libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \27 48 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \ 28 $(GTK_LIBS) \ 29 $(GLIB_LIBS) \ 30 $(LIBSOUP_LIBS) \ 31 $(WINMM_LIBS) 49 $(gtklauncher_ldadd) 32 50 33 51 Programs_GtkLauncher_LDFLAGS = \ 34 -no-fast-install \ 35 -no-install 52 $(gtklauncher_ldflags) 53 54 if ENABLE_WEBKIT2 55 Programs_GtkLauncher2_CPPFLAGS = \ 56 -I$(srcdir)/Source \ 57 -I$(top_builddir)/DerivedSources/WebKit2/include \ 58 -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \ 59 -I$(top_builddir)/Source/WebKit2/UIProcess/API/gtk \ 60 -I$(srcdir)/Source/WebKit/gtk \ 61 -I$(top_builddir)/Source/WebKit/gtk \ 62 -I$(top_builddir)/DerivedSources \ 63 $(global_cppflags) \ 64 $(javascriptcore_cppflags) 65 66 Programs_GtkLauncher2_SOURCES = \ 67 $(gtklauncher_sources) 68 69 Programs_GtkLauncher2_CFLAGS = \ 70 -DWEBKIT2=\"1\" \ 71 $(gtklauncher_cflags) 72 73 Programs_GtkLauncher2_LDADD = \ 74 libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \ 75 $(gtklauncher_ldadd) 76 77 Programs_GtkLauncher2_LDFLAGS = \ 78 $(gtklauncher_ldflags) 79 80 endif 36 81 37 82 # libWebCoreInternals … … 191 236 Programs/ImageDiff 192 237 238 if ENABLE_WEBKIT2 239 CLEANFILES += \ 240 Programs/GtkLauncher2 241 endif 242 193 243 if TARGET_X11 194 244 -
trunk/Tools/GtkLauncher/main.c
r85039 r88631 40 40 } 41 41 42 #ifndef WEBKIT2 42 43 static void updateTitle(GtkWindow* window, WebKitWebView* webView) 43 44 { … … 81 82 updateTitle(GTK_WINDOW(window), webView); 82 83 } 84 #endif 83 85 84 86 static void destroyCb(GtkWidget* widget, GtkWidget* window) … … 98 100 } 99 101 102 #ifndef WEBKIT2 100 103 static WebKitWebView* 101 104 createWebViewCb(WebKitWebView* webView, WebKitWebFrame* web_frame, GtkWidget* window) … … 118 121 return TRUE; 119 122 } 123 #endif 120 124 121 125 static GtkWidget* createBrowser(GtkWidget* window, GtkWidget* uriEntry, GtkWidget* statusbar, WebKitWebView* webView) … … 126 130 gtk_container_add(GTK_CONTAINER(scrolledWindow), GTK_WIDGET(webView)); 127 131 132 #ifndef WEBKIT2 128 133 g_signal_connect(webView, "notify::title", G_CALLBACK(notifyTitleCb), window); 129 134 g_signal_connect(webView, "notify::load-status", G_CALLBACK(notifyLoadStatusCb), uriEntry); … … 133 138 g_signal_connect(webView, "web-view-ready", G_CALLBACK(webViewReadyCb), window); 134 139 g_signal_connect(webView, "close-web-view", G_CALLBACK(closeWebViewCb), window); 140 #endif 135 141 136 142 return scrolledWindow; … … 240 246 g_thread_init(NULL); 241 247 248 #ifndef WEBKIT2 242 249 #ifdef SOUP_TYPE_PROXY_RESOLVER_DEFAULT 243 250 soup_session_add_feature_by_type(webkit_get_default_session(), SOUP_TYPE_PROXY_RESOLVER_DEFAULT); … … 250 257 } 251 258 #endif 259 #endif 252 260 253 261 main_window = createWindow(&webView);
Note: See TracChangeset
for help on using the changeset viewer.