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

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

Issue 219903002: Revert 170347 "Convert HTMLFrameOwnerElement and FocusController..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1917/
Patch Set: Created 6 years, 8 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') | Source/web/WebViewImpl.h » ('j') | 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 void retrieveResourcesForElement(Element* element, 80 void retrieveResourcesForElement(Element* element,
81 Vector<LocalFrame*>* visitedFrames, 81 Vector<LocalFrame*>* visitedFrames,
82 Vector<LocalFrame*>* framesToVisit, 82 Vector<LocalFrame*>* framesToVisit,
83 Vector<KURL>* frameURLs, 83 Vector<KURL>* frameURLs,
84 Vector<KURL>* resourceURLs) 84 Vector<KURL>* resourceURLs)
85 { 85 {
86 ASSERT(element); 86 ASSERT(element);
87 // If the node is a frame, we'll process it later in retrieveResourcesForFra me. 87 // If the node is a frame, we'll process it later in retrieveResourcesForFra me.
88 if (isHTMLFrameElementBase(*element) || isHTMLObjectElement(*element) || isH TMLEmbedElement(*element)) { 88 if (isHTMLFrameElementBase(*element) || isHTMLObjectElement(*element) || isH TMLEmbedElement(*element)) {
89 Frame* frame = toHTMLFrameOwnerElement(element)->contentFrame(); 89 if (LocalFrame* frame = toHTMLFrameOwnerElement(element)->contentFrame() ) {
90 if (frame && frame->isLocalFrame()) { 90 if (!visitedFrames->contains(frame))
91 if (!visitedFrames->contains(toLocalFrame(frame))) 91 framesToVisit->append(frame);
92 framesToVisit->append(toLocalFrame(frame));
93 return; 92 return;
94 } 93 }
95 } 94 }
96 95
97 KURL url = getSubResourceURLFromElement(element); 96 KURL url = getSubResourceURLFromElement(element);
98 if (url.isEmpty() || !url.isValid()) 97 if (url.isEmpty() || !url.isValid())
99 return; // No subresource for this node. 98 return; // No subresource for this node.
100 99
101 // Ignore URLs that have a non-standard protocols. Since the FTP protocol 100 // Ignore URLs that have a non-standard protocols. Since the FTP protocol
102 // does no have a cache mechanism, we skip it as well. 101 // does no have a cache mechanism, we skip it as well.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 262
264 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar get) 263 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar get)
265 { 264 {
266 if (baseTarget.isEmpty()) 265 if (baseTarget.isEmpty())
267 return String("<base href=\".\">"); 266 return String("<base href=\".\">");
268 String baseString = "<base href=\".\" target=\"" + static_cast<const String& >(baseTarget) + "\">"; 267 String baseString = "<base href=\".\" target=\"" + static_cast<const String& >(baseTarget) + "\">";
269 return baseString; 268 return baseString;
270 } 269 }
271 270
272 } // namespace blink 271 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698