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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 143783002: Make it possible for the embedder to run unload handlers in subframes. Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoader.h ('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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 if (!frame) 2460 if (!frame)
2461 return true; 2461 return true;
2462 2462
2463 return frame->loader().shouldClose(); 2463 return frame->loader().shouldClose();
2464 } 2464 }
2465 2465
2466 void WebViewImpl::dispatchUnloadEvent() 2466 void WebViewImpl::dispatchUnloadEvent()
2467 { 2467 {
2468 // Run unload handlers. 2468 // Run unload handlers.
2469 m_page->mainFrame()->loader().closeURL(); 2469 m_page->mainFrame()->loader().closeURL();
2470 m_page->mainFrame()->loader().detachChildren();
2470 } 2471 }
2471 2472
2472 WebFrame* WebViewImpl::mainFrame() 2473 WebFrame* WebViewImpl::mainFrame()
2473 { 2474 {
2474 return mainFrameImpl(); 2475 return mainFrameImpl();
2475 } 2476 }
2476 2477
2477 WebFrame* WebViewImpl::findFrameByName( 2478 WebFrame* WebViewImpl::findFrameByName(
2478 const WebString& name, WebFrame* relativeToFrame) 2479 const WebString& name, WebFrame* relativeToFrame)
2479 { 2480 {
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
3990 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3991 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3991 3992
3992 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3993 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3993 return false; 3994 return false;
3994 3995
3995 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 3996 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
3996 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 3997 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
3997 } 3998 }
3998 3999
3999 } // namespace blink 4000 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698