Changeset 90015 in webkit


Ignore:
Timestamp:
Jun 29, 2011 7:12:54 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-29 Michal Pakula vel Rutka <Michał Pakuła vel Rutka>

Reviewed by Kenneth Rohde Christiansen.

[EFL] Add ewk_frame_text_selection_type_get function
https://bugs.webkit.org/show_bug.cgi?id=63462

Add a method to obtain current WebCore::VisibleSelection text
selection type.

  • ewk/ewk_frame.cpp: (ewk_frame_text_selection_type_get):
  • ewk/ewk_frame.h:
Location:
trunk/Source/WebKit/efl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r89920 r90015  
     12011-06-29  Michal Pakula vel Rutka  <m.pakula@samsung.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [EFL] Add ewk_frame_text_selection_type_get function
     6        https://bugs.webkit.org/show_bug.cgi?id=63462
     7
     8        Add a method to obtain current WebCore::VisibleSelection text
     9        selection type.
     10
     11        * ewk/ewk_frame.cpp:
     12        (ewk_frame_text_selection_type_get):
     13        * ewk/ewk_frame.h:
     14
    1152011-06-28  Michal Pakula vel Rutka  <m.pakula@samsung.com>
    216
  • trunk/Source/WebKit/efl/ewk/ewk_frame.cpp

    r89920 r90015  
    15261526}
    15271527
     1528/**
     1529 * Returns current text selection type.
     1530 *
     1531 * @param o a frame object to check selection type
     1532 * @return Current text selection type on success or no selection otherwise
     1533 */
     1534Ewk_Text_Selection_Type ewk_frame_text_selection_type_get(Evas_Object *o)
     1535{
     1536    EWK_FRAME_SD_GET_OR_RETURN(o, sd, EWK_TEXT_SELECTION_NONE);
     1537    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EWK_TEXT_SELECTION_NONE);
     1538
     1539    WebCore::FrameSelection* controller = sd->frame->selection();
     1540    if (!controller)
     1541        return EWK_TEXT_SELECTION_NONE;
     1542
     1543    switch (controller->selectionType()) {
     1544    case WebCore::VisibleSelection::CaretSelection:
     1545        return EWK_TEXT_SELECTION_CARET;
     1546    case WebCore::VisibleSelection::RangeSelection:
     1547        return EWK_TEXT_SELECTION_RANGE;
     1548    default:
     1549        return EWK_TEXT_SELECTION_NONE;
     1550    }
     1551}
     1552
    15281553/* internal methods ****************************************************/
    15291554
  • trunk/Source/WebKit/efl/ewk/ewk_frame.h

    r89721 r90015  
    155155};
    156156
     157typedef enum {
     158    EWK_TEXT_SELECTION_NONE,
     159    EWK_TEXT_SELECTION_CARET,
     160    EWK_TEXT_SELECTION_RANGE
     161} Ewk_Text_Selection_Type;
     162
    157163EAPI Evas_Object *ewk_frame_view_get(const Evas_Object *o);
    158164
     
    226232EAPI Eina_Bool    ewk_frame_feed_key_up(Evas_Object *o, const Evas_Event_Key_Up *ev);
    227233
     234EAPI Ewk_Text_Selection_Type ewk_frame_text_selection_type_get(Evas_Object* o);
     235
    228236
    229237#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.