Closed Bug 1326574 Opened 7 years ago Closed 7 years ago

Preemptively fix unified bustage in layout/style

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(2 files)

This bug is one in a series of "fix latent missing-#include/declaration/namespace compile errors which are currently being hidden by unified builds" bugs.  (This is worth doing periodically, because otherwise these issues are just landmines that get discovered when we add new .cpp files or make another change that reshuffles the unification.)

This one's for layout/style, which I cleaned up earlier in bug 1321495, but it's broken again.
Here are the build errors that I get if I disable unified builds in this directory (via s/UNIFIED_SOURCES/SOURCES/).
Explanation of the changes here:

* The DocumentStyleRootIterator.h changes are pretty self-explanatory -- "Element*" is used in a function-signature and hence needs a forward-decl (as well as a "dom::" namespace prefix added to its usage).

* The DocumentStyleRootIterator.cpp change (including Element.h) is needed for this line:
  mStyleRoots.AppendElement(root);
...where mStyleRoots is an AutoTArray of nsIContent, and "root" is an Element*.  We need the Element class-definition in order for the compiler to know that Element derives from nsIContent, which is why we can store it in this AutoTArray.

* The ServoStyleSet.cpp changes are to provide the definition of an inline function (via ElementInlines.h), as well as the function-decl (via Element.h) for robustness & to make the ElementInlines include more sensible.

* The nsComputedDOMStyle.cpp change is just completing a typename (nsCSSProps::KTableEntry).  All the other usages in this file use the full-length typename.  The abbreviated "KTableEntry" typename only works because we're picking up a typedef from nsCSSProps.cpp.
Comment on attachment 8822919 [details]
Bug 1326574: Add some needed includes/forward-declarations in layout/style, to preemptively fix unified bustage.

https://reviewboard.mozilla.org/r/101670/#review102124
Attachment #8822919 - Flags: review?(xidorn+moz) → review+
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a012d28becf8
Add some needed includes/forward-declarations in layout/style, to preemptively fix unified bustage. r=xidorn
Thanks!
https://hg.mozilla.org/mozilla-central/rev/a012d28becf8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: