Closed
Bug 1892376
Opened 1 year ago
Closed 1 year ago
Make `EditorBase::CloneAttributesWithTransaction()` not use `nsDOMAttributeMap`
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
127 Branch
| Tracking | Status | |
|---|---|---|
| firefox127 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
https://phabricator.services.mozilla.com/D207241#inline-1149106
I'll note that using
nsDOMAttributeMapfor code like this is not great, it's really only meant to be used from JS. It creates attribute nodes for all attributes, which you don't really need here. It would be better to useElement::GetAttrCount/GetAttrInfoAt, which allows you to get the nodeinfo and value for all attributes for an element.
| Assignee | ||
Comment 1•1 year ago
|
||
nsDOMAttributeMap::GetAttribute creates dom::Attr so that it's not cheap.
Instead it should access Element::mAttrs with the accessors or
BorrowedAttrInfo.
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/2379d951ae10
Make `EditorBase` and `HTMLEditor` not use `nsDOMAttributeMap` r=peterv,dom-core
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox127:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•