| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 9 * rights reserved. | 9 * rights reserved. |
| 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 | 488 |
| 489 domWindow()->printErrorMessage(message); | 489 domWindow()->printErrorMessage(message); |
| 490 } | 490 } |
| 491 | 491 |
| 492 void LocalFrame::printNavigationWarning(const String& message) { | 492 void LocalFrame::printNavigationWarning(const String& message) { |
| 493 m_console->addMessage( | 493 m_console->addMessage( |
| 494 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); | 494 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); |
| 495 } | 495 } |
| 496 | 496 |
| 497 WindowProxyManagerBase* LocalFrame::getWindowProxyManager() const { | 497 WindowProxyManagerBase* LocalFrame::getWindowProxyManager() const { |
| 498 return m_script->getWindowProxyManager(); | 498 return m_script; |
| 499 } | 499 } |
| 500 | 500 |
| 501 bool LocalFrame::shouldClose() { | 501 bool LocalFrame::shouldClose() { |
| 502 // TODO(dcheng): This should be fixed to dispatch beforeunload events to | 502 // TODO(dcheng): This should be fixed to dispatch beforeunload events to |
| 503 // both local and remote frames. | 503 // both local and remote frames. |
| 504 return m_loader.shouldClose(); | 504 return m_loader.shouldClose(); |
| 505 } | 505 } |
| 506 | 506 |
| 507 void LocalFrame::detachChildren() { | 507 void LocalFrame::detachChildren() { |
| 508 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document()); | 508 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document()); |
| 509 | 509 |
| 510 if (Document* document = this->document()) | 510 if (Document* document = this->document()) |
| 511 ChildFrameDisconnector(*document).disconnect(); | 511 ChildFrameDisconnector(*document).disconnect(); |
| 512 } | 512 } |
| 513 | 513 |
| 514 void LocalFrame::documentAttached() { | 514 void LocalFrame::documentAttached() { |
| 515 DCHECK(document()); | 515 DCHECK(document()); |
| 516 selection().documentAttached(document()); | 516 selection().documentAttached(document()); |
| 517 inputMethodController().documentAttached(document()); | 517 inputMethodController().documentAttached(document()); |
| 518 } | 518 } |
| 519 | 519 |
| 520 LocalDOMWindow* LocalFrame::domWindow() const { | 520 LocalDOMWindow* LocalFrame::domWindow() const { |
| 521 return toLocalDOMWindow(m_domWindow); | 521 return toLocalDOMWindow(m_domWindow); |
| 522 } | 522 } |
| 523 | 523 |
| 524 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) { | 524 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) { |
| 525 if (domWindow) | 525 if (domWindow) |
| 526 script().clearWindowProxy(); | 526 script().clearForNavigation(); |
| 527 | 527 |
| 528 if (this->domWindow()) | 528 if (this->domWindow()) |
| 529 this->domWindow()->reset(); | 529 this->domWindow()->reset(); |
| 530 m_domWindow = domWindow; | 530 m_domWindow = domWindow; |
| 531 } | 531 } |
| 532 | 532 |
| 533 Document* LocalFrame::document() const { | 533 Document* LocalFrame::document() const { |
| 534 return m_domWindow ? m_domWindow->document() : nullptr; | 534 return m_domWindow ? m_domWindow->document() : nullptr; |
| 535 } | 535 } |
| 536 | 536 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 inline LocalFrame::LocalFrame(FrameLoaderClient* client, | 877 inline LocalFrame::LocalFrame(FrameLoaderClient* client, |
| 878 FrameHost* host, | 878 FrameHost* host, |
| 879 FrameOwner* owner, | 879 FrameOwner* owner, |
| 880 InterfaceProvider* interfaceProvider, | 880 InterfaceProvider* interfaceProvider, |
| 881 InterfaceRegistry* interfaceRegistry) | 881 InterfaceRegistry* interfaceRegistry) |
| 882 : Frame(client, host, owner), | 882 : Frame(client, host, owner), |
| 883 m_frameScheduler(page()->chromeClient().createFrameScheduler( | 883 m_frameScheduler(page()->chromeClient().createFrameScheduler( |
| 884 client->frameBlameContext())), | 884 client->frameBlameContext())), |
| 885 m_loader(this), | 885 m_loader(this), |
| 886 m_navigationScheduler(NavigationScheduler::create(this)), | 886 m_navigationScheduler(NavigationScheduler::create(this)), |
| 887 m_script(ScriptController::create(this)), | 887 m_script(ScriptController::create(*this)), |
| 888 m_editor(Editor::create(*this)), | 888 m_editor(Editor::create(*this)), |
| 889 m_spellChecker(SpellChecker::create(*this)), | 889 m_spellChecker(SpellChecker::create(*this)), |
| 890 m_selection(FrameSelection::create(*this)), | 890 m_selection(FrameSelection::create(*this)), |
| 891 m_eventHandler(new EventHandler(*this)), | 891 m_eventHandler(new EventHandler(*this)), |
| 892 m_console(FrameConsole::create(*this)), | 892 m_console(FrameConsole::create(*this)), |
| 893 m_inputMethodController(InputMethodController::create(*this)), | 893 m_inputMethodController(InputMethodController::create(*this)), |
| 894 m_idleSpellCheckCallback(IdleSpellCheckCallback::create(*this)), | 894 m_idleSpellCheckCallback(IdleSpellCheckCallback::create(*this)), |
| 895 m_navigationDisableCount(0), | 895 m_navigationDisableCount(0), |
| 896 m_pageZoomFactor(parentPageZoomFactor(this)), | 896 m_pageZoomFactor(parentPageZoomFactor(this)), |
| 897 m_textZoomFactor(parentTextZoomFactor(this)), | 897 m_textZoomFactor(parentTextZoomFactor(this)), |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 943 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 944 m_frame->client()->frameBlameContext()->Enter(); | 944 m_frame->client()->frameBlameContext()->Enter(); |
| 945 } | 945 } |
| 946 | 946 |
| 947 ScopedFrameBlamer::~ScopedFrameBlamer() { | 947 ScopedFrameBlamer::~ScopedFrameBlamer() { |
| 948 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 948 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 949 m_frame->client()->frameBlameContext()->Leave(); | 949 m_frame->client()->frameBlameContext()->Leave(); |
| 950 } | 950 } |
| 951 | 951 |
| 952 } // namespace blink | 952 } // namespace blink |
| OLD | NEW |