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

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: Fixed a build breakage Created 7 years, 6 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
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 17 matching lines...) Expand all
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35 #include "config.h" 35 #include "config.h"
36 #include "core/loader/FrameLoader.h" 36 #include "core/loader/FrameLoader.h"
37 37
38 #include <wtf/CurrentTime.h>
39 #include <wtf/MemoryInstrumentationHashSet.h>
40 #include <wtf/StdLibExtras.h>
41 #include <wtf/text/CString.h>
42 #include <wtf/text/WTFString.h>
43 #include "HTMLNames.h" 38 #include "HTMLNames.h"
44 #include "SVGNames.h" 39 #include "SVGNames.h"
45 #include "bindings/v8/DOMWrapperWorld.h" 40 #include "bindings/v8/DOMWrapperWorld.h"
46 #include "bindings/v8/ScriptController.h" 41 #include "bindings/v8/ScriptController.h"
47 #include "bindings/v8/ScriptSourceCode.h" 42 #include "bindings/v8/ScriptSourceCode.h"
48 #include "bindings/v8/SerializedScriptValue.h" 43 #include "bindings/v8/SerializedScriptValue.h"
49 #include "core/accessibility/AXObjectCache.h" 44 #include "core/accessibility/AXObjectCache.h"
50 #include "core/dom/BeforeUnloadEvent.h" 45 #include "core/dom/BeforeUnloadEvent.h"
51 #include "core/dom/DOMImplementation.h" 46 #include "core/dom/DOMImplementation.h"
52 #include "core/dom/Document.h" 47 #include "core/dom/Document.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #include "core/svg/SVGLocatable.h" 102 #include "core/svg/SVGLocatable.h"
108 #include "core/svg/SVGPreserveAspectRatio.h" 103 #include "core/svg/SVGPreserveAspectRatio.h"
109 #include "core/svg/SVGSVGElement.h" 104 #include "core/svg/SVGSVGElement.h"
110 #include "core/svg/SVGViewElement.h" 105 #include "core/svg/SVGViewElement.h"
111 #include "core/svg/SVGViewSpec.h" 106 #include "core/svg/SVGViewSpec.h"
112 #include "core/xml/parser/XMLDocumentParser.h" 107 #include "core/xml/parser/XMLDocumentParser.h"
113 #include "modules/webdatabase/DatabaseManager.h" 108 #include "modules/webdatabase/DatabaseManager.h"
114 #include "weborigin/SchemeRegistry.h" 109 #include "weborigin/SchemeRegistry.h"
115 #include "weborigin/SecurityOrigin.h" 110 #include "weborigin/SecurityOrigin.h"
116 #include "weborigin/SecurityPolicy.h" 111 #include "weborigin/SecurityPolicy.h"
117 112 #include "wtf/CurrentTime.h"
113 #include "wtf/MemoryInstrumentationHashSet.h"
114 #include "wtf/StdLibExtras.h"
115 #include "wtf/text/CString.h"
116 #include "wtf/text/WTFString.h"
118 117
119 namespace WebCore { 118 namespace WebCore {
120 119
121 using namespace HTMLNames; 120 using namespace HTMLNames;
122 using namespace SVGNames; 121 using namespace SVGNames;
123 122
124 static const char defaultAcceptHeader[] = "text/html,application/xhtml+xml,appli cation/xml;q=0.9,*/*;q=0.8"; 123 static const char defaultAcceptHeader[] = "text/html,application/xhtml+xml,appli cation/xml;q=0.9,*/*;q=0.8";
125 124
126 bool isBackForwardLoadType(FrameLoadType type) 125 bool isBackForwardLoadType(FrameLoadType type)
127 { 126 {
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 Frame* sourceFrame = formState ? formState->sourceDocument()->frame() : m_fr ame; 1021 Frame* sourceFrame = formState ? formState->sourceDocument()->frame() : m_fr ame;
1023 if (!sourceFrame) 1022 if (!sourceFrame)
1024 sourceFrame = m_frame; 1023 sourceFrame = m_frame;
1025 Frame* targetFrame = sourceFrame->loader()->findFrameForNavigation(request.f rameName()); 1024 Frame* targetFrame = sourceFrame->loader()->findFrameForNavigation(request.f rameName());
1026 if (targetFrame && targetFrame != sourceFrame) { 1025 if (targetFrame && targetFrame != sourceFrame) {
1027 if (Page* page = targetFrame->page()) 1026 if (Page* page = targetFrame->page())
1028 page->chrome().focus(); 1027 page->chrome().focus();
1029 } 1028 }
1030 } 1029 }
1031 1030
1032 void FrameLoader::loadURL(const ResourceRequest& request, const String& frameNam e, FrameLoadType newLoadType, 1031 void FrameLoader::loadURL(const ResourceRequest& request, const String& frameNam e, FrameLoadType newLoadType, PassRefPtr<Event> event, PassRefPtr<FormState> for mState)
1033 PassRefPtr<Event> event, PassRefPtr<FormState> formState)
1034 { 1032 {
1035 if (m_inStopAllLoaders) 1033 if (m_inStopAllLoaders)
1036 return; 1034 return;
1037 1035
1038 bool isFormSubmission = formState; 1036 bool isFormSubmission = formState;
1039 1037
1040 ASSERT(newLoadType != FrameLoadTypeSame); 1038 ASSERT(newLoadType != FrameLoadTypeSame);
1041 1039
1042 // The search for a target frame is done earlier in the case of form submiss ion. 1040 // The search for a target frame is done earlier in the case of form submiss ion.
1043 Frame* targetFrame = isFormSubmission ? 0 : findFrameForNavigation(frameName ); 1041 Frame* targetFrame = isFormSubmission ? 0 : findFrameForNavigation(frameName );
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); 2540 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect);
2543 2541
2544 page->chrome().setWindowRect(newWindowRect); 2542 page->chrome().setWindowRect(newWindowRect);
2545 page->chrome().show(); 2543 page->chrome().show();
2546 2544
2547 created = true; 2545 created = true;
2548 return frame; 2546 return frame;
2549 } 2547 }
2550 2548
2551 } // namespace WebCore 2549 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698