Closed Bug 1412427 Opened 2 years ago Closed 2 years ago

Clean up license blocks & mode lines in /gfx

Categories

(Core :: Graphics, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(10 files)

59 bytes, text/x-review-board-request
jrmuizel
: review+
Details
59 bytes, text/x-review-board-request
jrmuizel
: review+
Details
59 bytes, text/x-review-board-request
jrmuizel
: review+
Details
59 bytes, text/x-review-board-request
jrmuizel
: review+
Details
59 bytes, text/x-review-board-request
jrmuizel
: review+
Details
59 bytes, text/x-review-board-request
jrmuizel
: review+
Details
59 bytes, text/x-review-board-request
jrmuizel
: review+
Details
59 bytes, text/x-review-board-request
jrmuizel
: review+
Details
3.37 KB, text/plain
Details
26.85 KB, text/plain
Details
As in bug 1412346, let's use mccr8's modeline.py script[1] to standardize our modelines in /gfx.

This requires a few manual helper-patches to fix up anomalous modelines/MPL-license-blocks that the script doesn't recognize.  I'll post those patches first, and then the automatically-generated patch.

[1] https://github.com/amccreight/moz-source-tools/blob/master/modeline.py
See Also: → 1412346
Hmm, I'm noticing that there's one generated file that's being modified by the final modeline.py-generated patch here: webrender_ffi_generated.h

(It's kind of a valid modification, in the sense that the generated file *is* mozilla code & has MPL boilerplate but no modeline.  But we probably shouldn't make that modification because it'll get stomped on if/when we regenerate the file).

I'll update the script to avoid making that modification.
For reference: here's a text file with a list of all the files touched by the non-modeline.py patches here (parts 1 through 7, the more easily-digestable patches).
...and here's a list of the files touched by the final modeline.py-generated patch (part 8).
I grepped all of the touched files (case-insensitive) for various strings, to screen for any other auto-generated files that aren't supposed to be touched, and I've convinced myself that I'm OK in that department.

Specifically, I grepped for: "generated", "this file", "manual", and "modify".  None of the matches looked like a "do not modify this file" comment of any sort.

Also, in case you're curious: I'm excluding all the 3rd-party GFX code via the "blacklist" mechanisms in modeline.py -- specifically here:
  https://github.com/amccreight/moz-source-tools/blob/master/modeline.py/#L43-L74

(The upper blacklist is for entire directory trees whose subdirs we want to exclude from consideration. The lower blacklist is more targeted, for just specific flat directories where we don't need to worry about subdirectories.)
Comment on attachment 8922999 [details]
Bug 1412427 part 1: Add standard mode line & MPL boilerplate to a few gfx C++ files that are missing it entirely.

https://reviewboard.mozilla.org/r/194184/#review199468

This cleanup seems fine IMO, but given that it cuts across such a broad swath of gfx, much of which is entirely outside my area, I'd feel better if we got sign-off from someone like jrmuizel as overall gfx owner.

Jeff, are you happy to take over the review (or should I say rubber-stamping) of the patches here?
Flags: needinfo?(jmuizelaar)
Comment on attachment 8922999 [details]
Bug 1412427 part 1: Add standard mode line & MPL boilerplate to a few gfx C++ files that are missing it entirely.

https://reviewboard.mozilla.org/r/194186/#review199514
Attachment #8922999 - Flags: review+
Comment on attachment 8923000 [details]
Bug 1412427 part 2: Move vim mode line below emacs mode line in a few gfx files, for consistency.

https://reviewboard.mozilla.org/r/194188/#review199516
Attachment #8923000 - Flags: review+
Comment on attachment 8923001 [details]
Bug 1412427 part 3: Replace 10 gfx usages of a particular non-standard emacs mode line with our standard mode line.

https://reviewboard.mozilla.org/r/194190/#review199518
Attachment #8923001 - Flags: review+
Comment on attachment 8923002 [details]
Bug 1412427 part 4: Indent under-indented MPL boilerplate comments by 1 space, for consistency & alignment. (whitespace-only)

https://reviewboard.mozilla.org/r/194192/#review199520
Attachment #8923002 - Flags: review+
Comment on attachment 8923003 [details]
Bug 1412427 part 5: Deindent over-indented MPL boilerplate comments down to 1 space, for consistency & alignment. (whitespace-only)

https://reviewboard.mozilla.org/r/194194/#review199522
Attachment #8923003 - Flags: review+
Comment on attachment 8923004 [details]
Bug 1412427 part 6: Remove stray "//" prefix before first line of MPL boilerplate comment, in some gfx source files.

https://reviewboard.mozilla.org/r/194196/#review199524
Attachment #8923004 - Flags: review+
Comment on attachment 8923005 [details]
Bug 1412427 part 7: Manually fix up a few non-standard quirks in mode lines & MPL text, in gfx source files.

https://reviewboard.mozilla.org/r/194198/#review199526
Attachment #8923005 - Flags: review+
Comment on attachment 8923006 [details]
Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines.

https://reviewboard.mozilla.org/r/194204/#review199528
Attachment #8923006 - Flags: review+
Thanks, Jonathan & Jeff!
Flags: needinfo?(jmuizelaar)
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2aa5c6679b01
part 1: Add standard mode line & MPL boilerplate to a few gfx C++ files that are missing it entirely. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/3a5488e8ada3
part 2: Move vim mode line below emacs mode line in a few gfx files, for consistency. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/af0eea7b7840
part 3: Replace 10 gfx usages of a particular non-standard emacs mode line with our standard mode line. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/3684005dea8c
part 4: Indent under-indented MPL boilerplate comments by 1 space, for consistency & alignment. (whitespace-only) r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/85498bffcea6
part 5: Deindent over-indented MPL boilerplate comments down to 1 space, for consistency & alignment. (whitespace-only) r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/06fc09933385
part 6: Remove stray "//" prefix before first line of MPL boilerplate comment, in some gfx source files. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/75d088de9aa9
part 7: Manually fix up a few non-standard quirks in mode lines & MPL text, in gfx source files. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/5f74d2629241
part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
Comment on attachment 8922999 [details]
Bug 1412427 part 1: Add standard mode line & MPL boilerplate to a few gfx C++ files that are missing it entirely.

https://reviewboard.mozilla.org/r/194186/#review199608
Attachment #8922999 - Flags: review?(jfkthame)
Attachment #8923000 - Flags: review?(jfkthame)
Attachment #8923001 - Flags: review?(jfkthame)
Attachment #8923002 - Flags: review?(jfkthame)
Attachment #8923003 - Flags: review?(jfkthame)
Attachment #8923004 - Flags: review?(jfkthame)
Attachment #8923005 - Flags: review?(jfkthame)
Attachment #8923006 - Flags: review?(jfkthame)
Blocks: 1435297
You need to log in before you can comment on or make changes to this bug.