| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 &frameKURLs, &resourceKURLs); | 258 &frameKURLs, &resourceKURLs); |
| 259 } | 259 } |
| 260 | 260 |
| 261 // Converts the results to WebURLs. | 261 // Converts the results to WebURLs. |
| 262 WebVector<WebURL> resultResourceURLs(resourceKURLs.size()); | 262 WebVector<WebURL> resultResourceURLs(resourceKURLs.size()); |
| 263 for (size_t i = 0; i < resourceKURLs.size(); ++i) { | 263 for (size_t i = 0; i < resourceKURLs.size(); ++i) { |
| 264 resultResourceURLs[i] = resourceKURLs[i]; | 264 resultResourceURLs[i] = resourceKURLs[i]; |
| 265 // A frame's src can point to the same URL as another resource, keep the | 265 // A frame's src can point to the same URL as another resource, keep the |
| 266 // resource URL only in such cases. | 266 // resource URL only in such cases. |
| 267 size_t index = frameKURLs.find(resourceKURLs[i]); | 267 size_t index = frameKURLs.find(resourceKURLs[i]); |
| 268 if (index != notFound) | 268 if (index != kNotFound) |
| 269 frameKURLs.remove(index); | 269 frameKURLs.remove(index); |
| 270 } | 270 } |
| 271 *resourceURLs = resultResourceURLs; | 271 *resourceURLs = resultResourceURLs; |
| 272 WebVector<WebURL> resultFrameURLs(frameKURLs.size()); | 272 WebVector<WebURL> resultFrameURLs(frameKURLs.size()); |
| 273 for (size_t i = 0; i < frameKURLs.size(); ++i) | 273 for (size_t i = 0; i < frameKURLs.size(); ++i) |
| 274 resultFrameURLs[i] = frameKURLs[i]; | 274 resultFrameURLs[i] = frameKURLs[i]; |
| 275 *frameURLs = resultFrameURLs; | 275 *frameURLs = resultFrameURLs; |
| 276 | 276 |
| 277 return true; | 277 return true; |
| 278 } | 278 } |
| (...skipping 13 matching lines...) Expand all 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 |