Closed Bug 908746 Opened 11 years ago Closed 11 years ago

Reduce the number of #includes in nsLayoutUtils.h

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

No description provided.
Attachment #794759 - Flags: review?(matspal)
Comment on attachment 794759 [details] [diff] [review] Part 1: Forward-declare nsIPrincipal I don't understand how this can compile given that we have a nsCOMPtr<nsIPrincipal> in struct SurfaceFromElementResult and some methods here return SurfaceFromElementResult by value. It seems you're just relying on some of the remaining #includes to get nsIPrincipal.h instead (AFAICT: nsIPrincipal.h <- imgRequest.h <- imgRequestProxy.h <- nsStyleStruct.h <- nsRuleNode.h <- nsStyleContext.h <- nsIFrame.h) So I think this dependency should stay explicit.
Attachment #794759 - Flags: review?(matspal) → review-
Comment on attachment 794760 [details] [diff] [review] Part 2: Move some macros from nsHTMLReflowState.h to nsIFrame.h so that we can stop #including nsHTMLReflowState.h in nsLayoutUtils.h r=mats
Attachment #794760 - Flags: review?(matspal) → review+
(In reply to Mats Palmgren (:mats) from comment #3) > Comment on attachment 794759 [details] [diff] [review] > Part 1: Forward-declare nsIPrincipal > > I don't understand how this can compile given that we have a > nsCOMPtr<nsIPrincipal> in struct SurfaceFromElementResult and some methods > here return SurfaceFromElementResult by value. > > It seems you're just relying on some of the remaining #includes to get > nsIPrincipal.h instead (AFAICT: nsIPrincipal.h <- imgRequest.h > <- imgRequestProxy.h <- nsStyleStruct.h <- nsRuleNode.h <- nsStyleContext.h > <- nsIFrame.h) > > So I think this dependency should stay explicit. Hmm, yeah, you're right.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: