| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 if (!data) { | 305 if (!data) { |
| 306 WTF_LOG_ERROR("No data for resource %s", url.string().utf8().data()); | 306 WTF_LOG_ERROR("No data for resource %s", url.string().utf8().data()); |
| 307 return; | 307 return; |
| 308 } | 308 } |
| 309 | 309 |
| 310 String mimeType = resource->response().mimeType(); | 310 String mimeType = resource->response().mimeType(); |
| 311 m_resources->append(SerializedResource(url, mimeType, data)); | 311 m_resources->append(SerializedResource(url, mimeType, data)); |
| 312 m_resourceURLs.add(url); | 312 m_resourceURLs.add(url); |
| 313 } | 313 } |
| 314 | 314 |
| 315 void PageSerializer::addImageToResources(ImageResource* image, RenderObject* ima
geRenderer, const KURL& url) | 315 void PageSerializer::addImageToResources(ImageResource* image, LayoutObject* ima
geRenderer, const KURL& url) |
| 316 { | 316 { |
| 317 if (!shouldAddURL(url)) | 317 if (!shouldAddURL(url)) |
| 318 return; | 318 return; |
| 319 | 319 |
| 320 if (!image || image->image() == Image::nullImage() || image->errorOccurred()
) | 320 if (!image || image->image() == Image::nullImage() || image->errorOccurred()
) |
| 321 return; | 321 return; |
| 322 | 322 |
| 323 RefPtr<SharedBuffer> data = imageRenderer ? image->imageForRenderer(imageRen
derer)->data() : nullptr; | 323 RefPtr<SharedBuffer> data = imageRenderer ? image->imageForRenderer(imageRen
derer)->data() : nullptr; |
| 324 if (!data) | 324 if (!data) |
| 325 data = image->image()->data(); | 325 data = image->image()->data(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 if (iter != m_blankFrameURLs.end()) | 382 if (iter != m_blankFrameURLs.end()) |
| 383 return iter->value; | 383 return iter->value; |
| 384 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); | 384 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); |
| 385 KURL fakeURL(ParsedURLString, url); | 385 KURL fakeURL(ParsedURLString, url); |
| 386 m_blankFrameURLs.add(frame, fakeURL); | 386 m_blankFrameURLs.add(frame, fakeURL); |
| 387 | 387 |
| 388 return fakeURL; | 388 return fakeURL; |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace blink | 391 } // namespace blink |
| OLD | NEW |