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

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

Issue 17640007: Refactoring: Simplify DocumentWriter by reorganizing its lifetime. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Re-landing after fixing ASAN failure on set-parent-src-synchronously.xhtml. Created 7 years, 5 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/DocumentWriter.cpp ('k') | Source/core/loader/TextResourceDecoderBuilder.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, 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 Frame* sourceFrame = formState ? formState->sourceDocument()->frame() : m_fr ame; 997 Frame* sourceFrame = formState ? formState->sourceDocument()->frame() : m_fr ame;
998 if (!sourceFrame) 998 if (!sourceFrame)
999 sourceFrame = m_frame; 999 sourceFrame = m_frame;
1000 Frame* targetFrame = sourceFrame->loader()->findFrameForNavigation(request.f rameName()); 1000 Frame* targetFrame = sourceFrame->loader()->findFrameForNavigation(request.f rameName());
1001 if (targetFrame && targetFrame != sourceFrame) { 1001 if (targetFrame && targetFrame != sourceFrame) {
1002 if (Page* page = targetFrame->page()) 1002 if (Page* page = targetFrame->page())
1003 page->chrome().focus(); 1003 page->chrome().focus();
1004 } 1004 }
1005 } 1005 }
1006 1006
1007 void FrameLoader::loadURL(const ResourceRequest& request, const String& frameNam e, FrameLoadType newLoadType, 1007 void FrameLoader::loadURL(const ResourceRequest& request, const String& frameNam e, FrameLoadType newLoadType, PassRefPtr<Event> event, PassRefPtr<FormState> for mState)
1008 PassRefPtr<Event> event, PassRefPtr<FormState> formState)
1009 { 1008 {
1010 if (m_inStopAllLoaders) 1009 if (m_inStopAllLoaders)
1011 return; 1010 return;
1012 1011
1013 bool isFormSubmission = formState; 1012 bool isFormSubmission = formState;
1014 1013
1015 ASSERT(newLoadType != FrameLoadTypeSame); 1014 ASSERT(newLoadType != FrameLoadTypeSame);
1016 1015
1017 // The search for a target frame is done earlier in the case of form submiss ion. 1016 // The search for a target frame is done earlier in the case of form submiss ion.
1018 Frame* targetFrame = isFormSubmission ? 0 : findFrameForNavigation(frameName ); 1017 Frame* targetFrame = isFormSubmission ? 0 : findFrameForNavigation(frameName );
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); 2526 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect);
2528 2527
2529 page->chrome().setWindowRect(newWindowRect); 2528 page->chrome().setWindowRect(newWindowRect);
2530 page->chrome().show(); 2529 page->chrome().show();
2531 2530
2532 created = true; 2531 created = true;
2533 return frame; 2532 return frame;
2534 } 2533 }
2535 2534
2536 } // namespace WebCore 2535 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentWriter.cpp ('k') | Source/core/loader/TextResourceDecoderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698