Closed
Bug 1276938
Opened 5 years ago
Closed 5 years ago
Optimize string usage in setAttribute when dealing with HTML elements
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
Details
Attachments
(1 file)
7.26 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
We do a virtual call to InternalGetExistingAttrNameFromQName and nsContentUtils::ASCIIToLower is called twice when adding an attribute. The patch tries to be consistent with the new aNameToUse handling so that it is set to some value only if there isn't existing attribute. https://treeherder.mozilla.org/#/jobs?repo=try&revision=dd4376104618b3320af40503bd366b78063f7811
Attachment #8758272 -
Flags: review?(amarchesini)
Comment 1•5 years ago
|
||
Comment on attachment 8758272 [details] [diff] [review] less_attr_lowercase.diff Review of attachment 8758272 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/Element.h @@ +659,5 @@ > const nsAString& aLocalName, > ErrorResult& aError); > bool HasAttribute(const nsAString& aName) const > { > + return InternalGetAttrNameFromQName(aName) != nullptr; maybe !!InternalGetAttrNameFromQName(aName);
Attachment #8758272 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 2•5 years ago
|
||
well, I just renamed the method, not changed its usage.
Assignee | ||
Comment 3•5 years ago
|
||
hmm, tryserver seems to have some unrelated issues atm.
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b7b7ea5b410e Optimize string usage in setAttribute when dealing with HTML elements, r=baku
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b7b7ea5b410e
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•