Make .cpp files include their .h file first, in layout/generic

RESOLVED FIXED in mozilla27

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla27
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Upcoming patch just tweaks #include ordering in .cpp files within layout/generic, so that .cpp files #include their corresponding .h file _first_ in the #include list.

(This verifies that the .h file actually #includes or forward-declares the things that it uses, and there aren't any surprises like "you can't include Foo.h without also including Bar.h, if you want to build successfully")
(Assignee)

Comment 1

5 years ago
Created attachment 808987 [details] [diff] [review]
fix v1

This only non-obvious parts of this patch are:
 - In nsLineLayout.cpp, there's a plarena-related #define that has to stay before the first #include, or else we can't compile. (I added a comment to mention that.)

 - Surprisingly, nsHTMLReflowState.cpp doesn't (directly) include its own header file right now. This patch adds that #include. (but there's no removed line there, because the #include wasn't there before.)
Attachment #808987 - Flags: review?(matspal)
(Assignee)

Comment 2

5 years ago
Created attachment 808989 [details] [diff] [review]
fix v2

(this version just adds a formerly-missing blank line, for consistency)
Attachment #808987 - Attachment is obsolete: true
Attachment #808987 - Flags: review?(matspal)
Attachment #808989 - Flags: review?(matspal)
Comment on attachment 808989 [details] [diff] [review]
fix v2

r=mats
Attachment #808989 - Flags: review?(matspal) → review+
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/e304de11edae
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.