| OLD | NEW |
| 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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 } | 495 } |
| 496 | 496 |
| 497 void FrameLoader::didExplicitOpen() | 497 void FrameLoader::didExplicitOpen() |
| 498 { | 498 { |
| 499 m_isComplete = false; | 499 m_isComplete = false; |
| 500 m_didCallImplicitClose = false; | 500 m_didCallImplicitClose = false; |
| 501 | 501 |
| 502 // Calling document.open counts as committing the first real document load. | 502 // Calling document.open counts as committing the first real document load. |
| 503 if (!m_stateMachine.committedFirstRealDocumentLoad()) | 503 if (!m_stateMachine.committedFirstRealDocumentLoad()) |
| 504 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmpty
DocumentPostCommit); | 504 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmpty
DocumentPostCommit); |
| 505 | 505 |
| 506 // Prevent window.open(url) -- eg window.open("about:blank") -- from blowing
away results | 506 // Prevent window.open(url) -- eg window.open("about:blank") -- from blowing
away results |
| 507 // from a subsequent window.document.open / window.document.write call. | 507 // from a subsequent window.document.open / window.document.write call. |
| 508 // Canceling redirection here works for all cases because document.open | 508 // Canceling redirection here works for all cases because document.open |
| 509 // implicitly precedes document.write. | 509 // implicitly precedes document.write. |
| 510 m_frame->navigationScheduler()->cancel(); | 510 m_frame->navigationScheduler()->cancel(); |
| 511 } | 511 } |
| 512 | 512 |
| 513 | 513 |
| 514 void FrameLoader::cancelAndClear() | 514 void FrameLoader::cancelAndClear() |
| 515 { | 515 { |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1511 // loader that hasn't been deleted but has been detached from its frame. Suc
h a | 1511 // loader that hasn't been deleted but has been detached from its frame. Suc
h a |
| 1512 // DocumentLoader has been sufficiently detached that we'll end up in an inc
onsistent | 1512 // DocumentLoader has been sufficiently detached that we'll end up in an inc
onsistent |
| 1513 // state if we try to use it. | 1513 // state if we try to use it. |
| 1514 if (loader && !loader->frame()) | 1514 if (loader && !loader->frame()) |
| 1515 return; | 1515 return; |
| 1516 | 1516 |
| 1517 if (m_documentLoader) | 1517 if (m_documentLoader) |
| 1518 m_documentLoader->detachFromFrame(); | 1518 m_documentLoader->detachFromFrame(); |
| 1519 | 1519 |
| 1520 m_documentLoader = loader; | 1520 m_documentLoader = loader; |
| 1521 |
| 1522 if(m_frame->ownerElement() && !m_frame->ownerElement()->loadedNonEmptyDocume
nt() && m_documentLoader && !m_documentLoader->requestURL().isBlankURL() && !m_d
ocumentLoader-> requestURL().isEmpty()) |
| 1523 m_frame->ownerElement()->didLoadNonEmptyDocument(); |
| 1521 } | 1524 } |
| 1522 | 1525 |
| 1523 void FrameLoader::setPolicyDocumentLoader(DocumentLoader* loader) | 1526 void FrameLoader::setPolicyDocumentLoader(DocumentLoader* loader) |
| 1524 { | 1527 { |
| 1525 if (m_policyDocumentLoader == loader) | 1528 if (m_policyDocumentLoader == loader) |
| 1526 return; | 1529 return; |
| 1527 | 1530 |
| 1528 ASSERT(m_frame); | 1531 ASSERT(m_frame); |
| 1529 if (loader) | 1532 if (loader) |
| 1530 loader->setFrame(m_frame); | 1533 loader->setFrame(m_frame); |
| (...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2996 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); | 2999 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); |
| 2997 | 3000 |
| 2998 page->chrome()->setWindowRect(newWindowRect); | 3001 page->chrome()->setWindowRect(newWindowRect); |
| 2999 page->chrome()->show(); | 3002 page->chrome()->show(); |
| 3000 | 3003 |
| 3001 created = true; | 3004 created = true; |
| 3002 return frame; | 3005 return frame; |
| 3003 } | 3006 } |
| 3004 | 3007 |
| 3005 } // namespace WebCore | 3008 } // namespace WebCore |
| OLD | NEW |