Bug 64259 - [EFL] Implement EditorClientEfl::respondToChangedContents
Summary: [EFL] Implement EditorClientEfl::respondToChangedContents
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P4 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 03:51 PDT by Michal Pakula vel Rutka
Modified: 2011-07-29 19:00 PDT (History)
5 users (show)

See Also:


Attachments
proposed patch (3.89 KB, patch)
2011-07-11 03:54 PDT, Michal Pakula vel Rutka
no flags Details | Formatted Diff | Diff
fixed changelog (3.89 KB, patch)
2011-07-11 04:01 PDT, Michal Pakula vel Rutka
no flags Details | Formatted Diff | Diff
changes according to Raphael's suggestions (5.05 KB, patch)
2011-07-11 08:11 PDT, Michal Pakula vel Rutka
tonikitoo: review+
Details | Formatted Diff | Diff
changed frame check in editorclientefl (5.11 KB, patch)
2011-07-29 05:55 PDT, Michal Pakula vel Rutka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Pakula vel Rutka 2011-07-11 03:51:46 PDT
Implements EditorClientEfl::respondToChangedContents by calling callback both from ewk_frame and ewk_view with frame and view objects respectively.
Comment 1 Michal Pakula vel Rutka 2011-07-11 03:54:04 PDT
Created attachment 100260 [details]
proposed patch
Comment 2 WebKit Review Bot 2011-07-11 03:56:38 PDT
Attachment 100260 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/efl/ChangeLog', u'Source/Web..." exit_code: 1

Source/WebKit/efl/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Michal Pakula vel Rutka 2011-07-11 04:01:49 PDT
Created attachment 100261 [details]
fixed changelog
Comment 4 Raphael Kubo da Costa (:rakuco) 2011-07-11 06:05:46 PDT
Informal r- to address these small issues:

LGTM in general, however I think these new signals should be documented in ewk_frame.h and ewk_view.h even though the functions which emit them are marked as internal, as the signals are emitted publicly anyway.

> Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp:125
> +    Evas_Object* frame = ewk_view_frame_focused_get(m_view);

Doing it like this should make the code a bit shorter:

  Evas_Object* frame = ewk_view_frame_focused_get(m_view) ? ewk_view_frame_focused_get(m_view) : ewk_view_frame_main_get(m_view);

> Source/WebKit/efl/ewk/ewk_private.h:115
> +void ewk_view_editor_client_contents_changed(Evas_Object* o);

Nitpick: this declaration could come before the one above it so that they are sorted alphabetically.

> Source/WebKit/efl/ewk/ewk_private.h:184
> +void ewk_frame_editor_client_contents_changed(Evas_Object* o);

Nitpick: this declaration could come before the one above it so that they are sorted alphabetically.
Comment 5 Michal Pakula vel Rutka 2011-07-11 06:21:15 PDT
(In reply to comment #4)
> Informal r- to address these small issues:
> 
> LGTM in general, however I think these new signals should be documented in ewk_frame.h and ewk_view.h even though the functions which emit them are marked as internal, as the signals are emitted publicly anyway.

OK I see, should I add documentation for 'editorclient,selection,changed' in this or another patch, as I haven't added it before?

> 
> > Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp:125
> > +    Evas_Object* frame = ewk_view_frame_focused_get(m_view);
> 
> Doing it like this should make the code a bit shorter:
> 
>   Evas_Object* frame = ewk_view_frame_focused_get(m_view) ? ewk_view_frame_focused_get(m_view) : ewk_view_frame_main_get(m_view);
> 

OK

> > Source/WebKit/efl/ewk/ewk_private.h:115
> > +void ewk_view_editor_client_contents_changed(Evas_Object* o);
> 
> Nitpick: this declaration could come before the one above it so that they are sorted alphabetically.
> 
> > Source/WebKit/efl/ewk/ewk_private.h:184
> > +void ewk_frame_editor_client_contents_changed(Evas_Object* o);
> 
> Nitpick: this declaration could come before the one above it so that they are sorted alphabetically.

OK
Comment 6 Raphael Kubo da Costa (:rakuco) 2011-07-11 06:35:29 PDT
(In reply to comment #5)
> OK I see, should I add documentation for 'editorclient,selection,changed' in this or another patch, as I haven't added it before?

Sorry, I meant the signals you added in this patch ("editorclient,contents,changed"). As for the "editorclient,selection,changed" signal, I suspect there are more undocumented signals being emitted, and they should go in a separate patch.

BTW, I forgot to mention one thing:

> Source/WebKit/efl/ewk/ewk_view.cpp:4593
> + * Reports the view that editor client contents were changed.

the view -> to the view
editor client contents -> the editor client's contents
Comment 7 Michal Pakula vel Rutka 2011-07-11 08:11:01 PDT
Created attachment 100303 [details]
changes according to Raphael's suggestions
Comment 8 Raphael Kubo da Costa (:rakuco) 2011-07-11 08:42:21 PDT
LGTM.
Comment 9 Antonio Gomes 2011-07-22 07:59:23 PDT
Comment on attachment 100303 [details]
changes according to Raphael's suggestions

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

> Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp:125
> +    Evas_Object* frame = ewk_view_frame_focused_get(m_view) ? ewk_view_frame_focused_get(m_view) : ewk_view_frame_main_get(m_view);

I would not call the getter twice here.
Comment 10 Michal Pakula vel Rutka 2011-07-25 06:42:38 PDT
Comment on attachment 100303 [details]
changes according to Raphael's suggestions

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

>> Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp:125
>> +    Evas_Object* frame = ewk_view_frame_focused_get(m_view) ? ewk_view_frame_focused_get(m_view) : ewk_view_frame_main_get(m_view);
> 
> I would not call the getter twice here.

OK, should I do it this way:

Evas_Object* frame = ewk_view_frame_focused_get(m_view);
frame = frame ? frame : ewk_view_frame_main_get(m_view);

or get back to if?
Comment 11 Raphael Kubo da Costa (:rakuco) 2011-07-25 09:19:57 PDT
Given he's already given an r+, I think you could also leave it as-is.
Comment 12 Gyuyoung Kim 2011-07-25 22:10:16 PDT
(In reply to comment #11)
> Given he's already given an r+, I think you could also leave it as-is.

I think this is not big work. Why don't we fix antonio's comment before landing this patch ? 

Michal,

Could you update this patch based on comment #10 ? Please fill review field in ChangeLog as below,

Reviewed by NOBODY (OOPS!). => Reviewed by Antonio Gomes.

Then, please request only cq.
Comment 13 Michal Pakula vel Rutka 2011-07-27 07:11:51 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > Given he's already given an r+, I think you could also leave it as-is.
> 
> I think this is not big work. Why don't we fix antonio's comment before landing this patch ? 
> 
> Michal,
> 
> Could you update this patch based on comment #10 ? Please fill review field in ChangeLog as below,
> 
> Reviewed by NOBODY (OOPS!). => Reviewed by Antonio Gomes.
> 
> Then, please request only cq.

I am bit confused... I know that is not a big work, but I want to get Antonio's confirmation first. Anyway until then I am leaving it as it is.
Comment 14 Gyuyoung Kim 2011-07-27 22:42:40 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > Given he's already given an r+, I think you could also leave it as-is.
> > 
> > I think this is not big work. Why don't we fix antonio's comment before landing this patch ? 
> > 
> > Michal,
> > 
> > Could you update this patch based on comment #10 ? Please fill review field in ChangeLog as below,
> > 
> > Reviewed by NOBODY (OOPS!). => Reviewed by Antonio Gomes.
> > 
> > Then, please request only cq.
> 
> I am bit confused... I know that is not a big work, but I want to get Antonio's confirmation first. Anyway until then I am leaving it as it is.

Antonio already gave r+. But, he pointed minor problem in this patch. So, if you fix it, AFAIK, you don't need to get r+ again. But, frankly, I am not sure if this fix is minor problem. If you think it is better to get r+ from Antonio again, please request r?/cq? again when you submit updated patch.
Comment 15 Michal Pakula vel Rutka 2011-07-29 05:55:21 PDT
Created attachment 102353 [details]
changed frame check in editorclientefl
Comment 16 WebKit Review Bot 2011-07-29 19:00:50 PDT
Comment on attachment 102353 [details]
changed frame check in editorclientefl

Clearing flags on attachment: 102353

Committed r92039: <http://trac.webkit.org/changeset/92039>
Comment 17 WebKit Review Bot 2011-07-29 19:00:56 PDT
All reviewed patches have been landed.  Closing bug.