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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 resourceURLs->append(url); | 133 resourceURLs->append(url); |
134 } | 134 } |
135 | 135 |
136 void retrieveResourcesForFrame(Frame* frame, | 136 void retrieveResourcesForFrame(Frame* frame, |
137 const WebKit::WebVector<WebKit::WebCString>& supp
ortedSchemes, | 137 const WebKit::WebVector<WebKit::WebCString>& supp
ortedSchemes, |
138 Vector<Frame*>* visitedFrames, | 138 Vector<Frame*>* visitedFrames, |
139 Vector<Frame*>* framesToVisit, | 139 Vector<Frame*>* framesToVisit, |
140 Vector<KURL>* frameURLs, | 140 Vector<KURL>* frameURLs, |
141 Vector<KURL>* resourceURLs) | 141 Vector<KURL>* resourceURLs) |
142 { | 142 { |
143 KURL frameURL = frame->loader()->documentLoader()->request().url(); | 143 KURL frameURL = frame->loader().documentLoader()->request().url(); |
144 | 144 |
145 // If the frame's URL is invalid, ignore it, it is not retrievable. | 145 // If the frame's URL is invalid, ignore it, it is not retrievable. |
146 if (!frameURL.isValid()) | 146 if (!frameURL.isValid()) |
147 return; | 147 return; |
148 | 148 |
149 // Ignore frames from unsupported schemes. | 149 // Ignore frames from unsupported schemes. |
150 bool isValidScheme = false; | 150 bool isValidScheme = false; |
151 for (size_t i = 0; i < supportedSchemes.size(); ++i) { | 151 for (size_t i = 0; i < supportedSchemes.size(); ++i) { |
152 if (frameURL.protocolIs(static_cast<CString>(supportedSchemes[i]).data()
)) { | 152 if (frameURL.protocolIs(static_cast<CString>(supportedSchemes[i]).data()
)) { |
153 isValidScheme = true; | 153 isValidScheme = true; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar
get) | 293 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar
get) |
294 { | 294 { |
295 if (baseTarget.isEmpty()) | 295 if (baseTarget.isEmpty()) |
296 return String("<base href=\".\">"); | 296 return String("<base href=\".\">"); |
297 String baseString = "<base href=\".\" target=\"" + static_cast<const String&
>(baseTarget) + "\">"; | 297 String baseString = "<base href=\".\" target=\"" + static_cast<const String&
>(baseTarget) + "\">"; |
298 return baseString; | 298 return baseString; |
299 } | 299 } |
300 | 300 |
301 } // namespace WebKit | 301 } // namespace WebKit |
OLD | NEW |