Closed
Bug 107453
Opened 23 years ago
Closed 14 years ago
Rarely used HTML element classes should be combined...
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.3final
People
(Reporter: jst, Assigned: jst)
Details
(Whiteboard: [HAVE FIX])
Attachments
(5 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
caillon
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
There's quite a few HTML element classes in the mozilla code that's not used at all when loading jrgm's pageload tests, this involves loading 40 top 100 pages, and should give us a reasonable (but of course not perfect) picture of what code is commonly used and what's not. When running these tests we don't use any of these elements: nsHTMLAppletElement nsHTMLButtonElement nsHTMLDelElement nsHTMLDirectoryElement nsHTMLEmbedElement nsHTMLFieldsetElement nsHTMLInsElement nsHTMLLabelElement nsHTMLLegendElement nsHTMLMenuElement nsHTMLModElement nsHTMLObjectElement nsHTMLOlistElement nsHTMLOptGroupElement nsHTMLParamElement nsHTMLQuoteElement nsHTMLTableCaptionElement nsHTMLTableColGroupElement nsHTMLTableRowElement nsHTMLTablecolElement nsHTMLTextareaElement nsHTMLWbrElement I've started working on collapsing these unused elements into a few shared classes that when used will work exactly like the current code at the expence of a few more vtables on the rarely used element objects. Patch coming up that collapses nsHTMLTableColGroupElement.cpp and nsHTMLTableColElement.cpp into nsHTMLTableColElement.cpp, and also nsTHMLBaseElement.cpp, nsHTMLEmbedElement.cpp, nsHTMLIsIndexElement.cpp, nsHTMLParamElement.cpp, nsHTMLSpacerElement.cpp and nsHTMLWBRElement.cpp into nsHTMLSharedLeafElement.cpp. The result of this first step is that we can remove 6 files from the project.
Assignee | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
Comment 4•23 years ago
|
||
sr=waterson! Go Johnny go!
Assignee | ||
Comment 5•23 years ago
|
||
Dbaron, would you review this (second and last patch)?
Status: NEW → ASSIGNED
Comment 6•23 years ago
|
||
Comment on attachment 55649 [details] [diff] [review] Same as above, excluding deleted files. >Index: content/html/content/src/nsHTMLInputElement.cpp >+ nsresult rv = ((nsGenericHTMLElement *)it)->Init(aNodeInfo); >+ nsresult rv = ((nsGenericHTMLElement *)it)->Init(mNodeInfo); Could you use NS_STATIC_CAST, like you did in nsHTMLSelectElement.cpp? r=dbaron (on the last 2 attachments)
Assignee | ||
Comment 7•23 years ago
|
||
Yup, will do. Thanks for the review.
Assignee | ||
Comment 8•23 years ago
|
||
Above patches checked in, more to come...
Comment 9•23 years ago
|
||
Is it possible the check-in to this bug is causing the blocker bug 107627?
Assignee | ||
Comment 10•23 years ago
|
||
Yes, this fix caused bug 107627 (which is now fixed).
Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla0.9.8
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Comment 11•23 years ago
|
||
Fixed, or do we want to keep it open for future similar improvements?
Assignee | ||
Comment 12•23 years ago
|
||
There's more to do here...
Updated•23 years ago
|
Priority: -- → P3
Updated•23 years ago
|
Assignee | ||
Comment 14•22 years ago
|
||
Comment 15•22 years ago
|
||
Comment on attachment 89166 [details] [diff] [review] Combine rarely used container classes... This patch looks fine, and comparing the methods in the old classes to the new combined class looks correct as well. r=caillon with the additional caveat of removing (or actually using) the XXX comment here: http://lxr.mozilla.org/mozilla/source/content/html/content/src/nsHTMLSharedCont ainerElem.cpp#344
Attachment #89166 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Whiteboard: [HAVE FIX]
Comment on attachment 89166 [details] [diff] [review] Combine rarely used container classes... >Index: content/html/content/src/Makefile.in >=================================================================== >- nsHTMLDelElement.cpp \ >- nsHTMLDirectoryElement.cpp \ >- nsHTMLInsElement.cpp \ >- nsHTMLMenuElement.cpp \ >- nsHTMLModElement.cpp \ >- nsHTMLQuoteElement.cpp \ >+ nsHTMLSharedContainerElem.cpp \ >- nsHTMLTableCaptionElement.cpp \ >Index: content/html/content/src/makefile.win >=================================================================== >- .\$(OBJDIR)\nsHTMLDelElement.obj \ >- .\$(OBJDIR)\nsHTMLDirectoryElement.obj \ >- .\$(OBJDIR)\nsHTMLInsElement.obj \ >- .\$(OBJDIR)\nsHTMLMenuElement.obj \ >- .\$(OBJDIR)\nsHTMLModElement.obj \ >- .\$(OBJDIR)\nsHTMLOListElement.obj \ >- .\$(OBJDIR)\nsHTMLQuoteElement.obj \ >+ .\$(OBJDIR)\nsHTMLSharedContainerElem.obj \ >- .\$(OBJDIR)\nsHTMLTableCaptionElement.obj \ These two lists above don't match (also check Mac project)??? >Index: content/html/content/src/nsGenericHTMLElement.h >=================================================================== >+inline nsresult >+NS_NewHTMLOListElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo) >+{ >+ return NS_NewHTMLSharedContainerElement(aResult, aNodeInfo); >+} Is OL really a rarely used element? I wouldn't consider it rare, but... >Index: content/html/content/src/nsHTMLDelElement.cpp >=================================================================== >Index: content/html/content/src/nsHTMLDirectoryElement.cpp >=================================================================== >Index: content/html/content/src/nsHTMLInsElement.cpp >=================================================================== >Index: content/html/content/src/nsHTMLMenuElement.cpp >=================================================================== >Index: content/html/content/src/nsHTMLModElement.cpp >=================================================================== >Index: content/html/content/src/nsHTMLOListElement.cpp >=================================================================== >Index: content/html/content/src/nsHTMLQuoteElement.cpp >=================================================================== >Index: content/html/content/src/nsHTMLTableCaptionElement.cpp >=================================================================== >Index: content/macbuild/content.xml >=================================================================== >Index: content/shared/public/nsHTMLAtomList.h >===================================================================
Assignee | ||
Updated•22 years ago
|
Target Milestone: mozilla1.0 → mozilla1.1alpha
Assignee | ||
Updated•22 years ago
|
Target Milestone: mozilla1.1alpha → mozilla1.3alpha
Assignee | ||
Updated•22 years ago
|
Target Milestone: mozilla1.3alpha → mozilla1.3final
Assignee | ||
Comment 17•22 years ago
|
||
Mass-reassigning bugs.
Assignee: jst → dom_bugs
Status: ASSIGNED → NEW
Comment 18•20 years ago
|
||
Comment 19•20 years ago
|
||
Comment on attachment 167388 [details] [diff] [review] fix regression from col/colgroup combining (checked in to trunk, 2004-11-29 21:52 -0800). This fixes a regression (perhaps asymptomatic) from attachment 55647 [details] [diff] [review].
Attachment #167388 -
Flags: superreview?(bzbarsky)
Attachment #167388 -
Flags: review?(jst)
![]() |
||
Comment 20•20 years ago
|
||
Comment on attachment 167388 [details] [diff] [review] fix regression from col/colgroup combining (checked in to trunk, 2004-11-29 21:52 -0800). r+sr=bzbarsky
Attachment #167388 -
Flags: superreview?(bzbarsky)
Attachment #167388 -
Flags: superreview+
Attachment #167388 -
Flags: review?(jst)
Attachment #167388 -
Flags: review+
Updated•20 years ago
|
Attachment #167388 -
Attachment description: fix regression from col/colgroup combining → fix regression from col/colgroup combining (checked in to trunk, 2004-11-29 21:52 -0800).
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
Comment 21•14 years ago
|
||
File followups if we ever want to do more of this.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Assignee: general → jst
You need to log in
before you can comment on or make changes to this bug.
Description
•