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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 attributeName = &HTMLNames::srcAttr; | 93 attributeName = &HTMLNames::srcAttr; |
94 | 94 |
95 if (!attributeName) | 95 if (!attributeName) |
96 return KURL(); | 96 return KURL(); |
97 | 97 |
98 String value = element->getAttribute(*attributeName); | 98 String value = element->getAttribute(*attributeName); |
99 // Ignore javascript content. | 99 // Ignore javascript content. |
100 if (value.isEmpty() || value.stripWhiteSpace().startsWith("javascript:", fal
se)) | 100 if (value.isEmpty() || value.stripWhiteSpace().startsWith("javascript:", fal
se)) |
101 return KURL(); | 101 return KURL(); |
102 | 102 |
103 return element->document()->completeURL(value); | 103 return element->document().completeURL(value); |
104 } | 104 } |
105 | 105 |
106 void retrieveResourcesForElement(Element* element, | 106 void retrieveResourcesForElement(Element* element, |
107 Vector<Frame*>* visitedFrames, | 107 Vector<Frame*>* visitedFrames, |
108 Vector<Frame*>* framesToVisit, | 108 Vector<Frame*>* framesToVisit, |
109 Vector<KURL>* frameURLs, | 109 Vector<KURL>* frameURLs, |
110 Vector<KURL>* resourceURLs) | 110 Vector<KURL>* resourceURLs) |
111 { | 111 { |
112 // If the node is a frame, we'll process it later in retrieveResourcesForFra
me. | 112 // If the node is a frame, we'll process it later in retrieveResourcesForFra
me. |
113 if ((element->hasTagName(HTMLNames::iframeTag) || element->hasTagName(HTMLNa
mes::frameTag) | 113 if ((element->hasTagName(HTMLNames::iframeTag) || element->hasTagName(HTMLNa
mes::frameTag) |
(...skipping 178 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 |