Bug 95444

Summary: [EFL] Simplify FrameLoaderClientEfl by adding a private method.
Product: WebKit Reporter: Jinwoo Song <jinwoo7.song>
Component: WebKit EFLAssignee: Jinwoo Song <jinwoo7.song>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, gyuyoung.kim, kangil.han, lucas.de.marchi, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
patch
none
patch.
none
patch.
none
patch.
none
patch. none

Jinwoo Song
Reported 2012-08-30 04:38:49 PDT
In the FrameLoaderClientEfl, the codes which checks that if current frame is main frame are frequently used. This patch adds a private method and replaces those codes with the method to simplify.
Attachments
patch (4.78 KB, patch)
2012-08-30 04:44 PDT, Jinwoo Song
no flags
patch. (4.85 KB, patch)
2012-08-31 01:20 PDT, Jinwoo Song
no flags
patch. (4.85 KB, patch)
2012-08-31 01:39 PDT, Jinwoo Song
no flags
patch. (4.58 KB, patch)
2012-08-31 02:00 PDT, Jinwoo Song
no flags
patch. (4.58 KB, patch)
2012-08-31 03:56 PDT, Jinwoo Song
no flags
Jinwoo Song
Comment 1 2012-08-30 04:44:15 PDT
Chris Dumez
Comment 2 2012-08-30 05:06:25 PDT
Comment on attachment 161441 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=161441&action=review > Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp:1057 > +bool FrameLoaderClientEfl::isMainFrame() const Sounds like a good idea but the name is not explicit enough IMO. How about "isLoadingMainFrame()" ?
Gyuyoung Kim
Comment 3 2012-08-30 05:13:02 PDT
Comment on attachment 161441 [details] patch From the refactoring view, looks good. But, this checking is used by ChromeClientEfl, DumpRenderTreeSupportEfl as well. IMO, it would be good if this patch covers them as well.
Jinwoo Song
Comment 4 2012-08-30 05:33:14 PDT
(In reply to comment #2) > (From update of attachment 161441 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=161441&action=review > > > Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp:1057 > > +bool FrameLoaderClientEfl::isMainFrame() const > > Sounds like a good idea but the name is not explicit enough IMO. How about "isLoadingMainFrame()" ? I agree to you and will change the name as your suggestion. Thanks for nice name.
Jinwoo Song
Comment 5 2012-08-31 01:17:07 PDT
(In reply to comment #3) > (From update of attachment 161441 [details]) > From the refactoring view, looks good. But, this checking is used by ChromeClientEfl, DumpRenderTreeSupportEfl as well. IMO, it would be good if this patch covers them as well. Okay, I'll do refactoring for the ChromeClientEfl and DumpRenderTreeSupportEfl, too. But as the aspect is different and this patch cannot cover them, I'll cover them in another bug.
Jinwoo Song
Comment 6 2012-08-31 01:20:16 PDT
Gyuyoung Kim
Comment 7 2012-08-31 01:29:44 PDT
Comment on attachment 161635 [details] patch. View in context: https://bugs.webkit.org/attachment.cgi?id=161635&action=review > Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h:227 > + bool isLoadingMainFrame() const; Generally, function is placed before member variable.
Jinwoo Song
Comment 8 2012-08-31 01:39:54 PDT
Jinwoo Song
Comment 9 2012-08-31 01:40:08 PDT
(In reply to comment #7) > (From update of attachment 161635 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=161635&action=review > > > Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h:227 > > + bool isLoadingMainFrame() const; > > Generally, function is placed before member variable. Done.
Raphael Kubo da Costa (:rakuco)
Comment 10 2012-08-31 01:42:05 PDT
Comment on attachment 161638 [details] patch. View in context: https://bugs.webkit.org/attachment.cgi?id=161638&action=review > Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp:1060 > +bool FrameLoaderClientEfl::isLoadingMainFrame() const > +{ > + return m_frame == ewk_view_frame_main_get(m_view); > +} This looks simple enough to be declared inline.
Jinwoo Song
Comment 11 2012-08-31 02:00:08 PDT
Jinwoo Song
Comment 12 2012-08-31 02:01:05 PDT
(In reply to comment #10) > (From update of attachment 161638 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=161638&action=review > > > Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp:1060 > > +bool FrameLoaderClientEfl::isLoadingMainFrame() const > > +{ > > + return m_frame == ewk_view_frame_main_get(m_view); > > +} > > This looks simple enough to be declared inline. Done.
Gyuyoung Kim
Comment 13 2012-08-31 03:35:53 PDT
Comment on attachment 161642 [details] patch. View in context: https://bugs.webkit.org/attachment.cgi?id=161642&action=review > Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h:214 > + bool isLoadingMainFrame() const { return m_frame == ewk_view_frame_main_get(m_view); } Add a new line.
Jinwoo Song
Comment 14 2012-08-31 03:56:04 PDT
Jinwoo Song
Comment 15 2012-08-31 03:56:44 PDT
(In reply to comment #13) > (From update of attachment 161642 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=161642&action=review > > > Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h:214 > > + bool isLoadingMainFrame() const { return m_frame == ewk_view_frame_main_get(m_view); } > > Add a new line. Done.
WebKit Review Bot
Comment 16 2012-08-31 04:35:03 PDT
Comment on attachment 161655 [details] patch. Clearing flags on attachment: 161655 Committed r127244: <http://trac.webkit.org/changeset/127244>
WebKit Review Bot
Comment 17 2012-08-31 04:35:08 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.