Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: content/renderer/savable_resources.cc

Issue 1416113012: Save-Page-As-Complete-HTML: Better handling of <object> elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multi-frame-tests
Patch Set: Rebasing... Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/save_page_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/savable_resources.cc
diff --git a/content/renderer/savable_resources.cc b/content/renderer/savable_resources.cc
index fc9ad350a786616af47e9bd62604b039f4d0c12f..4c62c7cda77b5cc0a57532860e66d5116a03b5c5 100644
--- a/content/renderer/savable_resources.cc
+++ b/content/renderer/savable_resources.cc
@@ -129,6 +129,12 @@ WebString GetSubResourceLinkFromElement(const WebElement& element) {
element.hasHTMLTagName("del") ||
element.hasHTMLTagName("ins")) {
attribute_name = "cite";
+ } else if (element.hasHTMLTagName("object")) {
+ // TODO(lukasza): When <object> contains a html document, it should be
+ // reported as a subframe, not as a savable resource (reporting as a
+ // savable resource works, but will save original html contents, not
+ // current html contents of the frame).
+ attribute_name = "data";
} else if (element.hasHTMLTagName("link")) {
// If the link element is not linked to css, ignore it.
if (base::LowerCaseEqualsASCII(
« no previous file with comments | « chrome/browser/download/save_page_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698