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

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 according to esprehn's comment. Created 6 years 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "core/loader/UniqueIdentifier.h" 72 #include "core/loader/UniqueIdentifier.h"
73 #include "core/loader/appcache/ApplicationCacheHost.h" 73 #include "core/loader/appcache/ApplicationCacheHost.h"
74 #include "core/page/Chrome.h" 74 #include "core/page/Chrome.h"
75 #include "core/page/ChromeClient.h" 75 #include "core/page/ChromeClient.h"
76 #include "core/page/CreateWindow.h" 76 #include "core/page/CreateWindow.h"
77 #include "core/page/EventHandler.h" 77 #include "core/page/EventHandler.h"
78 #include "core/page/FrameTree.h" 78 #include "core/page/FrameTree.h"
79 #include "core/page/Page.h" 79 #include "core/page/Page.h"
80 #include "core/page/WindowFeatures.h" 80 #include "core/page/WindowFeatures.h"
81 #include "core/page/scrolling/ScrollingCoordinator.h" 81 #include "core/page/scrolling/ScrollingCoordinator.h"
82 #include "core/svg/graphics/SVGImage.h"
82 #include "core/xml/parser/XMLDocumentParser.h" 83 #include "core/xml/parser/XMLDocumentParser.h"
83 #include "platform/Logging.h" 84 #include "platform/Logging.h"
84 #include "platform/UserGestureIndicator.h" 85 #include "platform/UserGestureIndicator.h"
85 #include "platform/geometry/FloatRect.h" 86 #include "platform/geometry/FloatRect.h"
86 #include "platform/network/HTTPParsers.h" 87 #include "platform/network/HTTPParsers.h"
87 #include "platform/network/ResourceRequest.h" 88 #include "platform/network/ResourceRequest.h"
88 #include "platform/scroll/ScrollAnimator.h" 89 #include "platform/scroll/ScrollAnimator.h"
89 #include "platform/weborigin/SecurityOrigin.h" 90 #include "platform/weborigin/SecurityOrigin.h"
90 #include "platform/weborigin/SecurityPolicy.h" 91 #include "platform/weborigin/SecurityPolicy.h"
91 #include "public/platform/WebURLRequest.h" 92 #include "public/platform/WebURLRequest.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 return; 231 return;
231 m_currentItem->clearScrollPoint(); 232 m_currentItem->clearScrollPoint();
232 m_currentItem->setPageScaleFactor(0); 233 m_currentItem->setPageScaleFactor(0);
233 } 234 }
234 235
235 bool FrameLoader::closeURL() 236 bool FrameLoader::closeURL()
236 { 237 {
237 saveScrollState(); 238 saveScrollState();
238 239
239 // Should only send the pagehide event here if the current document exists. 240 // Should only send the pagehide event here if the current document exists.
240 if (m_frame->document()) 241 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document()))
241 m_frame->document()->dispatchUnloadEvents(); 242 m_frame->document()->dispatchUnloadEvents();
242 stopLoading(); 243 stopLoading();
243 244
244 if (Page* page = m_frame->page()) 245 if (Page* page = m_frame->page())
245 page->undoStack().didUnloadFrame(*m_frame); 246 page->undoStack().didUnloadFrame(*m_frame);
246 return true; 247 return true;
247 } 248 }
248 249
249 void FrameLoader::didExplicitOpen() 250 void FrameLoader::didExplicitOpen()
250 { 251 {
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. 1465 // FIXME: We need a way to propagate sandbox flags to out-of-process frames.
1465 Frame* parentFrame = m_frame->tree().parent(); 1466 Frame* parentFrame = m_frame->tree().parent();
1466 if (parentFrame && parentFrame->isLocalFrame()) 1467 if (parentFrame && parentFrame->isLocalFrame())
1467 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); 1468 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags();
1468 if (FrameOwner* frameOwner = m_frame->owner()) 1469 if (FrameOwner* frameOwner = m_frame->owner())
1469 flags |= frameOwner->sandboxFlags(); 1470 flags |= frameOwner->sandboxFlags();
1470 return flags; 1471 return flags;
1471 } 1472 }
1472 1473
1473 } // namespace blink 1474 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698