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

Side by Side Diff: Source/web/WebPageSerializer.cpp

Issue 197873022: Drop Element::isHTMLFrameElementBase() virtual function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take tkent's feedback into consideration Created 6 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "WebFrame.h" 35 #include "WebFrame.h"
36 #include "WebFrameImpl.h" 36 #include "WebFrameImpl.h"
37 #include "WebPageSerializerClient.h" 37 #include "WebPageSerializerClient.h"
38 #include "WebPageSerializerImpl.h" 38 #include "WebPageSerializerImpl.h"
39 #include "WebView.h" 39 #include "WebView.h"
40 #include "WebViewImpl.h" 40 #include "WebViewImpl.h"
41 #include "core/dom/Document.h" 41 #include "core/dom/Document.h"
42 #include "core/dom/Element.h" 42 #include "core/dom/Element.h"
43 #include "core/frame/LocalFrame.h" 43 #include "core/frame/LocalFrame.h"
44 #include "core/html/HTMLAllCollection.h" 44 #include "core/html/HTMLAllCollection.h"
45 #include "core/html/HTMLFrameElementBase.h"
45 #include "core/html/HTMLFrameOwnerElement.h" 46 #include "core/html/HTMLFrameOwnerElement.h"
46 #include "core/html/HTMLInputElement.h" 47 #include "core/html/HTMLInputElement.h"
47 #include "core/html/HTMLTableElement.h" 48 #include "core/html/HTMLTableElement.h"
48 #include "core/loader/DocumentLoader.h" 49 #include "core/loader/DocumentLoader.h"
49 #include "core/page/PageSerializer.h" 50 #include "core/page/PageSerializer.h"
50 #include "platform/SerializedResource.h" 51 #include "platform/SerializedResource.h"
51 #include "platform/mhtml/MHTMLArchive.h" 52 #include "platform/mhtml/MHTMLArchive.h"
52 #include "platform/weborigin/KURL.h" 53 #include "platform/weborigin/KURL.h"
53 #include "public/platform/WebCString.h" 54 #include "public/platform/WebCString.h"
54 #include "public/platform/WebString.h" 55 #include "public/platform/WebString.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 105 }
105 106
106 void retrieveResourcesForElement(Element* element, 107 void retrieveResourcesForElement(Element* element,
107 Vector<LocalFrame*>* visitedFrames, 108 Vector<LocalFrame*>* visitedFrames,
108 Vector<LocalFrame*>* framesToVisit, 109 Vector<LocalFrame*>* framesToVisit,
109 Vector<KURL>* frameURLs, 110 Vector<KURL>* frameURLs,
110 Vector<KURL>* resourceURLs) 111 Vector<KURL>* resourceURLs)
111 { 112 {
112 ASSERT(element); 113 ASSERT(element);
113 // If the node is a frame, we'll process it later in retrieveResourcesForFra me. 114 // If the node is a frame, we'll process it later in retrieveResourcesForFra me.
114 if ((isHTMLIFrameElement(*element) || isHTMLFrameElement(*element) 115 if (isHTMLFrameElementBase(*element) || isHTMLObjectElement(*element) || isH TMLEmbedElement(*element)) {
115 || isHTMLObjectElement(*element) || isHTMLEmbedElement(*element))
116 && element->isFrameOwnerElement()) {
117 if (LocalFrame* frame = toHTMLFrameOwnerElement(element)->contentFrame() ) { 116 if (LocalFrame* frame = toHTMLFrameOwnerElement(element)->contentFrame() ) {
118 if (!visitedFrames->contains(frame)) 117 if (!visitedFrames->contains(frame))
119 framesToVisit->append(frame); 118 framesToVisit->append(frame);
120 return; 119 return;
121 } 120 }
122 } 121 }
123 122
124 KURL url = getSubResourceURLFromElement(element); 123 KURL url = getSubResourceURLFromElement(element);
125 if (url.isEmpty() || !url.isValid()) 124 if (url.isEmpty() || !url.isValid())
126 return; // No subresource for this node. 125 return; // No subresource for this node.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 289
291 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar get) 290 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar get)
292 { 291 {
293 if (baseTarget.isEmpty()) 292 if (baseTarget.isEmpty())
294 return String("<base href=\".\">"); 293 return String("<base href=\".\">");
295 String baseString = "<base href=\".\" target=\"" + static_cast<const String& >(baseTarget) + "\">"; 294 String baseString = "<base href=\".\" target=\"" + static_cast<const String& >(baseTarget) + "\">";
296 return baseString; 295 return baseString;
297 } 296 }
298 297
299 } // namespace blink 298 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698