| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 if (!headerContentLanguage.isEmpty()) | 670 if (!headerContentLanguage.isEmpty()) |
| 671 m_frame->document()->setContentLanguage(headerContentLanguage); | 671 m_frame->document()->setContentLanguage(headerContentLanguage); |
| 672 } | 672 } |
| 673 } | 673 } |
| 674 | 674 |
| 675 history()->restoreDocumentState(); | 675 history()->restoreDocumentState(); |
| 676 } | 676 } |
| 677 | 677 |
| 678 void FrameLoader::finishedParsing() | 678 void FrameLoader::finishedParsing() |
| 679 { | 679 { |
| 680 m_frame->injectUserScripts(InjectAtDocumentEnd); | |
| 681 | |
| 682 if (m_stateMachine.creatingInitialEmptyDocument()) | 680 if (m_stateMachine.creatingInitialEmptyDocument()) |
| 683 return; | 681 return; |
| 684 | 682 |
| 685 // This can be called from the Frame's destructor, in which case we shouldn'
t protect ourselves | 683 // This can be called from the Frame's destructor, in which case we shouldn'
t protect ourselves |
| 686 // because doing so will cause us to re-enter the destructor when protector
goes out of scope. | 684 // because doing so will cause us to re-enter the destructor when protector
goes out of scope. |
| 687 // Null-checking the FrameView indicates whether or not we're in the destruc
tor. | 685 // Null-checking the FrameView indicates whether or not we're in the destruc
tor. |
| 688 RefPtr<Frame> protector = m_frame->view() ? m_frame : 0; | 686 RefPtr<Frame> protector = m_frame->view() ? m_frame : 0; |
| 689 | 687 |
| 690 m_client->dispatchDidFinishDocumentLoad(); | 688 m_client->dispatchDidFinishDocumentLoad(); |
| 691 | 689 |
| (...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3066 documentLoader()->setTitle(title); | 3064 documentLoader()->setTitle(title); |
| 3067 } | 3065 } |
| 3068 | 3066 |
| 3069 String FrameLoader::referrer() const | 3067 String FrameLoader::referrer() const |
| 3070 { | 3068 { |
| 3071 return m_documentLoader ? m_documentLoader->request().httpReferrer() : ""; | 3069 return m_documentLoader ? m_documentLoader->request().httpReferrer() : ""; |
| 3072 } | 3070 } |
| 3073 | 3071 |
| 3074 void FrameLoader::dispatchDocumentElementAvailable() | 3072 void FrameLoader::dispatchDocumentElementAvailable() |
| 3075 { | 3073 { |
| 3076 m_frame->injectUserScripts(InjectAtDocumentStart); | |
| 3077 m_client->documentElementAvailable(); | 3074 m_client->documentElementAvailable(); |
| 3078 } | 3075 } |
| 3079 | 3076 |
| 3080 void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() | 3077 void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds() |
| 3081 { | 3078 { |
| 3082 if (!m_frame->script()->canExecuteScripts(NotAboutToExecuteScript)) | 3079 if (!m_frame->script()->canExecuteScripts(NotAboutToExecuteScript)) |
| 3083 return; | 3080 return; |
| 3084 | 3081 |
| 3085 Vector<RefPtr<DOMWrapperWorld> > worlds; | 3082 Vector<RefPtr<DOMWrapperWorld> > worlds; |
| 3086 ScriptController::getAllWorlds(worlds); | 3083 ScriptController::getAllWorlds(worlds); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3275 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); | 3272 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); |
| 3276 | 3273 |
| 3277 page->chrome()->setWindowRect(newWindowRect); | 3274 page->chrome()->setWindowRect(newWindowRect); |
| 3278 page->chrome()->show(); | 3275 page->chrome()->show(); |
| 3279 | 3276 |
| 3280 created = true; | 3277 created = true; |
| 3281 return frame; | 3278 return frame; |
| 3282 } | 3279 } |
| 3283 | 3280 |
| 3284 } // namespace WebCore | 3281 } // namespace WebCore |
| OLD | NEW |