Bug 61996 - [EFL] Paragraph selection API
Summary: [EFL] Paragraph selection API
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Linux
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-03 00:44 PDT by Grzegorz Czajkowski
Modified: 2017-03-11 10:36 PST (History)
10 users (show)

See Also:


Attachments
patch (4.83 KB, patch)
2011-06-03 00:47 PDT, Grzegorz Czajkowski
leandro: review-
Details | Formatted Diff | Diff
updated patch (4.83 KB, patch)
2011-06-06 01:41 PDT, Grzegorz Czajkowski
no flags Details | Formatted Diff | Diff
updated patch (4.69 KB, patch)
2011-08-24 06:00 PDT, Grzegorz Czajkowski
rakuco: review-
Details | Formatted Diff | Diff
updated patch (4.74 KB, patch)
2012-01-16 05:32 PST, Grzegorz Czajkowski
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Czajkowski 2011-06-03 00:44:00 PDT
API allows to:
 - get size and position of paragraph for the given point,
 - check if two points are located in the same paragraph.

It doesn't draw anything on WebKit's context just returns needed information to point out a client application html block.

I am wondering whether it's a good place for function ewk_frame_paragraph_rect_get. Maybe this functionality should be moved somewhere in WebCore (like functions enclosingBlock() or inSameParagraph).
Comment 1 Grzegorz Czajkowski 2011-06-03 00:47:43 PDT
Created attachment 95865 [details]
patch
Comment 2 Leandro Pereira 2011-06-03 10:00:43 PDT
Comment on attachment 95865 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95865&action=review

What would be a plausible use case for these features?

> Source/WebKit/efl/ewk/ewk_frame.cpp:1641
> +Eina_Bool ewk_frame_points_contained_same_paragraph_check(Evas_Object* o, int x1, int y1, int x2, int y2)

How about calling this ewk_frame_points_in_same_paragraph_get()?
Comment 3 Grzegorz Czajkowski 2011-06-06 00:25:11 PDT
(In reply to comment #2)
> (From update of attachment 95865 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=95865&action=review
> 
> What would be a plausible use case for these features?

One of a possible scenario:
1. User starts to select text using WebKit's selection.
2. If user reaches end of current paragraph then whole paragraph is selected as rectangle.
3. UI application shows handles to control paragraph's selection.

> 
> > Source/WebKit/efl/ewk/ewk_frame.cpp:1641
> > +Eina_Bool ewk_frame_points_contained_same_paragraph_check(Evas_Object* o, int x1, int y1, int x2, int y2)
> 
> How about calling this ewk_frame_points_in_same_paragraph_get()?

Ok.
Comment 4 Grzegorz Czajkowski 2011-06-06 01:41:00 PDT
Created attachment 96069 [details]
updated patch

Function's name has been changed to frame_points_in_same_paragraph_get
Comment 5 Gyuyoung Kim 2011-06-09 17:14:18 PDT
LGTM.
Comment 6 Grzegorz Czajkowski 2011-08-24 06:00:23 PDT
Created attachment 104987 [details]
updated patch

Just re-base old patch and adjust it to the current changes.
Comment 7 Raphael Kubo da Costa (:rakuco) 2012-01-01 13:49:03 PST
Comment on attachment 104987 [details]
updated patch

r- for now as at least the coding style and the documentation (the [in] and [out] are not needed) need to be adjusted.

The functions themselves look very specific to me, but that can be discussed later (it'd be good to have the opinion of someone who works on editing code, for example).
Comment 8 Grzegorz Czajkowski 2012-01-16 05:32:12 PST
Created attachment 122619 [details]
updated patch

I adjusted patch to new WebKit-Efl coding style.
Comment 9 Gyuyoung Kim 2012-03-12 02:33:57 PDT
Comment on attachment 122619 [details]
updated patch

View in context: https://bugs.webkit.org/attachment.cgi?id=122619&action=review

Looks good to me except for API naming I mentioned.

> Source/WebKit/efl/ewk/ewk_frame.h:908
> +EAPI Eina_Bool ewk_frame_points_in_same_paragraph_get(const Evas_Object *o, int x1, int y1, int x2, int y2);

I'm not sure whether this API naming is good.
Comment 10 Gyuyoung Kim 2012-08-27 18:45:28 PDT
Comment on attachment 122619 [details]
updated patch

Cleared review? from attachment 122619 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Comment 11 Michael Catanzaro 2017-03-11 10:36:22 PST
Closing this bug because the EFL port has been removed from trunk.

If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.