Changeset 113697 in webkit
- Timestamp:
- Apr 10, 2012 12:40:42 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 added
- 12 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r113696 r113697 1 2012-04-10 Philippe Normand <pnormand@igalia.com> and Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [WK2][GTK] FullScreen signals 4 https://bugs.webkit.org/show_bug.cgi?id=76166 5 6 Reviewed by Gustavo Noronha Silva. 7 8 * GNUmakefile.am: Add new files to compilation. 9 * UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp: 10 (WKViewSetFullScreenClientGtk): Initialize WebKitWebViewBase 11 fullscreen client. 12 * UIProcess/API/C/gtk/WKFullScreenClientGtk.h: 13 * UIProcess/API/gtk/WebKitFullscreenClient.cpp: Added. 14 (willEnterFullScreen): Call webkitWebViewEnterFullScreen(). 15 (willExitFullScreen): Call webkitWebViewLeaveFullScreen(). 16 (attachFullScreenClientToView): Initialize FullScreenClient adding 17 implementations for willEnterFullScreen and willExitFullScreen callbacks. 18 * UIProcess/API/gtk/WebKitFullscreenClient.h: Added. 19 * UIProcess/API/gtk/WebKitPrivate.h: 20 * UIProcess/API/gtk/WebKitWebView.cpp: 21 (webkitWebViewConstructed): Attach fullscreen client to view. 22 (webkit_web_view_class_init): Add WebKitWebView::enter-fullscreen 23 and WebKitWebView::leave-fullscreen signals. 24 (webkitWebViewEnterFullScreen): Emit 25 WebKitWebView::enter-fullscreen signal. 26 (webkitWebViewLeaveFullScreen): Emit 27 WebKitWebView::leave-fullscreen signal. 28 * UIProcess/API/gtk/WebKitWebView.h: 29 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 30 (webkitWebViewBaseKeyPressEvent): Only return early when leaving 31 fullscreen, otherwise let the view process the key pressed. 32 (webkitWebViewBaseEnterFullScreen): Return early if 33 willEnterFullScreen callback is handled and returns false. 34 (webkitWebViewBaseExitFullScreen): Return early if 35 willExitFullScreen callback is handled and returns false. 36 (webkitWebViewBaseInitializeFullScreenClient): Initialize the 37 fullscreen client. 38 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: 39 * UIProcess/API/gtk/WebKitWebViewPrivate.h: 40 * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: 41 (testWebViewFullScreen): 42 (beforeAll): 43 * UIProcess/API/gtk/tests/WebViewTest.cpp: 44 (WebViewTest::keyStroke): Helper function to synthesize key 45 press/release events. 46 * UIProcess/API/gtk/tests/WebViewTest.h: 47 * UIProcess/API/gtk/webkit2marshal.list: 48 * UIProcess/gtk/WebFullScreenClientGtk.cpp: 49 (WebKit::WebFullScreenClientGtk::willEnterFullScreen): Call 50 willEnterFullScreen callback if defined. 51 (WebKit::WebFullScreenClientGtk::willExitFullScreen): Call 52 willExitFullScreen callback if defined. 53 * UIProcess/gtk/WebFullScreenClientGtk.h: 54 1 55 2012-04-10 Patrick Gansterer <paroga@webkit.org> 2 56 -
trunk/Source/WebKit2/GNUmakefile.am
r112889 r113697 34 34 $(WebKit2)/Shared/API/c/WKUserContentURLPattern.h \ 35 35 $(WebKit2)/UIProcess/API/C/gtk/WKAPICastGtk.h \ 36 $(WebKit2)/UIProcess/API/C/gtk/WKFullScreenClientGtk.h \ 36 37 $(WebKit2)/UIProcess/API/C/gtk/WKView.h \ 37 38 $(WebKit2)/UIProcess/API/C/WebKit2.h \ … … 462 463 Source/WebKit2/Shared/WebWheelEvent.cpp \ 463 464 Source/WebKit2/UIProcess/API/C/gtk/WKAPICastGtk.h \ 465 Source/WebKit2/UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp \ 466 Source/WebKit2/UIProcess/API/C/gtk/WKFullScreenClientGtk.h \ 464 467 Source/WebKit2/UIProcess/API/C/gtk/WKView.cpp \ 465 468 Source/WebKit2/UIProcess/API/C/gtk/WKView.h \ … … 557 560 Source/WebKit2/UIProcess/API/gtk/WebKitError.h \ 558 561 Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp \ 562 Source/WebKit2/UIProcess/API/gtk/WebKitFullscreenClient.cpp \ 563 Source/WebKit2/UIProcess/API/gtk/WebKitFullscreenClient.h \ 559 564 Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp \ 560 565 Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.h \ … … 646 651 Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.cpp \ 647 652 Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h \ 653 Source/WebKit2/UIProcess/gtk/WebFullScreenClientGtk.cpp \ 654 Source/WebKit2/UIProcess/gtk/WebFullScreenClientGtk.h \ 648 655 Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp \ 649 656 Source/WebKit2/UIProcess/gtk/WebInspectorGtk.cpp \ -
trunk/Source/WebKit2/UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp
r113696 r113697 1 1 /* 2 * Copyright (C) 201 1Igalia S.L.2 * Copyright (C) 2012 Igalia S.L. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i fndef WebKitPrivate_h27 # define WebKitPrivate_h26 #include "config.h" 27 #include "WKFullScreenClientGtk.h" 28 28 29 #include <WebKit2/WKAPICast.h> 30 #include <WebKit2/WKDownload.h> 31 #include <WebKit2/WKFindOptions.h> 32 #include <WebKit2/WKRetainPtr.h> 33 #include <WebKit2/WKSerializedScriptValue.h> 34 #include <WebKit2/WKString.h> 35 #include <WebKit2/WebKit2.h> 36 #include <glib.h> 37 #include <wtf/Assertions.h> 29 #include "WKAPICast.h" 30 #include "WebKitWebViewBasePrivate.h" 38 31 39 #define WEBKIT_PARAM_READABLE (static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 40 #define WEBKIT_PARAM_WRITABLE (static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 41 #define WEBKIT_PARAM_READWRITE (static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 32 using namespace WebKit; 42 33 43 #define COMPILE_ASSERT_MATCHING_ENUM(webkitName, webcoreName) \ 44 COMPILE_ASSERT(int(webkitName) == int(webcoreName), mismatchingEnums) 45 46 unsigned wkEventModifiersToGdkModifiers(WKEventModifiers); 47 48 #endif // WebKitPrivate_h 34 void WKViewSetFullScreenClientGtk(WKViewRef viewRef, const WKFullScreenClientGtk* wkClient) 35 { 36 webkitWebViewBaseInitializeFullScreenClient(toImpl(viewRef), wkClient); 37 } -
trunk/Source/WebKit2/UIProcess/API/C/gtk/WKFullScreenClientGtk.h
r113696 r113697 1 1 /* 2 * Copyright (C) 201 1Igalia S.L.2 * Copyright (C) 2012 Igalia S.L. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef W ebKitPrivate_h27 #define W ebKitPrivate_h26 #ifndef WKFullScreenClientGtk_h 27 #define WKFullScreenClientGtk_h 28 28 29 #include <WebKit2/WKAPICast.h> 30 #include <WebKit2/WKDownload.h> 31 #include <WebKit2/WKFindOptions.h> 32 #include <WebKit2/WKRetainPtr.h> 33 #include <WebKit2/WKSerializedScriptValue.h> 34 #include <WebKit2/WKString.h> 35 #include <WebKit2/WebKit2.h> 36 #include <glib.h> 37 #include <wtf/Assertions.h> 29 #include <WebKit2/WKBase.h> 38 30 39 # define WEBKIT_PARAM_READABLE (static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB))40 #define WEBKIT_PARAM_WRITABLE (static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 41 # define WEBKIT_PARAM_READWRITE (static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB))31 #ifdef __cplusplus 32 extern "C" { 33 #endif 42 34 43 #define COMPILE_ASSERT_MATCHING_ENUM(webkitName, webcoreName) \ 44 COMPILE_ASSERT(int(webkitName) == int(webcoreName), mismatchingEnums) 35 typedef bool (*WKFullScreenClientGtkWillEnterFullScreenCallback)(const void* clientInfo); 36 typedef bool (*WKFullScreenClientGtkWillExitFullScreenCallback)(const void* clientInfo); 45 37 46 unsigned wkEventModifiersToGdkModifiers(WKEventModifiers); 38 struct WKFullScreenClientGtk { 39 int version; 40 const void* clientInfo; 41 WKFullScreenClientGtkWillEnterFullScreenCallback willEnterFullScreen; 42 WKFullScreenClientGtkWillExitFullScreenCallback willExitFullScreen; 43 }; 44 typedef struct WKFullScreenClientGtk WKFullScreenClientGtk; 47 45 48 #endif // WebKitPrivate_h 46 enum { kWKFullScreenClientGtkCurrentVersion = 0 }; 47 48 WK_EXPORT void WKViewSetFullScreenClientGtk(WKViewRef viewRef, const WKFullScreenClientGtk* client); 49 50 #ifdef __cplusplus 51 } 52 #endif 53 54 #endif /* WKFullScreenClientGtk_h */ -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h
r111510 r113697 30 30 #include <WebKit2/WKDownload.h> 31 31 #include <WebKit2/WKFindOptions.h> 32 #include <WebKit2/WKFullScreenClientGtk.h> 32 33 #include <WebKit2/WKRetainPtr.h> 33 34 #include <WebKit2/WKSerializedScriptValue.h> -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
r112227 r113697 25 25 #include "WebKitEnumTypes.h" 26 26 #include "WebKitError.h" 27 #include "WebKitFullscreenClient.h" 27 28 #include "WebKitHitTestResultPrivate.h" 28 29 #include "WebKitJavascriptResultPrivate.h" … … 71 72 RESOURCE_LOAD_STARTED, 72 73 74 ENTER_FULLSCREEN, 75 LEAVE_FULLSCREEN, 76 73 77 LAST_SIGNAL 74 78 }; … … 218 222 attachPolicyClientToPage(webView); 219 223 attachResourceLoadClientToView(webView); 224 attachFullScreenClientToView(webView); 220 225 221 226 WebPageProxy* page = webkitWebViewBaseGetPage(webViewBase); … … 707 712 WEBKIT_TYPE_WEB_RESOURCE, 708 713 WEBKIT_TYPE_URI_REQUEST); 714 715 /** 716 * WebKitWebView::enter-fullscreen: 717 * @web_view: the #WebKitWebView on which the signal is emitted. 718 * 719 * Emitted when JavaScript code calls 720 * <function>element.webkitRequestFullScreen</function>. If the 721 * signal is not handled the #WebKitWebView will proceed to full screen 722 * its top level window. This signal can be used by client code to 723 * request permission to the user prior doing the full screen 724 * transition and eventually prepare the top-level window 725 * (e.g. hide some widgets that would otherwise be part of the 726 * full screen window). 727 * 728 * Returns: %TRUE to stop other handlers from being invoked for the event. 729 * %FALSE to continue emission of the event. 730 */ 731 signals[ENTER_FULLSCREEN] = 732 g_signal_new("enter-fullscreen", 733 G_TYPE_FROM_CLASS(webViewClass), 734 G_SIGNAL_RUN_LAST, 735 G_STRUCT_OFFSET(WebKitWebViewClass, enter_fullscreen), 736 g_signal_accumulator_true_handled, 0, 737 webkit_marshal_BOOLEAN__VOID, 738 G_TYPE_BOOLEAN, 0); 739 740 /** 741 * WebKitWebView::leave-fullscreen: 742 * @web_view: the #WebKitWebView on which the signal is emitted. 743 * 744 * Emitted when the #WebKitWebView is about to restore its top level 745 * window out of its full screen state. This signal can be used by 746 * client code to restore widgets hidden during the 747 * #WebKitWebView::enter-fullscreen stage for instance. 748 * 749 * Returns: %TRUE to stop other handlers from being invoked for the event. 750 * %FALSE to continue emission of the event. 751 */ 752 signals[LEAVE_FULLSCREEN] = 753 g_signal_new("leave-fullscreen", 754 G_TYPE_FROM_CLASS(webViewClass), 755 G_SIGNAL_RUN_LAST, 756 G_STRUCT_OFFSET(WebKitWebViewClass, leave_fullscreen), 757 g_signal_accumulator_true_handled, 0, 758 webkit_marshal_BOOLEAN__VOID, 759 G_TYPE_BOOLEAN, 0); 709 760 } 710 761 … … 898 949 webkitWebViewRemoveLoadingWebResource(webView, resourceIdentifier); 899 950 return resource; 951 } 952 953 bool webkitWebViewEnterFullScreen(WebKitWebView* webView) 954 { 955 gboolean returnValue; 956 g_signal_emit(webView, signals[ENTER_FULLSCREEN], 0, &returnValue); 957 return !returnValue; 958 } 959 960 bool webkitWebViewLeaveFullScreen(WebKitWebView* webView) 961 { 962 gboolean returnValue; 963 g_signal_emit(webView, signals[LEAVE_FULLSCREEN], 0, &returnValue); 964 return !returnValue; 900 965 } 901 966 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h
r112221 r113697 150 150 WebKitWebResource *resource, 151 151 WebKitURIRequest *request); 152 gboolean (* enter_fullscreen) (WebKitWebView *web_view); 153 gboolean (* leave_fullscreen) (WebKitWebView *web_view); 152 154 153 155 /* Padding for future expansion */ -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
r112867 r113697 36 36 #include "WebContext.h" 37 37 #include "WebEventFactory.h" 38 #include "WebFullScreenClientGtk.h" 38 39 #include "WebKitPrivate.h" 39 40 #include "WebKitWebViewBaseAccessible.h" … … 81 82 #if ENABLE(FULLSCREEN_API) 82 83 bool fullScreenModeActive; 84 WebFullScreenClientGtk fullScreenClient; 83 85 #endif 84 86 }; … … 294 296 case GDK_KEY_F: 295 297 webkitWebViewBaseExitFullScreen(webViewBase); 296 break;298 return TRUE; 297 299 default: 298 300 break; 299 301 } 300 301 return TRUE;302 302 } 303 303 #endif … … 614 614 return; 615 615 616 if (!priv->fullScreenClient.willEnterFullScreen()) 617 return; 618 616 619 WebFullScreenManagerProxy* fullScreenManagerProxy = priv->pageProxy->fullScreenManager(); 617 618 620 fullScreenManagerProxy->willEnterFullScreen(); 619 621 … … 633 635 return; 634 636 637 if (!priv->fullScreenClient.willExitFullScreen()) 638 return; 639 635 640 WebFullScreenManagerProxy* fullScreenManagerProxy = priv->pageProxy->fullScreenManager(); 636 641 fullScreenManagerProxy->willExitFullScreen(); … … 643 648 #endif 644 649 } 650 651 void webkitWebViewBaseInitializeFullScreenClient(WebKitWebViewBase* webkitWebViewBase, const WKFullScreenClientGtk* wkClient) 652 { 653 webkitWebViewBase->priv->fullScreenClient.initialize(wkClient); 654 } -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h
r112867 r113697 29 29 #define WebKitWebViewBasePrivate_h 30 30 31 #include "WebKitPrivate.h" 31 32 #include "WebKitWebViewBase.h" 32 33 #include "WebPageProxy.h" 33 #include <WebKit2/WebKit2.h>34 34 35 35 using namespace WebKit; 36 36 37 G_BEGIN_DECLS38 39 37 WebKitWebViewBase* webkitWebViewBaseCreate(WebContext*, WebPageGroup*); 40 41 38 GtkIMContext* webkitWebViewBaseGetIMContext(WebKitWebViewBase*); 42 43 39 WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase*); 44 45 40 void webkitWebViewBaseCreateWebPage(WebKitWebViewBase*, WKContextRef, WKPageGroupRef); 46 47 41 void webkitWebViewBaseSetTooltipText(WebKitWebViewBase*, const char*); 48 49 42 void webkitWebViewBaseForwardNextKeyEvent(WebKitWebViewBase*); 50 51 43 void webkitWebViewBaseStartDrag(WebKitWebViewBase*, const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage); 52 53 44 void webkitWebViewBaseEnterFullScreen(WebKitWebViewBase*); 54 45 void webkitWebViewBaseExitFullScreen(WebKitWebViewBase*); 55 56 G_END_DECLS 46 void webkitWebViewBaseInitializeFullScreenClient(WebKitWebViewBase*, const WKFullScreenClientGtk*); 57 47 58 48 #endif // WebKitWebViewBasePrivate_h -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h
r112221 r113697 50 50 void webkitWebViewRemoveLoadingWebResource(WebKitWebView*, uint64_t resourceIdentifier); 51 51 WebKitWebResource* webkitWebViewResourceLoadFinished(WebKitWebView*, uint64_t resourceIdentifier); 52 bool webkitWebViewEnterFullScreen(WebKitWebView*); 53 bool webkitWebViewLeaveFullScreen(WebKitWebView*); 52 54 53 55 #endif // WebKitWebViewPrivate_h -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebView.cpp
r111510 r113697 513 513 } 514 514 515 class FullScreenClientTest: public WebViewTest { 516 public: 517 MAKE_GLIB_TEST_FIXTURE(FullScreenClientTest); 518 519 enum FullScreenEvent { 520 None, 521 Enter, 522 Leave 523 }; 524 525 static gboolean viewEnterFullScreenCallback(WebKitWebView*, FullScreenClientTest* test) 526 { 527 test->m_event = Enter; 528 g_main_loop_quit(test->m_mainLoop); 529 return FALSE; 530 } 531 532 static gboolean viewLeaveFullScreenCallback(WebKitWebView*, FullScreenClientTest* test) 533 { 534 test->m_event = Leave; 535 g_main_loop_quit(test->m_mainLoop); 536 return FALSE; 537 } 538 539 FullScreenClientTest() 540 : m_event(None) 541 { 542 webkit_settings_set_enable_fullscreen(webkit_web_view_get_settings(m_webView), TRUE); 543 g_signal_connect(m_webView, "enter-fullscreen", G_CALLBACK(viewEnterFullScreenCallback), this); 544 g_signal_connect(m_webView, "leave-fullscreen", G_CALLBACK(viewLeaveFullScreenCallback), this); 545 } 546 547 ~FullScreenClientTest() 548 { 549 g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this); 550 } 551 552 void requestFullScreenAndWaitUntilEnteredFullScreen() 553 { 554 m_event = None; 555 webkit_web_view_run_javascript(m_webView, "document.documentElement.webkitRequestFullScreen();", 0, 0); 556 g_main_loop_run(m_mainLoop); 557 } 558 559 static gboolean leaveFullScreenIdle(FullScreenClientTest* test) 560 { 561 test->keyStroke(GDK_KEY_Escape); 562 return FALSE; 563 } 564 565 void leaveFullScreenAndWaitUntilLeftFullScreen() 566 { 567 m_event = None; 568 g_idle_add(reinterpret_cast<GSourceFunc>(leaveFullScreenIdle), this); 569 g_main_loop_run(m_mainLoop); 570 } 571 572 FullScreenEvent m_event; 573 }; 574 575 static void testWebViewFullScreen(FullScreenClientTest* test, gconstpointer) 576 { 577 test->showInWindowAndWaitUntilMapped(); 578 test->loadHtml("<html><body>FullScreen test</body></html>", 0); 579 test->waitUntilLoadFinished(); 580 test->requestFullScreenAndWaitUntilEnteredFullScreen(); 581 g_assert_cmpint(test->m_event, ==, FullScreenClientTest::Enter); 582 test->leaveFullScreenAndWaitUntilLeftFullScreen(); 583 g_assert_cmpint(test->m_event, ==, FullScreenClientTest::Leave); 584 } 585 515 586 void beforeAll() 516 587 { … … 525 596 WebViewTest::add("WebKitWebView", "zoom-level", testWebViewZoomLevel); 526 597 WebViewTest::add("WebKitWebView", "run-javascript", testWebViewRunJavaScript); 598 FullScreenClientTest::add("WebKitWebView", "fullscreen", testWebViewFullScreen); 527 599 } 528 600 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp
r111510 r113697 199 199 } 200 200 201 void WebViewTest::keyStroke(unsigned int keyVal, unsigned int keyModifiers) 202 { 203 g_assert(m_parentWindow); 204 GtkWidget* viewWidget = GTK_WIDGET(m_webView); 205 g_assert(gtk_widget_get_realized(viewWidget)); 206 207 GOwnPtr<GdkEvent> event(gdk_event_new(GDK_KEY_PRESS)); 208 event->key.keyval = keyVal; 209 210 event->key.time = GDK_CURRENT_TIME; 211 event->key.window = gtk_widget_get_window(viewWidget); 212 g_object_ref(event->key.window); 213 gdk_event_set_device(event.get(), gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(viewWidget)))); 214 event->key.state = keyModifiers; 215 216 // When synthesizing an event, an invalid hardware_keycode value can cause it to be badly processed by GTK+. 217 GOwnPtr<GdkKeymapKey> keys; 218 int keysCount; 219 if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), keyVal, &keys.outPtr(), &keysCount)) 220 event->key.hardware_keycode = keys.get()[0].keycode; 221 222 gtk_main_do_event(event.get()); 223 event->key.type = GDK_KEY_RELEASE; 224 gtk_main_do_event(event.get()); 225 } 226 201 227 static void runJavaScriptReadyCallback(GObject*, GAsyncResult* result, WebViewTest* test) 202 228 { -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.h
r111510 r113697 48 48 49 49 void mouseMoveTo(int x, int y, unsigned int mouseModifiers = 0); 50 void keyStroke(unsigned int keyVal, unsigned int keyModifiers = 0); 50 51 51 52 WebKitJavascriptResult* runJavaScriptAndWaitUntilFinished(const char* javascript, GError**); -
trunk/Source/WebKit2/UIProcess/API/gtk/webkit2marshal.list
r112221 r113697 4 4 BOOLEAN:OBJECT,ENUM 5 5 BOOLEAN:STRING 6 BOOLEAN:VOID 6 7 OBJECT:VOID 7 8 VOID:OBJECT,UINT -
trunk/Source/WebKit2/UIProcess/gtk/WebFullScreenClientGtk.cpp
r113696 r113697 1 1 /* 2 * Copyright (C) 201 1Igalia S.L.2 * Copyright (C) 2012 Igalia S.L. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i fndef WebKitPrivate_h27 # define WebKitPrivate_h26 #include "config.h" 27 #include "WebFullScreenClientGtk.h" 28 28 29 #include <WebKit2/WKAPICast.h> 30 #include <WebKit2/WKDownload.h> 31 #include <WebKit2/WKFindOptions.h> 32 #include <WebKit2/WKRetainPtr.h> 33 #include <WebKit2/WKSerializedScriptValue.h> 34 #include <WebKit2/WKString.h> 35 #include <WebKit2/WebKit2.h> 36 #include <glib.h> 37 #include <wtf/Assertions.h> 29 #include "WKAPICast.h" 30 #include "WKSharedAPICast.h" 38 31 39 #define WEBKIT_PARAM_READABLE (static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 40 #define WEBKIT_PARAM_WRITABLE (static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 41 #define WEBKIT_PARAM_READWRITE (static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 32 namespace WebKit { 42 33 43 #define COMPILE_ASSERT_MATCHING_ENUM(webkitName, webcoreName) \ 44 COMPILE_ASSERT(int(webkitName) == int(webcoreName), mismatchingEnums) 34 bool WebFullScreenClientGtk::willEnterFullScreen() 35 { 36 if (!m_client.willEnterFullScreen) 37 return true; 45 38 46 unsigned wkEventModifiersToGdkModifiers(WKEventModifiers); 39 return m_client.willEnterFullScreen(m_client.clientInfo); 40 } 47 41 48 #endif // WebKitPrivate_h 42 bool WebFullScreenClientGtk::willExitFullScreen() 43 { 44 if (!m_client.willExitFullScreen) 45 return true; 46 47 return m_client.willExitFullScreen(m_client.clientInfo); 48 } 49 50 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/gtk/WebFullScreenClientGtk.h
r113696 r113697 1 1 /* 2 * Copyright (C) 201 1Igalia S.L.2 * Copyright (C) 2012 Igalia S.L. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef Web KitPrivate_h27 #define Web KitPrivate_h26 #ifndef WebFullScreenClientGtk_h 27 #define WebFullScreenClientGtk_h 28 28 29 #include <WebKit2/WKAPICast.h> 30 #include <WebKit2/WKDownload.h> 31 #include <WebKit2/WKFindOptions.h> 32 #include <WebKit2/WKRetainPtr.h> 33 #include <WebKit2/WKSerializedScriptValue.h> 34 #include <WebKit2/WKString.h> 35 #include <WebKit2/WebKit2.h> 36 #include <glib.h> 37 #include <wtf/Assertions.h> 29 #include "APIClient.h" 30 #include "WKFullScreenClientGtk.h" 38 31 39 #define WEBKIT_PARAM_READABLE (static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 40 #define WEBKIT_PARAM_WRITABLE (static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 41 #define WEBKIT_PARAM_READWRITE (static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)) 32 namespace WebKit { 42 33 43 #define COMPILE_ASSERT_MATCHING_ENUM(webkitName, webcoreName) \ 44 COMPILE_ASSERT(int(webkitName) == int(webcoreName), mismatchingEnums) 34 class APIObject; 45 35 46 unsigned wkEventModifiersToGdkModifiers(WKEventModifiers); 36 class WebFullScreenClientGtk : public APIClient<WKFullScreenClientGtk, kWKFullScreenClientGtkCurrentVersion> { 37 public: 38 bool willEnterFullScreen(); 39 bool willExitFullScreen(); 40 }; 47 41 48 #endif // WebKitPrivate_h 42 } // namespace WebKit 43 44 #endif // WebFullScreenClientGtk_h
Note: See TracChangeset
for help on using the changeset viewer.