| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 461 |
| 462 // FIXME: If this SVG ends up loading itself, we might leak the world. | 462 // FIXME: If this SVG ends up loading itself, we might leak the world. |
| 463 // The Cache code does not know about ImageResources holding Frames and | 463 // The Cache code does not know about ImageResources holding Frames and |
| 464 // won't know to break the cycle. | 464 // won't know to break the cycle. |
| 465 // This will become an issue when SVGImage will be able to load other | 465 // This will become an issue when SVGImage will be able to load other |
| 466 // SVGImage objects, but we're safe now, because SVGImage can only be | 466 // SVGImage objects, but we're safe now, because SVGImage can only be |
| 467 // loaded by a top-level document. | 467 // loaded by a top-level document. |
| 468 OwnPtrWillBeRawPtr<Page> page; | 468 OwnPtrWillBeRawPtr<Page> page; |
| 469 { | 469 { |
| 470 TRACE_EVENT0("blink", "SVGImage::dataChanged::createPage"); | 470 TRACE_EVENT0("blink", "SVGImage::dataChanged::createPage"); |
| 471 page = adoptPtrWillBeNoop(new Page(pageClients)); | 471 page = Page::create(pageClients); |
| 472 page->settings().setScriptEnabled(false); | 472 page->settings().setScriptEnabled(false); |
| 473 page->settings().setPluginsEnabled(false); | 473 page->settings().setPluginsEnabled(false); |
| 474 page->settings().setAcceleratedCompositingEnabled(false); | 474 page->settings().setAcceleratedCompositingEnabled(false); |
| 475 | 475 |
| 476 // Because this page is detached, it can't get default font settings | 476 // Because this page is detached, it can't get default font settings |
| 477 // from the embedder. Copy over font settings so we have sensible | 477 // from the embedder. Copy over font settings so we have sensible |
| 478 // defaults. These settings are fixed and will not update if changed
. | 478 // defaults. These settings are fixed and will not update if changed
. |
| 479 if (!Page::ordinaryPages().isEmpty()) { | 479 if (!Page::ordinaryPages().isEmpty()) { |
| 480 Settings& defaultSettings = (*Page::ordinaryPages().begin())->se
ttings(); | 480 Settings& defaultSettings = (*Page::ordinaryPages().begin())->se
ttings(); |
| 481 page->settings().genericFontFamilySettings() = defaultSettings.g
enericFontFamilySettings(); | 481 page->settings().genericFontFamilySettings() = defaultSettings.g
enericFontFamilySettings(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 | 513 |
| 514 return m_page; | 514 return m_page; |
| 515 } | 515 } |
| 516 | 516 |
| 517 String SVGImage::filenameExtension() const | 517 String SVGImage::filenameExtension() const |
| 518 { | 518 { |
| 519 return "svg"; | 519 return "svg"; |
| 520 } | 520 } |
| 521 | 521 |
| 522 } | 522 } |
| OLD | NEW |