| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 FrameLoader* loader = frame->loader(); | 348 FrameLoader* loader = frame->loader(); |
| 349 loader->forceSandboxFlags(SandboxAll); | 349 loader->forceSandboxFlags(SandboxAll); |
| 350 | 350 |
| 351 frame->view()->setScrollbarsSuppressed(true); | 351 frame->view()->setScrollbarsSuppressed(true); |
| 352 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy
nthesize a viewBox, if it's not available, and thus never see scrollbars. | 352 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy
nthesize a viewBox, if it's not available, and thus never see scrollbars. |
| 353 frame->view()->setTransparent(true); // SVG Images are transparent. | 353 frame->view()->setTransparent(true); // SVG Images are transparent. |
| 354 | 354 |
| 355 ASSERT(loader->activeDocumentLoader()); // DocumentLoader should have be
en created by frame->init(). | 355 ASSERT(loader->activeDocumentLoader()); // DocumentLoader should have be
en created by frame->init(). |
| 356 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("i
mage/svg+xml", "UTF-8"); | 356 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("i
mage/svg+xml", "UTF-8"); |
| 357 writer->addData(data()->data(), data()->size()); | 357 writer->addData(data()->data(), data()->size()); |
| 358 writer->end(); | 358 loader->activeDocumentLoader()->endWriting(writer); |
| 359 // Set the intrinsic size before a container size is available. | 359 // Set the intrinsic size before a container size is available. |
| 360 m_intrinsicSize = containerSize(); | 360 m_intrinsicSize = containerSize(); |
| 361 } | 361 } |
| 362 | 362 |
| 363 return m_page; | 363 return m_page; |
| 364 } | 364 } |
| 365 | 365 |
| 366 String SVGImage::filenameExtension() const | 366 String SVGImage::filenameExtension() const |
| 367 { | 367 { |
| 368 return "svg"; | 368 return "svg"; |
| 369 } | 369 } |
| 370 | 370 |
| 371 void SVGImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 371 void SVGImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
| 372 { | 372 { |
| 373 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceImage); | 373 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceImage); |
| 374 Image::reportMemoryUsage(memoryObjectInfo); | 374 Image::reportMemoryUsage(memoryObjectInfo); |
| 375 info.addMember(m_chromeClient, "chromeClient"); | 375 info.addMember(m_chromeClient, "chromeClient"); |
| 376 info.addMember(m_page, "page"); | 376 info.addMember(m_page, "page"); |
| 377 } | 377 } |
| 378 | 378 |
| 379 } | 379 } |
| 380 | 380 |
| OLD | NEW |