| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 m_resources->append(SerializedResource(url, document.suggestedMIMEType(), Sh
aredBuffer::create(frameHTML.data(), frameHTML.length()))); | 242 m_resources->append(SerializedResource(url, document.suggestedMIMEType(), Sh
aredBuffer::create(frameHTML.data(), frameHTML.length()))); |
| 243 m_resourceURLs.add(url); | 243 m_resourceURLs.add(url); |
| 244 | 244 |
| 245 for (Node* node: serializedNodes) { | 245 for (Node* node: serializedNodes) { |
| 246 ASSERT(node); | 246 ASSERT(node); |
| 247 if (!node->isElementNode()) | 247 if (!node->isElementNode()) |
| 248 continue; | 248 continue; |
| 249 | 249 |
| 250 Element& element = toElement(*node); | 250 Element& element = toElement(*node); |
| 251 // We have to process in-line style as it might contain some resources (
typically background images). | 251 // We have to process in-line style as it might contain some resources (
typically background images). |
| 252 if (element.isStyledElement()) | 252 if (element.isStyledElement()) { |
| 253 retrieveResourcesForProperties(element.inlineStyle(), document); | 253 retrieveResourcesForProperties(element.inlineStyle(), document); |
| 254 retrieveResourcesForProperties(element.presentationAttributeStyle(),
document); |
| 255 } |
| 254 | 256 |
| 255 if (isHTMLImageElement(element)) { | 257 if (isHTMLImageElement(element)) { |
| 256 HTMLImageElement& imageElement = toHTMLImageElement(element); | 258 HTMLImageElement& imageElement = toHTMLImageElement(element); |
| 257 KURL url = document.completeURL(imageElement.getAttribute(HTMLNames:
:srcAttr)); | 259 KURL url = document.completeURL(imageElement.getAttribute(HTMLNames:
:srcAttr)); |
| 258 ImageResource* cachedImage = imageElement.cachedImage(); | 260 ImageResource* cachedImage = imageElement.cachedImage(); |
| 259 addImageToResources(cachedImage, imageElement.layoutObject(), url); | 261 addImageToResources(cachedImage, imageElement.layoutObject(), url); |
| 260 } else if (isHTMLInputElement(element)) { | 262 } else if (isHTMLInputElement(element)) { |
| 261 HTMLInputElement& inputElement = toHTMLInputElement(element); | 263 HTMLInputElement& inputElement = toHTMLInputElement(element); |
| 262 if (inputElement.type() == InputTypeNames::image && inputElement.ima
geLoader()) { | 264 if (inputElement.type() == InputTypeNames::image && inputElement.ima
geLoader()) { |
| 263 KURL url = inputElement.src(); | 265 KURL url = inputElement.src(); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 418 |
| 417 return fakeURL; | 419 return fakeURL; |
| 418 } | 420 } |
| 419 | 421 |
| 420 PageSerializer::Delegate* PageSerializer::delegate() | 422 PageSerializer::Delegate* PageSerializer::delegate() |
| 421 { | 423 { |
| 422 return m_delegate.get(); | 424 return m_delegate.get(); |
| 423 } | 425 } |
| 424 | 426 |
| 425 } // namespace blink | 427 } // namespace blink |
| OLD | NEW |