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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // SVGImage will fire events (and the default C++ handlers run) but does
n't | 421 // SVGImage will fire events (and the default C++ handlers run) but does
n't |
422 // actually allow script to run so it's fine to call into it. We allow t
his | 422 // actually allow script to run so it's fine to call into it. We allow t
his |
423 // since it means an SVG data url can synchronously load like other imag
e | 423 // since it means an SVG data url can synchronously load like other imag
e |
424 // types. | 424 // types. |
425 EventDispatchForbiddenScope::AllowUserAgentEvents allowUserAgentEvents; | 425 EventDispatchForbiddenScope::AllowUserAgentEvents allowUserAgentEvents; |
426 | 426 |
427 static FrameLoaderClient* dummyFrameLoaderClient = new EmptyFrameLoaderC
lient; | 427 static FrameLoaderClient* dummyFrameLoaderClient = new EmptyFrameLoaderC
lient; |
428 | 428 |
429 Page::PageClients pageClients; | 429 Page::PageClients pageClients; |
430 fillWithEmptyClients(pageClients); | 430 fillWithEmptyClients(pageClients); |
431 m_chromeClient = adoptPtr(new SVGImageChromeClient(this)); | 431 m_chromeClient = SVGImageChromeClient::create(this); |
432 pageClients.chromeClient = m_chromeClient.get(); | 432 pageClients.chromeClient = m_chromeClient.get(); |
433 | 433 |
434 // FIXME: If this SVG ends up loading itself, we might leak the world. | 434 // FIXME: If this SVG ends up loading itself, we might leak the world. |
435 // The Cache code does not know about ImageResources holding Frames and | 435 // The Cache code does not know about ImageResources holding Frames and |
436 // won't know to break the cycle. | 436 // won't know to break the cycle. |
437 // This will become an issue when SVGImage will be able to load other | 437 // This will become an issue when SVGImage will be able to load other |
438 // SVGImage objects, but we're safe now, because SVGImage can only be | 438 // SVGImage objects, but we're safe now, because SVGImage can only be |
439 // loaded by a top-level document. | 439 // loaded by a top-level document. |
440 OwnPtrWillBeRawPtr<Page> page; | 440 OwnPtrWillBeRawPtr<Page> page; |
441 { | 441 { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 485 |
486 return m_page; | 486 return m_page; |
487 } | 487 } |
488 | 488 |
489 String SVGImage::filenameExtension() const | 489 String SVGImage::filenameExtension() const |
490 { | 490 { |
491 return "svg"; | 491 return "svg"; |
492 } | 492 } |
493 | 493 |
494 } | 494 } |
OLD | NEW |