Bug 58746

Summary: Move WebNodeHighlighter into its own file
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Severity: Normal CC: ddkilzer, joepeck, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Description Flags
[PATCH] Extract into its own file
[PATCH] Extract into its own file timothy: review+

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
Comment 6 Joseph Pecoraro 2011-04-17 13:42:16 PDT
Landed in <http://trac.webkit.org/changeset/84108>.