Open
Bug 379089
Opened 17 years ago
Updated 2 years ago
reduce #include dependencies on style system headers
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
NEW
People
(Reporter: dbaron, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
(Whiteboard: [lang=c++])
Attachments
(2 files)
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
dbaron
:
feedback-
|
Details | Diff | Splinter Review |
I have a patch (maybe more later) to reduce #include dependencies on style system headers.
Reporter | ||
Comment 1•17 years ago
|
||
Attachment #263088 -
Flags: superreview?(bzbarsky)
Attachment #263088 -
Flags: review?(bzbarsky)
![]() |
||
Comment 2•17 years ago
|
||
Comment on attachment 263088 [details] [diff] [review] reduce what nsRuleData.h pulls in r+sr=bzbarsky
Attachment #263088 -
Flags: superreview?(bzbarsky)
Attachment #263088 -
Flags: superreview+
Attachment #263088 -
Flags: review?(bzbarsky)
Attachment #263088 -
Flags: review+
Reporter | ||
Comment 3•17 years ago
|
||
Above patch checked in to trunk.
Reporter | ||
Comment 4•17 years ago
|
||
The other big thing I could do here is make nsStyleStructFwd.h forward-declare all the structs, and then make nsRuleNode.h include nsStyleStructFwd.h instead of nsStyleStruct.h. This would mean that nsIFrame.h, nsStyleContext.h, or nsRuleNode.h would no longer bring in all the style structs.
Updated•17 years ago
|
Flags: in-testsuite-
Updated•12 years ago
|
Blocks: includehell
Reporter | ||
Updated•11 years ago
|
Whiteboard: [mentor=dbaron]
Reporter | ||
Updated•11 years ago
|
Whiteboard: [mentor=dbaron] → [mentor=dbaron][lang=c++]
Assignee | ||
Updated•10 years ago
|
Mentor: dbaron
Whiteboard: [mentor=dbaron][lang=c++] → [lang=c++]
Comment 5•10 years ago
|
||
I'm having a look at this bug.
Comment 6•10 years ago
|
||
I changed nsRuleNode.h to no longer include nsStyleStruct.h, but nsStyleStructFwd.h. Most of the changes needed were moving function definitions into the souce files (and adding the nsStyleStruct.h include there). I didn't change any function signatures, which is why I had to add nsStyleStruct.h as include in nsComputedDOMStyle.h. I'm not sure if any additional changes are needed, so comments are certainly welcome.
Attachment #8485547 -
Flags: feedback?(dbaron)
Reporter | ||
Comment 7•10 years ago
|
||
Comment on attachment 8485547 [details] [diff] [review] nsRuleNode.h no longer includes nsStyleStruct.h So this patch does a bunch of moving of things from .h files to .cpp files. This is bad for performance: methods defined within the class definition are implicitly inline, which is what we wanted here; we don't want to change that. If this is hard to avoid, then it might be worth just giving up; it's more important that the browser be fast than that compiling the browser be fast. Also, in nsStyleStructFwd.h, instead of writing out all the names of the style structs, you should #include "nsStyleStructList.h" to do that. (See other uses of nsStyleStructList.h for
Attachment #8485547 -
Flags: feedback?(dbaron) → feedback-
Comment 8•10 years ago
|
||
Thanks for the feedback! I had another look at the 3 headers (nsIFrame.h, nsStyleContext.h and nsRuleNode.h), but I see no way to use nsStyleStructFwd.h without moving at least some methods into the .cpp files. I'll leave this bug alone then, since I don't see any way to really progress further.
Reporter | ||
Updated•3 years ago
|
Assignee: dbaron → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•