Bug 81281 - Fix WTF header include discipline in Chromium WebKit
Summary: Fix WTF header include discipline in Chromium WebKit
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: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks: 75673 80911
  Show dependency treegraph
 
Reported: 2012-03-15 16:10 PDT by Eric Seidel (no email)
Modified: 2012-03-19 17:02 PDT (History)
12 users (show)

See Also:


Attachments
Patch (55.24 KB, patch)
2012-03-15 16:35 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch for landing (55.87 KB, patch)
2012-03-15 17:07 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch for landing (55.70 KB, patch)
2012-03-15 17:15 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch for landing (55.33 KB, patch)
2012-03-15 17:28 PDT, Eric Seidel (no email)
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2012-03-15 16:10:25 PDT
Fix WTF header include dicipline in Chromium WebKit
Comment 1 Eric Seidel (no email) 2012-03-15 16:35:55 PDT
Created attachment 132146 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-03-15 16:36:21 PDT
I would like Tony Chang to sign off on the GYP changes, otherwise anyone can rubber-stamp this.  If it builds, it works. :)
Comment 3 James Robinson 2012-03-15 16:42:42 PDT
Comment on attachment 132146 [details]
Patch

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

RS=me on the header changes but some files definitely still need a header resort

> Tools/Scripts/update-webkit-chromium:39
> +chdirWebKit();

is this part of the same change?
Comment 4 Tony Chang 2012-03-15 16:49:28 PDT
Comment on attachment 132146 [details]
Patch

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

Sometimes you fixed the include order, other times you didn't. That's intentional, right?

Please improve the ChangeLog description. This patch doesn't look Chromium specific.

> Source/WebCore/ChangeLog:3
> +        Fix WTF header include discipline in Chromium WebKit

This is more than just Chromium, no? I see qt, gtk, blackberry, efl, wx, mac (DOMFloat64Array.mm) changes.

> Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:114
> +        '../wtf', # Some .cpp expect #include "Assertions.h", etc. to work.
> +        '../wtf/unicode', # Likewise some expect #include "Collator.h" to work.

Are these still needed after this change?

> Source/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp:-32
>  #include "config.h"
> -#include "ArrayBuffer.h"

Should V8Float32Array.h be immediately after config.h?

> Source/WebCore/bindings/v8/custom/V8Float64ArrayCustom.cpp:-27
>  #include "config.h"
> -#include "Float64Array.h"

Should V8Float64Array.h be immediately after config.h?

> Tools/Scripts/update-webkit-chromium:39
> +chdirWebKit();

Did you mean to include this change?
Comment 5 Eric Seidel (no email) 2012-03-15 17:03:32 PDT
(In reply to comment #4)
> (From update of attachment 132146 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=132146&action=review
> 
> Sometimes you fixed the include order, other times you didn't. That's intentional, right?
> 
> Please improve the ChangeLog description. This patch doesn't look Chromium specific.

OK.  It is mostly chromium specific.  I just get a more general search/replace when possible.  Gtk/Qt, etc. have the same troubles, I was just testing building Chromium w/o these crutch include directories.

> > Source/WebCore/ChangeLog:3
> > +        Fix WTF header include discipline in Chromium WebKit
> 
> This is more than just Chromium, no? I see qt, gtk, blackberry, efl, wx, mac (DOMFloat64Array.mm) changes.

Again, just search-replacing where it made sense to.  As long as the EWS bots are OK with the results, these are improvements, if not immediately required.

> > Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:114
> > +        '../wtf', # Some .cpp expect #include "Assertions.h", etc. to work.
> > +        '../wtf/unicode', # Likewise some expect #include "Collator.h" to work.
> 
> Are these still needed after this change?

I believe so.  I did not attempt to fix WTF's own internal includes (that's a larger project).  Other projects need to have good WTF include discipline, but WTF doesn't necessarily need to for its own .cpp files including its own headers.

> > Source/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp:-32
> >  #include "config.h"
> > -#include "ArrayBuffer.h"
> 
> Should V8Float32Array.h be immediately after config.h?

I tried to just search/replace.  I'm happy to move headers around as folks desire.  In general if check-webkit-style didn't complain, I tried not to make busy work for myself. :)

> > Source/WebCore/bindings/v8/custom/V8Float64ArrayCustom.cpp:-27
> >  #include "config.h"
> > -#include "Float64Array.h"
> 
> Should V8Float64Array.h be immediately after config.h?
> 
> > Tools/Scripts/update-webkit-chromium:39
> > +chdirWebKit();
> 
> Did you mean to include this change?

Yes.  It annoyed me that I had to chdir to the root of webkit to run update-webkit-chromium every time I changed a gyp file. :)
Comment 6 Eric Seidel (no email) 2012-03-15 17:07:02 PDT
Created attachment 132154 [details]
Patch for landing
Comment 7 Eric Seidel (no email) 2012-03-15 17:10:33 PDT
Comment on attachment 132154 [details]
Patch for landing

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

> Source/JavaScriptCore/ChangeLog:16
> -        Reviewed by NOBODY (OOPS!).
> +        Reviewed by James Robinson.

ChangeLogs suck.
Comment 8 Eric Seidel (no email) 2012-03-15 17:15:01 PDT
Created attachment 132157 [details]
Patch for landing
Comment 9 Eric Seidel (no email) 2012-03-15 17:28:55 PDT
Created attachment 132159 [details]
Patch for landing
Comment 10 WebKit Review Bot 2012-03-16 01:54:29 PDT
Comment on attachment 132159 [details]
Patch for landing

Rejecting attachment 132159 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
romium/src/WebViewImpl.cpp
Hunk #1 succeeded at 112 (offset 1 line).
Hunk #2 succeeded at 142 (offset 1 line).
patching file Source/WebKit/chromium/tests/FrameTestHelpers.cpp
patching file Tools/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
patching file Tools/Scripts/update-webkit-chromium

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/11965078
Comment 11 Eric Seidel (no email) 2012-03-19 15:09:46 PDT
Landing manually.  I've re-confirmed locally that this builds on Cr-Mac.
Comment 12 Eric Seidel (no email) 2012-03-19 15:17:00 PDT
Committed r111258: <http://trac.webkit.org/changeset/111258>
Comment 13 Eric Seidel (no email) 2012-03-19 17:02:18 PDT
Committed r111274: <http://trac.webkit.org/changeset/111274>