Changeset 48506 in webkit
- Timestamp:
- Sep 18, 2009 6:53:22 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r48505 r48506 1 2009-09-14 Xan Lopez <xlopez@igalia.com> 1 2009-09-18 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Gustavo Noronha and Jan Alonzo. 4 5 [GTK] context menu overriding API is very limited 6 https://bugs.webkit.org/show_bug.cgi?id=27546 7 8 Add new tests to the build. 9 10 * GNUmakefile.am: 11 12 2009-09-18 Xan Lopez <xlopez@igalia.com> 2 13 3 14 Reviewed by Gustavo Noronha and Jan Alonzo. -
trunk/GNUmakefile.am
r48505 r48506 543 543 Programs/unittests/testdownload \ 544 544 Programs/unittests/testatk \ 545 Programs/unittests/testhittestresult \ 545 546 Programs/unittests/testwebsettings \ 546 547 Programs/unittests/testwebresource \ … … 610 611 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags) 611 612 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd) 613 614 Programs_unittests_testhittestresult_SOURCES = WebKit/gtk/tests/testhittestresult.c 615 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags) 616 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd) 612 617 613 618 # Autogenerated sources -
trunk/WebKit/gtk/ChangeLog
r48505 r48506 1 2009-09-18 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Gustavo Noronha and Jan Alonzo. 4 5 [GTK] context menu overriding API is very limited 6 https://bugs.webkit.org/show_bug.cgi?id=27546 7 8 Add webkit_web_view_get_hit_test_result, a function to get a hit 9 test result from a GdkEventButton. Useful to let applications 10 decide between several actions on button press depending on what 11 is being pressed. 12 13 * webkit/webkitwebview.cpp: 14 (webkit_web_view_stop_loading): 15 (documentPointForWindowPoint): 16 (webkit_web_view_get_hit_test_result): 17 * webkit/webkitwebview.h: 18 1 19 2009-09-18 Xan Lopez <xlopez@igalia.com> 2 20 -
trunk/WebKit/gtk/webkit/webkitwebview.cpp
r48383 r48506 63 63 #include "FrameLoader.h" 64 64 #include "FrameView.h" 65 #include "MouseEventWithHitTestResults.h" 65 66 #include "PasteboardHelper.h" 66 67 #include "PlatformKeyboardEvent.h" … … 68 69 #include "ProgressTracker.h" 69 70 #include "ResourceHandle.h" 71 #include "RenderView.h" 70 72 #include "ScriptValue.h" 71 73 #include "Scrollbar.h" … … 3027 3029 3028 3030 if (FrameLoader* loader = frame->loader()) 3029 loader->stop AllLoaders();3031 loader->stopForUserCancel(); 3030 3032 } 3031 3033 … … 3912 3914 return g_list_remove(subResources, priv->mainResource); 3913 3915 } 3916 3917 /* From EventHandler.cpp */ 3918 static IntPoint documentPointForWindowPoint(Frame* frame, const IntPoint& windowPoint) 3919 { 3920 FrameView* view = frame->view(); 3921 // FIXME: Is it really OK to use the wrong coordinates here when view is 0? 3922 // Historically the code would just crash; this is clearly no worse than that. 3923 return view ? view->windowToContents(windowPoint) : windowPoint; 3924 } 3925 3926 /** 3927 * webkit_web_view_get_hit_test_result: 3928 * @webView: a #WebKitWebView 3929 * @event: a #GdkEventButton 3930 * 3931 * Does a 'hit test' in the coordinates specified by @event to figure 3932 * out context information about that position in the @webView. 3933 * 3934 * Returns: a newly created #WebKitHitTestResult with the context of the 3935 * specified position. 3936 * 3937 * Since: 1.1.15 3938 **/ 3939 WebKitHitTestResult* webkit_web_view_get_hit_test_result(WebKitWebView* webView, GdkEventButton* event) 3940 { 3941 g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), NULL); 3942 g_return_val_if_fail(event, NULL); 3943 3944 PlatformMouseEvent mouseEvent = PlatformMouseEvent(event); 3945 Frame* frame = core(webView)->mainFrame(); 3946 HitTestRequest request(HitTestRequest::Active); 3947 IntPoint documentPoint = documentPointForWindowPoint(frame, mouseEvent.pos()); 3948 MouseEventWithHitTestResults mev = frame->document()->prepareMouseEvent(request, documentPoint, mouseEvent); 3949 3950 return kit(mev.hitTestResult()); 3951 } -
trunk/WebKit/gtk/webkit/webkitwebview.h
r47865 r48506 364 364 webkit_web_view_get_view_source_mode (WebKitWebView *web_view); 365 365 366 WEBKIT_API WebKitHitTestResult* 367 webkit_web_view_get_hit_test_result (WebKitWebView *webView, 368 GdkEventButton *event); 366 369 G_END_DECLS 367 370
Note: See TracChangeset
for help on using the changeset viewer.