OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
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 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1430 if (shouldReloadToHandleUnreachableURL(newDocumentLoader)) { | 1430 if (shouldReloadToHandleUnreachableURL(newDocumentLoader)) { |
1431 ASSERT(type == FrameLoadTypeStandard); | 1431 ASSERT(type == FrameLoadTypeStandard); |
1432 type = FrameLoadTypeReload; | 1432 type = FrameLoadTypeReload; |
1433 } | 1433 } |
1434 | 1434 |
1435 loadWithDocumentLoader(newDocumentLoader, type, 0); | 1435 loadWithDocumentLoader(newDocumentLoader, type, 0); |
1436 } | 1436 } |
1437 | 1437 |
1438 void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
ype, PassRefPtr<FormState> prpFormState) | 1438 void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
ype, PassRefPtr<FormState> prpFormState) |
1439 { | 1439 { |
| 1440 // Retain because dispatchBeforeLoadEvent may release the last reference to
it. |
| 1441 RefPtr<Frame> protect(m_frame); |
| 1442 |
1440 ASSERT(m_client->hasWebView()); | 1443 ASSERT(m_client->hasWebView()); |
1441 | 1444 |
1442 // Unfortunately the view must be non-nil, this is ultimately due | 1445 // Unfortunately the view must be non-nil, this is ultimately due |
1443 // to parser requiring a FrameView. We should fix this dependency. | 1446 // to parser requiring a FrameView. We should fix this dependency. |
1444 | 1447 |
1445 ASSERT(m_frame->view()); | 1448 ASSERT(m_frame->view()); |
1446 | 1449 |
1447 if (m_pageDismissalEventBeingDispatched) | 1450 if (m_pageDismissalEventBeingDispatched) |
1448 return; | 1451 return; |
1449 | 1452 |
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3521 windowRect.setHeight(features.height + (windowRect.height() - pageSize.h
eight())); | 3524 windowRect.setHeight(features.height + (windowRect.height() - pageSize.h
eight())); |
3522 page->chrome()->setWindowRect(windowRect); | 3525 page->chrome()->setWindowRect(windowRect); |
3523 | 3526 |
3524 page->chrome()->show(); | 3527 page->chrome()->show(); |
3525 | 3528 |
3526 created = true; | 3529 created = true; |
3527 return frame; | 3530 return frame; |
3528 } | 3531 } |
3529 | 3532 |
3530 } // namespace WebCore | 3533 } // namespace WebCore |
OLD | NEW |