Bug 104329 - [EFL] Refactor duplicate code into EflInspectorUtilities
Summary: [EFL] Refactor duplicate code into EflInspectorUtilities
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-06 17:38 PST by Seokju Kwon
Modified: 2012-12-12 16:06 PST (History)
5 users (show)

See Also:


Attachments
Patch (7.69 KB, patch)
2012-12-08 09:57 PST, Seokju Kwon
no flags Details | Formatted Diff | Diff
Patch (7.64 KB, patch)
2012-12-10 07:13 PST, Seokju Kwon
no flags Details | Formatted Diff | Diff
Patch (9.97 KB, patch)
2012-12-12 06:39 PST, Seokju Kwon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seokju Kwon 2012-12-06 17:38:33 PST
Remove duplicated work to get the resource path for inspector.
Comment 1 Seokju Kwon 2012-12-08 09:57:13 PST
Created attachment 178362 [details]
Patch
Comment 2 Gyuyoung Kim 2012-12-09 19:30:46 PST
Comment on attachment 178362 [details]
Patch

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

> Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp:143
> +    return ASCIILiteral("file://") + getInspectorResourcePath();

In concatenation case, it looks that "file://" + getInspectorResourcePath() is enough, doesn't it ?

> Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp:165
> +    return ASCIILiteral("file://") + WebCore::getInspectorResourcePath();

ditto.
Comment 3 Ryuan Choi 2012-12-09 21:26:36 PST
Comment on attachment 178362 [details]
Patch

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

> Source/WebCore/platform/efl/FileSystemEfl.cpp:121
> +String getInspectorResourcePath()
> +{

Can we guard this function in ENABLE(INSPECTOR).
Comment 4 Seokju Kwon 2012-12-10 06:26:02 PST
(In reply to comment #2)
> (From update of attachment 178362 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=178362&action=review
> 
> > Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp:143
> > +    return ASCIILiteral("file://") + getInspectorResourcePath();
> 
> In concatenation case, it looks that "file://" + getInspectorResourcePath() is enough, doesn't it ?
> 
> > Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp:165
> > +    return ASCIILiteral("file://") + WebCore::getInspectorResourcePath();
> 
> ditto.

I will remove ASCIILiteral().
Comment 5 Seokju Kwon 2012-12-10 06:27:42 PST
(In reply to comment #3)
> (From update of attachment 178362 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=178362&action=review
> 
> > Source/WebCore/platform/efl/FileSystemEfl.cpp:121
> > +String getInspectorResourcePath()
> > +{
> 
> Can we guard this function in ENABLE(INSPECTOR).

I'll move it.
Comment 6 Seokju Kwon 2012-12-10 07:13:34 PST
Created attachment 178544 [details]
Patch
Comment 7 Gyuyoung Kim 2012-12-10 18:04:15 PST
Comment on attachment 178544 [details]
Patch

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

Almost looks good to me.

> Source/WebCore/platform/FileSystem.h:233
> +String getInspectorResourcePath();

I think *inspectorResourcePath* is better according to webkit coding style guideline

Precede setters with the word "set". Use bare words for getters. Setter and getter names should match the names of the variables being set/gotten.
Right:
void setCount(size_t); // sets m_count
size_t count(); // returns m_count

Wrong:
void setCount(size_t); // sets m_theCount
size_t getCount();
Comment 8 Gyuyoung Kim 2012-12-10 18:16:47 PST
Comment on attachment 178544 [details]
Patch

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

>> Source/WebCore/platform/FileSystem.h:233
>> +String getInspectorResourcePath();
> 
> I think *inspectorResourcePath* is better according to webkit coding style guideline
> 
> Precede setters with the word "set". Use bare words for getters. Setter and getter names should match the names of the variables being set/gotten.
> Right:
> void setCount(size_t); // sets m_count
> size_t count(); // returns m_count
> 
> Wrong:
> void setCount(size_t); // sets m_theCount
> size_t getCount();

As we talked on irc, we need to find proper place for this utility function.
Comment 9 Seokju Kwon 2012-12-12 06:39:52 PST
Created attachment 179029 [details]
Patch
Comment 10 Seokju Kwon 2012-12-12 06:41:49 PST
(In reply to comment #8)
> (From update of attachment 178544 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=178544&action=review
> 
> >> Source/WebCore/platform/FileSystem.h:233
> >> +String getInspectorResourcePath();
> > 
> > I think *inspectorResourcePath* is better according to webkit coding style guideline
> > 
> > Precede setters with the word "set". Use bare words for getters. Setter and getter names should match the names of the variables being set/gotten.
> > Right:
> > void setCount(size_t); // sets m_count
> > size_t count(); // returns m_count
> > 
> > Wrong:
> > void setCount(size_t); // sets m_theCount
> > size_t getCount();
> 
> As we talked on irc, we need to find proper place for this utility function.

All done.
- Change function name.
- Move duplicate work into EflInspectorUtilities.

Please leave the comment, if you has a proper place for it.
If not, I will move it into EflInspectorUtilities for consistency.
Comment 11 Ryuan Choi 2012-12-12 15:51:34 PST
Comment on attachment 179029 [details]
Patch

Good
Comment 12 WebKit Review Bot 2012-12-12 16:06:52 PST
Comment on attachment 179029 [details]
Patch

Clearing flags on attachment: 179029

Committed r137531: <http://trac.webkit.org/changeset/137531>
Comment 13 WebKit Review Bot 2012-12-12 16:06:58 PST
All reviewed patches have been landed.  Closing bug.