Bug 177906

Summary: Update WebKit Code Style with Objective-C block syntax guidelines
Product: WebKit Reporter: Megan Gardner <megan_gardner>
Component: New BugsAssignee: Megan Gardner <megan_gardner>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, dbates, mitz, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
thorton: review+, buildbot: commit-queue-
Archive of layout-test-results from ews123 for ios-simulator-wk2 none

Megan Gardner
Reported 2017-10-04 17:20:32 PDT
Update Webkit Style webpage to include Obj-C blocks
Attachments
Patch (1.22 KB, patch)
2017-10-04 17:24 PDT, Megan Gardner
no flags
Patch (1.31 KB, patch)
2017-10-04 19:05 PDT, Megan Gardner
thorton: review+
buildbot: commit-queue-
Archive of layout-test-results from ews123 for ios-simulator-wk2 (1.02 MB, application/zip)
2017-10-04 20:20 PDT, Build Bot
no flags
Megan Gardner
Comment 1 2017-10-04 17:24:38 PDT
Wenson Hsieh
Comment 2 2017-10-04 18:44:55 PDT
Comment on attachment 322746 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322746&action=review > Websites/webkit.org/code-style.md:237 > +[](#spacing-function-paren) In Objective-C, do not place spaces between the start of a block and its aguments, or start of a block and its opening brace. "aguments" => "arguments" "or start of" => "or the start of" > Websites/webkit.org/code-style.md:259 > +block = ^ (int, int) { Hm...it seems official Apple style documentation uses this style: <https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html#//apple_ref/doc/uid/TP40011210-CH8-SW2>. I see both spaces before and after the parens (like `^ (double firstValue, double secondValue) {`) and also spaces only after the end paren (like `^(double firstValue, double secondValue) {`), but not an example of both spaces being omitted.
Megan Gardner
Comment 3 2017-10-04 19:05:03 PDT
Comment on attachment 322746 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322746&action=review >> Websites/webkit.org/code-style.md:259 >> +block = ^ (int, int) { > > Hm...it seems official Apple style documentation uses this style: <https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html#//apple_ref/doc/uid/TP40011210-CH8-SW2>. I see both spaces before and after the parens (like `^ (double firstValue, double secondValue) {`) and also spaces only after the end paren (like `^(double firstValue, double secondValue) {`), but not an example of both spaces being omitted. Oh, I looked at that over and over, and I reduced it incorrectly, thank you. I'll redo this.
Megan Gardner
Comment 4 2017-10-04 19:05:50 PDT
Build Bot
Comment 5 2017-10-04 20:20:45 PDT
Comment on attachment 322764 [details] Patch Attachment 322764 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4761808 New failing tests: accessibility/ios-simulator/video-elements-ios.html
Build Bot
Comment 6 2017-10-04 20:20:46 PDT
Created attachment 322770 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Megan Gardner
Comment 7 2017-10-05 15:39:47 PDT
Radar WebKit Bug Importer
Comment 8 2017-10-05 15:40:31 PDT
Note You need to log in before you can comment on or make changes to this bug.