Closed Bug 677101 Opened 15 years ago Closed 15 years ago

Various #include improvements

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

No description provided.
Flags: in-testsuite-
This is necessary because nsAutoLayoutPhase uses nsContentUtils, which I don't want to include in nsPresContext.h
Attachment #551327 - Flags: review?(tnikkel)
So what is the goal here?
Not including things unnecessarily, and in particular not including nsContentUtils.h from headers, because it includes a lot of stuff itself.
Comment on attachment 551327 [details] [diff] [review] Part a: Create nsAutoLayoutPhase.h >diff --git a/layout/base/nsAutoLayoutPhase.h b/layout/base/nsAutoLayoutPhase.h >+ >+#ifndef nsAutoLayoutPhase_h >+#define nsAutoLayoutPhase_h >+ >+#include "nsPresContext.h" >+#include "nsContentUtils.h" >+ >+#ifdef DEBUG Move the "#ifdef DEBUG" above the other includes? r+ assuming this is basically a straight copy of code from one place to another.
Attachment #551327 - Flags: review?(tnikkel) → review+
Will do.
Comment on attachment 551328 [details] [diff] [review] Part b: Remove nsContentUtils.h includes from headers Review of attachment 551328 [details] [diff] [review]: ----------------------------------------------------------------- Do whatever you want with my comments (they are only suggestions). r=mounir ::: content/svg/content/src/nsSVGLength2.h @@ +175,5 @@ > NS_IMETHOD SetValue(float aValue) > { > + if (!NS_finite(aValue)) { > + return NS_ERROR_ILLEGAL_VALUE; > + } Maybe add a comment explaining that you don't use NS_ENSURE_FINITE to prevent including nsContentUtils.h? @@ +186,5 @@ > NS_IMETHOD SetValueInSpecifiedUnits(float aValue) > { > + if (!NS_finite(aValue)) { > + return NS_ERROR_ILLEGAL_VALUE; > + } Same here. ::: content/svg/content/src/nsSVGNumber2.h @@ +112,5 @@ > NS_IMETHOD SetBaseVal(float aValue) > { > + if (!NS_finite(aValue)) { > + return NS_ERROR_ILLEGAL_VALUE; > + } and here.. ::: content/svg/content/src/nsSVGNumberPair.h @@ +121,5 @@ > NS_IMETHOD SetBaseVal(float aValue) > { > + if (!NS_finite(aValue)) { > + return NS_ERROR_ILLEGAL_VALUE; > + } oh, here too :)
Attachment #551328 - Flags: review?(mounir) → review+
Comment on attachment 551329 [details] [diff] [review] Part c: Reduce nsIDOMText.h inclusions Review of attachment 551329 [details] [diff] [review]: ----------------------------------------------------------------- I believe you checked that nothing in the includes you removed were actually used? r=mounir assuming that.
Attachment #551329 - Flags: review?(mounir) → review+
Comment on attachment 551330 [details] [diff] [review] Part d: Remove some includes from nsHTMLInputElement.cpp Review of attachment 551330 [details] [diff] [review]: ----------------------------------------------------------------- r=mounir
Attachment #551330 - Flags: review?(mounir) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Blocks: includehell
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: