Bug 34672 - [BREWMP] Add dummy Cursor
Summary: [BREWMP] Add dummy Cursor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 33564
  Show dependency treegraph
 
Reported: 2010-02-05 20:28 PST by Kwang Yul Seo
Modified: 2010-02-11 16:36 PST (History)
2 users (show)

See Also:


Attachments
Patch (7.64 KB, patch)
2010-02-05 20:37 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff
Patch (7.64 KB, patch)
2010-02-05 20:53 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff
Patch (8.26 KB, patch)
2010-02-10 06:42 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff
Patch (8.25 KB, patch)
2010-02-10 19:26 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kwang Yul Seo 2010-02-05 20:28:54 PST
Add dummy Cursor copied from android.
Comment 1 Kwang Yul Seo 2010-02-05 20:37:54 PST
Created attachment 48281 [details]
Patch
Comment 2 WebKit Review Bot 2010-02-05 20:41:44 PST
Attachment 48281 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/platform/brew/CursorBrew.cpp:302:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
WebCore/platform/brew/CursorBrew.cpp:307:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Kwang Yul Seo 2010-02-05 20:53:26 PST
Created attachment 48283 [details]
Patch

Fix style errors.
Comment 4 Eric Seidel (no email) 2010-02-08 15:51:45 PST
Comment on attachment 48283 [details]
Patch

Global statics are very much frowned upon in WebKit.  They'll slow down your load time if nothing else.
Comment 5 Kwang Yul Seo 2010-02-10 06:42:41 PST
Created attachment 48499 [details]
Patch

Don't use global statics. Create a dummy Cursor lazily.
Comment 6 Eric Seidel (no email) 2010-02-10 13:20:31 PST
Comment on attachment 48499 [details]
Patch

Using a function local static is fine.  We have a macro we use for them called DEFINE_STATIC_LOCAL (I think it's mostly to work around a GCC but.

This current implementation is also OK.
Comment 7 Kwang Yul Seo 2010-02-10 19:11:46 PST
Comment on attachment 48499 [details]
Patch

There is a mistake in dummyCorsor returning a pointer while the return type is a reference to Cursor. I will update the patch using DEFINE_STATIC_LOCAL.
Comment 8 Kwang Yul Seo 2010-02-10 19:26:13 PST
Created attachment 48542 [details]
Patch

Use DEFINE_STATIC_LOCAL.
Comment 9 Eric Seidel (no email) 2010-02-10 21:16:43 PST
Comment on attachment 48542 [details]
Patch

what is +#define LOG_TAG "WebCore"
 for?
Comment 10 WebKit Commit Bot 2010-02-11 16:36:17 PST
Comment on attachment 48542 [details]
Patch

Clearing flags on attachment: 48542

Committed r54685: <http://trac.webkit.org/changeset/54685>
Comment 11 WebKit Commit Bot 2010-02-11 16:36:25 PST
All reviewed patches have been landed.  Closing bug.