Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 446063007: Rename NoEventDispatchAssertion to EventDispatchForbiddenScope and move it to platform/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/platform/EventDispatchForbiddenScope.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 12 matching lines...) Expand all
23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 29
30 #include "core/svg/graphics/SVGImage.h" 30 #include "core/svg/graphics/SVGImage.h"
31 31
32 #include "core/animation/AnimationTimeline.h" 32 #include "core/animation/AnimationTimeline.h"
33 #include "core/dom/NoEventDispatchAssertion.h"
34 #include "core/dom/NodeTraversal.h" 33 #include "core/dom/NodeTraversal.h"
35 #include "core/dom/shadow/ComposedTreeWalker.h" 34 #include "core/dom/shadow/ComposedTreeWalker.h"
36 #include "core/frame/FrameView.h" 35 #include "core/frame/FrameView.h"
37 #include "core/frame/LocalFrame.h" 36 #include "core/frame/LocalFrame.h"
38 #include "core/frame/Settings.h" 37 #include "core/frame/Settings.h"
39 #include "core/loader/FrameLoadRequest.h" 38 #include "core/loader/FrameLoadRequest.h"
40 #include "core/page/Chrome.h" 39 #include "core/page/Chrome.h"
41 #include "core/rendering/style/RenderStyle.h" 40 #include "core/rendering/style/RenderStyle.h"
42 #include "core/rendering/svg/RenderSVGRoot.h" 41 #include "core/rendering/svg/RenderSVGRoot.h"
43 #include "core/svg/SVGDocumentExtensions.h" 42 #include "core/svg/SVGDocumentExtensions.h"
44 #include "core/svg/SVGFEImageElement.h" 43 #include "core/svg/SVGFEImageElement.h"
45 #include "core/svg/SVGImageElement.h" 44 #include "core/svg/SVGImageElement.h"
46 #include "core/svg/SVGSVGElement.h" 45 #include "core/svg/SVGSVGElement.h"
47 #include "core/svg/animation/SMILTimeContainer.h" 46 #include "core/svg/animation/SMILTimeContainer.h"
48 #include "core/svg/graphics/SVGImageChromeClient.h" 47 #include "core/svg/graphics/SVGImageChromeClient.h"
48 #include "platform/EventDispatchForbiddenScope.h"
49 #include "platform/LengthFunctions.h" 49 #include "platform/LengthFunctions.h"
50 #include "platform/TraceEvent.h" 50 #include "platform/TraceEvent.h"
51 #include "platform/geometry/IntRect.h" 51 #include "platform/geometry/IntRect.h"
52 #include "platform/graphics/GraphicsContextStateSaver.h" 52 #include "platform/graphics/GraphicsContextStateSaver.h"
53 #include "platform/graphics/ImageBuffer.h" 53 #include "platform/graphics/ImageBuffer.h"
54 #include "platform/graphics/ImageObserver.h" 54 #include "platform/graphics/ImageObserver.h"
55 #include "wtf/PassRefPtr.h" 55 #include "wtf/PassRefPtr.h"
56 56
57 namespace blink { 57 namespace blink {
58 58
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 // Don't do anything if is an empty image. 380 // Don't do anything if is an empty image.
381 if (!data()->size()) 381 if (!data()->size())
382 return true; 382 return true;
383 383
384 if (allDataReceived) { 384 if (allDataReceived) {
385 // SVGImage will fire events (and the default C++ handlers run) but does n't 385 // SVGImage will fire events (and the default C++ handlers run) but does n't
386 // actually allow script to run so it's fine to call into it. We allow t his 386 // actually allow script to run so it's fine to call into it. We allow t his
387 // since it means an SVG data url can synchronously load like other imag e 387 // since it means an SVG data url can synchronously load like other imag e
388 // types. 388 // types.
389 NoEventDispatchAssertion::AllowUserAgentEvents allowUserAgentEvents; 389 EventDispatchForbiddenScope::AllowUserAgentEvents allowUserAgentEvents;
390 390
391 static FrameLoaderClient* dummyFrameLoaderClient = new EmptyFrameLoaderC lient; 391 static FrameLoaderClient* dummyFrameLoaderClient = new EmptyFrameLoaderC lient;
392 392
393 Page::PageClients pageClients; 393 Page::PageClients pageClients;
394 fillWithEmptyClients(pageClients); 394 fillWithEmptyClients(pageClients);
395 m_chromeClient = adoptPtr(new SVGImageChromeClient(this)); 395 m_chromeClient = adoptPtr(new SVGImageChromeClient(this));
396 pageClients.chromeClient = m_chromeClient.get(); 396 pageClients.chromeClient = m_chromeClient.get();
397 397
398 // FIXME: If this SVG ends up loading itself, we might leak the world. 398 // FIXME: If this SVG ends up loading itself, we might leak the world.
399 // The Cache code does not know about ImageResources holding Frames and 399 // The Cache code does not know about ImageResources holding Frames and
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 return m_page; 436 return m_page;
437 } 437 }
438 438
439 String SVGImage::filenameExtension() const 439 String SVGImage::filenameExtension() const
440 { 440 {
441 return "svg"; 441 return "svg";
442 } 442 }
443 443
444 } 444 }
OLDNEW
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/platform/EventDispatchForbiddenScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698