Bug 34672

Summary: [BREWMP] Add dummy Cursor
Product: WebKit Reporter: Kwang Yul Seo <skyul>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Bug Depends on:    
Bug Blocks: 33564    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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.