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

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

Issue 346403002: Initialize WebCore::Frame when swapping frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tests, less leaks Created 6 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/web/WebRemoteFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('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) 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 { 310 {
311 ASSERT(pageLoadDeferrerStack().size()); 311 ASSERT(pageLoadDeferrerStack().size());
312 312
313 delete pageLoadDeferrerStack().last(); 313 delete pageLoadDeferrerStack().last();
314 pageLoadDeferrerStack().removeLast(); 314 pageLoadDeferrerStack().removeLast();
315 } 315 }
316 316
317 void WebViewImpl::setMainFrame(WebFrame* frame) 317 void WebViewImpl::setMainFrame(WebFrame* frame)
318 { 318 {
319 if (frame->isWebLocalFrame()) 319 if (frame->isWebLocalFrame())
320 toWebLocalFrameImpl(frame)->initializeAsMainFrame(page()); 320 toWebLocalFrameImpl(frame)->initializeWebCoreFrame(&page()->frameHost(), 0, nullAtom, nullAtom);
321 else 321 else
322 toWebRemoteFrameImpl(frame)->initializeAsMainFrame(page()); 322 toWebRemoteFrameImpl(frame)->initializeWebCoreFrame(&page()->frameHost() , 0, nullAtom);
323 } 323 }
324 324
325 void WebViewImpl::setAutofillClient(WebAutofillClient* autofillClient) 325 void WebViewImpl::setAutofillClient(WebAutofillClient* autofillClient)
326 { 326 {
327 m_autofillClient = autofillClient; 327 m_autofillClient = autofillClient;
328 } 328 }
329 329
330 void WebViewImpl::setDevToolsAgentClient(WebDevToolsAgentClient* devToolsClient) 330 void WebViewImpl::setDevToolsAgentClient(WebDevToolsAgentClient* devToolsClient)
331 { 331 {
332 if (devToolsClient) 332 if (devToolsClient)
(...skipping 3829 matching lines...) Expand 10 before | Expand all | Expand 10 after
4162 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4162 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4163 4163
4164 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4164 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4165 return false; 4165 return false;
4166 4166
4167 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4167 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4168 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4168 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4169 } 4169 }
4170 4170
4171 } // namespace blink 4171 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698