Bug 66983 - Move file internal methods to a class continuation in WKView
Summary: Move file internal methods to a class continuation in WKView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-25 14:39 PDT by Anders Carlsson
Modified: 2011-08-26 10:03 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.59 KB, patch)
2011-08-25 14:39 PDT, Anders Carlsson
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2011-08-25 14:39:28 PDT
Move file internal methods to a class continuation in WKView
Comment 1 Anders Carlsson 2011-08-25 14:39:54 PDT
Created attachment 105248 [details]
Patch
Comment 2 mitz 2011-08-25 15:28:20 PDT
Comment on attachment 105248 [details]
Patch

r=me but while this is a neat way to do things in the future, changing existing code to use continuations has almost zero benefit and makes it harder to “svn annotate” source code, so perhaps we shouldn’t do it everywhere.
Comment 3 Anders Carlsson 2011-08-25 15:32:46 PDT
(In reply to comment #2)
> (From update of attachment 105248 [details])
> r=me but while this is a neat way to do things in the future, changing existing code to use continuations has almost zero benefit and makes it harder to “svn annotate” source code, so perhaps we shouldn’t do it everywhere.

I agree.
Comment 4 Anders Carlsson 2011-08-25 15:33:17 PDT
Committed r93825: <http://trac.webkit.org/changeset/93825>
Comment 5 Darin Adler 2011-08-25 16:19:52 PDT
Do we still get an error or warning if we omit the method definitions?
Comment 6 Anders Carlsson 2011-08-25 16:34:37 PDT
(In reply to comment #5)
> Do we still get an error or warning if we omit the method definitions?

Yes.
Comment 7 Adam Roben (:aroben) 2011-08-26 08:25:24 PDT
What advantages over categories do class extensions provide?
Comment 8 Adam Roben (:aroben) 2011-08-26 08:25:56 PDT
I guess maybe it makes it easier to change a method from being internal to public and vice-versa. You won't have to move the method within the file when doing that.
Comment 9 Darin Adler 2011-08-26 10:03:03 PDT
The second, smaller advantage is that there’s no spurious “category name” that you have to chose.