Bug 58746 - Move WebNodeHighlighter into its own file
Summary: Move WebNodeHighlighter into its own file
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-17 13:03 PDT by Joseph Pecoraro
Modified: 2011-04-17 13:42 PDT (History)
3 users (show)

See Also:


Attachments
[PATCH] Extract into its own file (15.08 KB, patch)
2011-04-17 13:11 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Extract into its own file (15.08 KB, patch)
2011-04-17 13:18 PDT, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2011-04-17 13:03:00 PDT
Extract this class into its own file.
Comment 1 Joseph Pecoraro 2011-04-17 13:11:21 PDT
Created attachment 89958 [details]
[PATCH] Extract into its own file

Some minor cleanup in the process:

  - fix WebInspectorClient constructor
  - remove "WebNodeHightlighter delegate" methods on WebInspectorWindowController
    which were never called because it was never set to be the delegate.
  - added [super init] boilerplate to WebNodeHighligher's constructor

Also, the ObjC classes in WebInspectorClient don't properly initialize self.
They just call the super methods but don't assign to self. Should I fix those
up as well?
Comment 2 Joseph Pecoraro 2011-04-17 13:18:36 PDT
Created attachment 89959 [details]
[PATCH] Extract into its own file

Fixed a typo in the ChangeLog.
Comment 3 Timothy Hatcher 2011-04-17 13:20:55 PDT
Comment on attachment 89958 [details]
[PATCH] Extract into its own file

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

> Source/WebKit/mac/WebInspector/WebNodeHighlighter.mm:42
> +    self = [super init];
> +    if (!self)
> +        return nil;

I like this form:

if (!(self = [super init]))
    return nil;
Comment 4 Joseph Pecoraro 2011-04-17 13:33:23 PDT
I like this form:
> 
> if (!(self = [super init]))
>     return nil;

Gross! But acceptable. =)

Should I open up a new bug and do the same for -[WebInspectorWindowController init]
and -[WebInspectorWindowController initWithWebView]?
Comment 5 Timothy Hatcher 2011-04-17 13:36:58 PDT
Sure.
Comment 6 Joseph Pecoraro 2011-04-17 13:42:16 PDT
Landed in <http://trac.webkit.org/changeset/84108>.