Closed Bug 824448 Opened 12 years ago Closed 12 years ago

Convert HTMLHeadingElement to WebIDL

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Dromaeo's dom-attr test uses an <h2>. You can see a before/after at http://dromaeo.com/?id=186938,186941 (esp. the getAttribute and element.property lines).
Comment on attachment 695425 [details] [diff] [review] part 1. Rename nsHTMLHeadingElement to mozilla::dom::HTMLHeadingElement. Review of attachment 695425 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/html/content/src/nsHTMLHeadingElement.cpp @@ +9,5 @@ > #include "nsStyleConsts.h" > #include "nsMappedAttributes.h" > #include "nsRuleData.h" > #include "mozAutoDocUpdate.h" > +#include "mozilla/dom/HTMLHeadingElement.h" Include this first, to make sure the header doesn't depend on anything included before it. ::: content/html/content/src/HTMLHeadingElement.h @@ +36,5 @@ > + > + virtual bool ParseAttribute(int32_t aNamespaceID, > + nsIAtom* aAttribute, > + const nsAString& aValue, > + nsAttrValue& aResult); Indentation @@ +39,5 @@ > + const nsAString& aValue, > + nsAttrValue& aResult); > + NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const; > + nsMapRuleToAttributesFunc GetAttributeMappingFunction() const; > + virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; * to the left
> Include this first, to make sure the header doesn't depend on anything included before > it. Eh. OK. Will fix the ParseAttribute indent. No plans to "fix" the copied code. ;)
Whiteboard: [need review]
Blocks: 772466
Attachment #695425 - Flags: review?(peterv) → review+
Attachment #695426 - Flags: review?(peterv) → review+
Hmm, need to add include guards to HTMLHeadingElement.h.
Good catch. Done.
As expected, this gave us wins on dom-attr, ranging from 5% to 17% depending on the build configuration.
Attachment #695854 - Flags: review?(peterv) → review+
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: