Loading dom/webbrowserpersist/WebBrowserPersistLocalDocument.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -458,7 +458,9 @@ nsresult ResourceReader::OnWalkDOMNode(nsINode* aNode) { return NS_OK; } if (aNode->IsSVGElement(nsGkAtoms::img)) { if (aNode->IsSVGElement(nsGkAtoms::image)) { MOZ_TRY(OnWalkAttribute(aNode->AsElement(), nsIContentPolicy::TYPE_IMAGE, "href")); return OnWalkAttribute(aNode->AsElement(), nsIContentPolicy::TYPE_IMAGE, "href", "http://www.w3.org/1999/xlink"); } Loading Loading @@ -500,6 +502,8 @@ nsresult ResourceReader::OnWalkDOMNode(nsINode* aNode) { } if (aNode->IsSVGElement(nsGkAtoms::script)) { MOZ_TRY(OnWalkAttribute(aNode->AsElement(), nsIContentPolicy::TYPE_SCRIPT, "href")); return OnWalkAttribute(aNode->AsElement(), nsIContentPolicy::TYPE_SCRIPT, "href", "http://www.w3.org/1999/xlink"); } Loading Loading @@ -993,7 +997,7 @@ PersistNodeFixup::FixupNode(nsINode* aNodeIn, bool* aSerializeCloneKids, return rv; } if (content->IsSVGElement(nsGkAtoms::img)) { if (content->IsSVGElement(nsGkAtoms::image)) { nsresult rv = GetNodeToFixup(aNodeIn, aNodeOut); if (NS_SUCCEEDED(rv) && *aNodeOut) { // Disable image loads Loading @@ -1001,6 +1005,7 @@ PersistNodeFixup::FixupNode(nsINode* aNodeIn, bool* aSerializeCloneKids, if (imgCon) imgCon->SetLoadingEnabled(false); // FixupAnchor(*aNodeOut); // XXXjwatt: is this line needed? FixupAttribute(*aNodeOut, "href"); FixupAttribute(*aNodeOut, "href", "http://www.w3.org/1999/xlink"); } return rv; Loading @@ -1017,6 +1022,7 @@ PersistNodeFixup::FixupNode(nsINode* aNodeIn, bool* aSerializeCloneKids, if (content->IsSVGElement(nsGkAtoms::script)) { nsresult rv = GetNodeToFixup(aNodeIn, aNodeOut); if (NS_SUCCEEDED(rv) && *aNodeOut) { FixupAttribute(*aNodeOut, "href"); FixupAttribute(*aNodeOut, "href", "http://www.w3.org/1999/xlink"); } return rv; Loading toolkit/components/windowcreator/test/browser.ini +1 −0 Original line number Diff line number Diff line Loading @@ -8,5 +8,6 @@ support-files = [browser_persist.js] support-files = file_persist_srcset.html file_persist_svg.html file_persist_picture_source.html file_persist_image.png toolkit/components/windowcreator/test/browser_persist.js +1 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ const chromeBase = const REFTESTS = [ "file_persist_srcset.html", "file_persist_picture_source.html", "file_persist_svg.html", // ... ]; Loading toolkit/components/windowcreator/test/file_persist_svg.html 0 → 100644 +5 −0 Original line number Diff line number Diff line <!doctype html> <svg> <image href="file_persist_image.png"/> <image x="100" xlink:href="file_persist_image.png"/> </svg> Loading
dom/webbrowserpersist/WebBrowserPersistLocalDocument.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -458,7 +458,9 @@ nsresult ResourceReader::OnWalkDOMNode(nsINode* aNode) { return NS_OK; } if (aNode->IsSVGElement(nsGkAtoms::img)) { if (aNode->IsSVGElement(nsGkAtoms::image)) { MOZ_TRY(OnWalkAttribute(aNode->AsElement(), nsIContentPolicy::TYPE_IMAGE, "href")); return OnWalkAttribute(aNode->AsElement(), nsIContentPolicy::TYPE_IMAGE, "href", "http://www.w3.org/1999/xlink"); } Loading Loading @@ -500,6 +502,8 @@ nsresult ResourceReader::OnWalkDOMNode(nsINode* aNode) { } if (aNode->IsSVGElement(nsGkAtoms::script)) { MOZ_TRY(OnWalkAttribute(aNode->AsElement(), nsIContentPolicy::TYPE_SCRIPT, "href")); return OnWalkAttribute(aNode->AsElement(), nsIContentPolicy::TYPE_SCRIPT, "href", "http://www.w3.org/1999/xlink"); } Loading Loading @@ -993,7 +997,7 @@ PersistNodeFixup::FixupNode(nsINode* aNodeIn, bool* aSerializeCloneKids, return rv; } if (content->IsSVGElement(nsGkAtoms::img)) { if (content->IsSVGElement(nsGkAtoms::image)) { nsresult rv = GetNodeToFixup(aNodeIn, aNodeOut); if (NS_SUCCEEDED(rv) && *aNodeOut) { // Disable image loads Loading @@ -1001,6 +1005,7 @@ PersistNodeFixup::FixupNode(nsINode* aNodeIn, bool* aSerializeCloneKids, if (imgCon) imgCon->SetLoadingEnabled(false); // FixupAnchor(*aNodeOut); // XXXjwatt: is this line needed? FixupAttribute(*aNodeOut, "href"); FixupAttribute(*aNodeOut, "href", "http://www.w3.org/1999/xlink"); } return rv; Loading @@ -1017,6 +1022,7 @@ PersistNodeFixup::FixupNode(nsINode* aNodeIn, bool* aSerializeCloneKids, if (content->IsSVGElement(nsGkAtoms::script)) { nsresult rv = GetNodeToFixup(aNodeIn, aNodeOut); if (NS_SUCCEEDED(rv) && *aNodeOut) { FixupAttribute(*aNodeOut, "href"); FixupAttribute(*aNodeOut, "href", "http://www.w3.org/1999/xlink"); } return rv; Loading
toolkit/components/windowcreator/test/browser.ini +1 −0 Original line number Diff line number Diff line Loading @@ -8,5 +8,6 @@ support-files = [browser_persist.js] support-files = file_persist_srcset.html file_persist_svg.html file_persist_picture_source.html file_persist_image.png
toolkit/components/windowcreator/test/browser_persist.js +1 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ const chromeBase = const REFTESTS = [ "file_persist_srcset.html", "file_persist_picture_source.html", "file_persist_svg.html", // ... ]; Loading
toolkit/components/windowcreator/test/file_persist_svg.html 0 → 100644 +5 −0 Original line number Diff line number Diff line <!doctype html> <svg> <image href="file_persist_image.png"/> <image x="100" xlink:href="file_persist_image.png"/> </svg>