Closed
Bug 279155
Opened 20 years ago
Closed 20 years ago
Random Cleanup in nsXULElement.cpp
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: sicking, Assigned: sicking)
Details
Attachments
(1 file)
32.37 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Not sure if i should file this against DOM or XUL now that XUL is more integrated with the rest of our DOM. In any case, there's a lot of really stupid code in nsXULElement.cpp. This is a patch to clean up at least some of it. Mostly stuff like using atoms rather then strings, nsIContent rather then nsIDOMNode, and use macros to reduce source-duplication.
Assignee | ||
Comment 1•20 years ago
|
||
Attachment #171907 -
Flags: superreview?(jst)
Attachment #171907 -
Flags: review?(jst)
Comment 2•20 years ago
|
||
Comment on attachment 171907 [details] [diff] [review] Patch to fix - In IsEventHandler(nsIAtom* aName) (in nsXULElement.cpp): const char* name; aName->GetUTF8String(&name); if (name[0] != 'o' || name[1] != 'n') { return PR_FALSE; } + + return aName == nsLayoutAtoms::onclick || + aName == nsLayoutAtoms::ondblclick || + aName == nsLayoutAtoms::onmousedown || ... It'd be cool if we could combine this list of atom compares with the almost identical list of atom compares in nsGenericHTMLElement.cpp. sr=jst whether you do that or not.
Attachment #171907 -
Flags: superreview?(jst)
Attachment #171907 -
Flags: superreview+
Attachment #171907 -
Flags: review?(jst)
Attachment #171907 -
Flags: review+
Assignee | ||
Comment 3•20 years ago
|
||
I think i'd prefer to do that separatly. There's more code that can be shared between nsGenericHTMLElement and nsXULElement, so if we figure out a good way to do that lets do that then.
Comment 4•20 years ago
|
||
This comment still has the old variable name in it: /* * If aChild doesn't have children it can't be our ancestor */ - if (aChild->GetChildCount() == 0) { + if (aPossibleAncestor->GetChildCount() == 0) {
Assignee | ||
Comment 5•20 years ago
|
||
Checked in and fixed the comment. Thanks for review!
Assignee | ||
Comment 6•20 years ago
|
||
...and marking fixed
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 7•20 years ago
|
||
This bug introduced a smoketest blocker. Mail compose now crashes when you attempt to auto complete an address. I filed a blocker bug: Bug #279788. Please take a look at this as soon as possible. Thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•