Bug 50217 - [WINCE] add main() function
Summary: [WINCE] add main() function
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Patrick R. Gansterer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-30 02:49 PST by Patrick R. Gansterer
Modified: 2010-12-01 08:51 PST (History)
2 users (show)

See Also:


Attachments
Patch (4.33 KB, patch)
2010-11-30 02:53 PST, Patrick R. Gansterer
aroben: review-
aroben: commit-queue-
Details | Formatted Diff | Diff
Patch (4.85 KB, patch)
2010-11-30 08:36 PST, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2010-11-30 02:49:54 PST
see patch
Comment 1 Patrick R. Gansterer 2010-11-30 02:53:39 PST
Created attachment 75118 [details]
Patch
Comment 2 WebKit Review Bot 2010-11-30 02:56:39 PST
Attachment 75118 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebKit/wince/main.cpp']" exit_code: 1
WebKit/wince/main.cpp:26:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit/wince/main.cpp:117:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 2 in 1 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Adam Roben (:aroben) 2010-11-30 07:08:58 PST
Comment on attachment 75118 [details]
Patch

It doesn't seem appropriate to have a full browser in WebKit itself. Perhaps you should move this code to a new WebKitTools/WinCELauncher directory.
Comment 4 Patrick R. Gansterer 2010-11-30 08:36:54 PST
Created attachment 75152 [details]
Patch

(In reply to comment #3)
> (From update of attachment 75118 [details])
> It doesn't seem appropriate to have a full browser in WebKit itself. Perhaps you should move this code to a new WebKitTools/WinCELauncher directory.
Uuups, now in the corret directory and with ChangeLog.
Comment 5 WebKit Review Bot 2010-11-30 08:39:46 PST
Attachment 75152 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebKitTools/ChangeLog', u'WebKitTools/WinCELauncher/main.cpp']" exit_code: 1
WebKitTools/WinCELauncher/main.cpp:26:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKitTools/WinCELauncher/main.cpp:117:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Adam Roben (:aroben) 2010-12-01 06:45:03 PST
Comment on attachment 75152 [details]
Patch

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

> WebKitTools/WinCELauncher/main.cpp:103
> +    if (fullscreen)
> +        SetWindowPos(hMainWindow, HWND_TOPMOST, 0, 0, GetSystemMetrics(SM_CXSCREEN),
> +            GetSystemMetrics(SM_CYSCREEN), SWP_SHOWWINDOW);

This should be enclosed in braces, since it is more than one line (even though it's only a single statement).

> WebKitTools/WinCELauncher/main.cpp:123
> +    delete webView;

Could you use an OwnPtr here?
Comment 7 Adam Roben (:aroben) 2010-12-01 06:45:46 PST
(In reply to comment #5)
> Attachment 75152 [details] did not pass style-queue:
> 
> Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebKitTools/ChangeLog', u'WebKitTools/WinCELauncher/main.cpp']" exit_code: 1
> WebKitTools/WinCELauncher/main.cpp:26:  Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
> WebKitTools/WinCELauncher/main.cpp:117:  One line control clauses should not use braces.  [whitespace/braces] [4]
> Total errors found: 2 in 2 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

You should change WebKitTools/Scripts/webkitpy/style/checkers.py to exclude the build/include_order rule when checking the WinCELauncher directory.
Comment 8 Patrick R. Gansterer 2010-12-01 07:12:59 PST
(In reply to comment #6)
> (From update of attachment 75152 [details])
> > WebKitTools/WinCELauncher/main.cpp:123
> > +    delete webView;
> 
> Could you use an OwnPtr here?
I'm not sure if it's cool to use "private" WebKit classes outside of it.
WinLauncher.cpp does a "gWebView->Release()" too, but I can change it.


(In reply to comment #7)
> You should change WebKitTools/Scripts/webkitpy/style/checkers.py to exclude the build/include_order rule when checking the WinCELauncher directory.
Are there any examples? I didn't find the place :-/.
Comment 9 Adam Roben (:aroben) 2010-12-01 08:14:58 PST
(In reply to comment #8)
> (In reply to comment #6)
> > (From update of attachment 75152 [details] [details])
> > > WebKitTools/WinCELauncher/main.cpp:123
> > > +    delete webView;
> > 
> > Could you use an OwnPtr here?
> I'm not sure if it's cool to use "private" WebKit classes outside of it.
> WinLauncher.cpp does a "gWebView->Release()" too, but I can change it.

We have other projects that use WTF headers (e.g., DumpRenderTree). As long as you're only using the header and not actually linking against WTF it seems fine.

> (In reply to comment #7)
> > You should change WebKitTools/Scripts/webkitpy/style/checkers.py to exclude the build/include_order rule when checking the WinCELauncher directory.
> Are there any examples? I didn't find the place :-/.

You'd add to the _PATH_RULES_SPECIFIER list <http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/style/checker.py#L114>. Probably something like this:

([# WinCELauncher has no config.h.
  "WebKitTools/WinCELauncher"],
 ["-build/include_order"]),
Comment 10 Patrick R. Gansterer 2010-12-01 08:50:55 PST
Comment on attachment 75152 [details]
Patch

Clearing flags on attachment: 75152

Manually committed r73026: <http://trac.webkit.org/changeset/73026>
Comment 11 Patrick R. Gansterer 2010-12-01 08:51:19 PST
All reviewed patches have been landed.  Closing bug.