| OLD | NEW |
| 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 Loading... |
| 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 if (LocalFrame* frame = toHTMLFrameOwnerElement(element)->contentFrame()
) { | 89 Frame* frame = toHTMLFrameOwnerElement(element)->contentFrame(); |
| 90 if (!visitedFrames->contains(frame)) | 90 if (frame && frame->isLocalFrame()) { |
| 91 framesToVisit->append(frame); | 91 if (!visitedFrames->contains(toLocalFrame(frame))) |
| 92 framesToVisit->append(toLocalFrame(frame)); |
| 92 return; | 93 return; |
| 93 } | 94 } |
| 94 } | 95 } |
| 95 | 96 |
| 96 KURL url = getSubResourceURLFromElement(element); | 97 KURL url = getSubResourceURLFromElement(element); |
| 97 if (url.isEmpty() || !url.isValid()) | 98 if (url.isEmpty() || !url.isValid()) |
| 98 return; // No subresource for this node. | 99 return; // No subresource for this node. |
| 99 | 100 |
| 100 // Ignore URLs that have a non-standard protocols. Since the FTP protocol | 101 // Ignore URLs that have a non-standard protocols. Since the FTP protocol |
| 101 // does no have a cache mechanism, we skip it as well. | 102 // does no have a cache mechanism, we skip it as well. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 263 |
| 263 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar
get) | 264 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar
get) |
| 264 { | 265 { |
| 265 if (baseTarget.isEmpty()) | 266 if (baseTarget.isEmpty()) |
| 266 return String("<base href=\".\">"); | 267 return String("<base href=\".\">"); |
| 267 String baseString = "<base href=\".\" target=\"" + static_cast<const String&
>(baseTarget) + "\">"; | 268 String baseString = "<base href=\".\" target=\"" + static_cast<const String&
>(baseTarget) + "\">"; |
| 268 return baseString; | 269 return baseString; |
| 269 } | 270 } |
| 270 | 271 |
| 271 } // namespace blink | 272 } // namespace blink |
| OLD | NEW |