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

Side by Side Diff: Source/core/loader/FrameLoader.cpp

Issue 787143002: Enable SVGImage to dispatch events in the destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update Created 5 years, 11 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
« no previous file with comments | « LayoutTests/svg/dispatch-event-crash-on-destruct-expected.txt ('k') | no next file » | 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, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "core/loader/UniqueIdentifier.h" 73 #include "core/loader/UniqueIdentifier.h"
74 #include "core/loader/appcache/ApplicationCacheHost.h" 74 #include "core/loader/appcache/ApplicationCacheHost.h"
75 #include "core/page/Chrome.h" 75 #include "core/page/Chrome.h"
76 #include "core/page/ChromeClient.h" 76 #include "core/page/ChromeClient.h"
77 #include "core/page/CreateWindow.h" 77 #include "core/page/CreateWindow.h"
78 #include "core/page/EventHandler.h" 78 #include "core/page/EventHandler.h"
79 #include "core/page/FrameTree.h" 79 #include "core/page/FrameTree.h"
80 #include "core/page/Page.h" 80 #include "core/page/Page.h"
81 #include "core/page/WindowFeatures.h" 81 #include "core/page/WindowFeatures.h"
82 #include "core/page/scrolling/ScrollingCoordinator.h" 82 #include "core/page/scrolling/ScrollingCoordinator.h"
83 #include "core/svg/graphics/SVGImage.h"
83 #include "core/xml/parser/XMLDocumentParser.h" 84 #include "core/xml/parser/XMLDocumentParser.h"
84 #include "platform/Logging.h" 85 #include "platform/Logging.h"
85 #include "platform/UserGestureIndicator.h" 86 #include "platform/UserGestureIndicator.h"
86 #include "platform/geometry/FloatRect.h" 87 #include "platform/geometry/FloatRect.h"
87 #include "platform/network/HTTPParsers.h" 88 #include "platform/network/HTTPParsers.h"
88 #include "platform/network/ResourceRequest.h" 89 #include "platform/network/ResourceRequest.h"
89 #include "platform/scroll/ScrollAnimator.h" 90 #include "platform/scroll/ScrollAnimator.h"
90 #include "platform/weborigin/SecurityOrigin.h" 91 #include "platform/weborigin/SecurityOrigin.h"
91 #include "platform/weborigin/SecurityPolicy.h" 92 #include "platform/weborigin/SecurityPolicy.h"
92 #include "public/platform/WebURLRequest.h" 93 #include "public/platform/WebURLRequest.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (!m_currentItem) 211 if (!m_currentItem)
211 return; 212 return;
212 m_currentItem->clearScrollPoint(); 213 m_currentItem->clearScrollPoint();
213 m_currentItem->setPageScaleFactor(0); 214 m_currentItem->setPageScaleFactor(0);
214 } 215 }
215 216
216 void FrameLoader::dispatchUnloadEvent() 217 void FrameLoader::dispatchUnloadEvent()
217 { 218 {
218 saveScrollState(); 219 saveScrollState();
219 220
220 if (m_frame->document()) 221 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document()))
221 m_frame->document()->dispatchUnloadEvents(); 222 m_frame->document()->dispatchUnloadEvents();
222 223
223 if (Page* page = m_frame->page()) 224 if (Page* page = m_frame->page())
224 page->undoStack().didUnloadFrame(*m_frame); 225 page->undoStack().didUnloadFrame(*m_frame);
225 } 226 }
226 227
227 void FrameLoader::didExplicitOpen() 228 void FrameLoader::didExplicitOpen()
228 { 229 {
229 // Calling document.open counts as committing the first real document load. 230 // Calling document.open counts as committing the first real document load.
230 if (!m_stateMachine.committedFirstRealDocumentLoad()) { 231 if (!m_stateMachine.committedFirstRealDocumentLoad()) {
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 1393
1393 // FIXME: We need a way to propagate strict mixed content checking flags to 1394 // FIXME: We need a way to propagate strict mixed content checking flags to
1394 // out-of-process frames. For now, we'll always enforce. 1395 // out-of-process frames. For now, we'll always enforce.
1395 if (!parentFrame->isLocalFrame()) 1396 if (!parentFrame->isLocalFrame())
1396 return true; 1397 return true;
1397 1398
1398 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking(); 1399 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking();
1399 } 1400 }
1400 1401
1401 } // namespace blink 1402 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/svg/dispatch-event-crash-on-destruct-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698