Closed Bug 1410281 Opened 8 years ago Closed 8 years ago

use GetBaseURIForStyleAttr for style attribute base URI in nsTreeSanitizer

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(1 file)

We missed one instance of style attribute parsing in bug 1406277 that needs to change to using GetBaseURIForStyleAttr().
Comment on attachment 8920432 [details] Bug 1410281 - Use GetBaseURIForStyleAttr for style attribute base URI in nsTreeSanitizer. https://reviewboard.mozilla.org/r/191406/#review196588 ::: dom/base/nsTreeSanitizer.cpp:1163 (Diff revision 1) > int32_t attrNs = attrName->NamespaceID(); > RefPtr<nsAtom> attrLocal = attrName->LocalName(); > > if (kNameSpaceID_None == attrNs) { > if (aAllowStyle && nsGkAtoms::style == attrLocal) { > - nsCOMPtr<nsIURI> baseURI = aElement->GetBaseURI(); > + nsCOMPtr<nsIURI> baseURI = aElement->GetBaseURIForStyleAttr(); `nsIURI*` is enough. Actually you can merge this into `ParseStyleAttribute` call directly as that's the only place uses it.
Attachment #8920432 - Flags: review?(xidorn+moz) → review+
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b4b50a948629 Use GetBaseURIForStyleAttr for style attribute base URI in nsTreeSanitizer. r=xidorn
Priority: -- → P3
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
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: