Changeset 98378 in webkit
- Timestamp:
- Oct 25, 2011, 12:45:27 PM (15 years ago)
- Location:
- trunk/Source/WebKit/efl
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
ewk/ewk_frame.cpp (modified) (1 diff)
-
ewk/ewk_frame.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r98376 r98378 1 2011-10-25 Ivan Briano <ivan@profusion.mobi> 2 3 [EFL] Add function to get geometry of focused element 4 https://bugs.webkit.org/show_bug.cgi?id=70728 5 6 Reviewed by Antonio Gomes. 7 8 Added function to ewk_frame to get the geometry of the focused 9 element within the frame object. 10 11 * ewk/ewk_frame.cpp: 12 (ewk_frame_focused_element_geometry_get): Retrieves the geometry of 13 the focused element within the given frame object. 14 * ewk/ewk_frame.h: 15 1 16 2011-10-25 Ivan Briano <ivan@profusion.mobi> 2 17 -
trunk/Source/WebKit/efl/ewk/ewk_frame.cpp
r98190 r98378 827 827 } 828 828 829 Eina_Bool ewk_frame_focused_element_geometry_get(const Evas_Object *ewkFrame, int *x, int *y, int *w, int *h) 830 { 831 EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, EINA_FALSE); 832 WebCore::Document* document = smartData->frame->document(); 833 if (!document) 834 return EINA_FALSE; 835 WebCore::Node* focusedNode = document->focusedNode(); 836 if (!focusedNode) 837 return EINA_FALSE; 838 WebCore::IntRect nodeRect = focusedNode->getRect(); 839 if (x) 840 *x = nodeRect.x(); 841 if (y) 842 *y = nodeRect.y(); 843 if (w) 844 *w = nodeRect.width(); 845 if (h) 846 *h = nodeRect.height(); 847 return EINA_TRUE; 848 } 849 829 850 Eina_Bool ewk_frame_feed_mouse_wheel(Evas_Object* ewkFrame, const Evas_Event_Mouse_Wheel* wheelEvent) 830 851 { -
trunk/Source/WebKit/efl/ewk/ewk_frame.h
r97043 r98378 702 702 703 703 /** 704 * Gets the geometry, relative to the frame, of the focused element in the 705 * document. 706 * 707 * @param o frame object containing the focused element 708 * @param x pointer where to store the X value of the geometry, may be @c 0 709 * @param x pointer where to store the Y value of the geometry, may be @c 0 710 * @param x pointer where to store width of the geometry, may be @c 0 711 * @param x pointer where to store height of the geometry, may be @c 0 712 * 713 * @return @c EINA_TRUE if the frame contains the currently focused element and 714 * its geometry was correctly fetched, @c EINA_FALSE in any other case 715 */ 716 EAPI Eina_Bool ewk_frame_focused_element_geometry_get(const Evas_Object *o, int *x, int *y, int *w, int *h); 717 718 /** 704 719 * Feeds the mouse wheel event to the frame. 705 720 *
Note:
See TracChangeset
for help on using the changeset viewer.