| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2  * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 
| 3  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 
| 4  * | 4  * | 
| 5  * Redistribution and use in source and binary forms, with or without | 5  * Redistribution and use in source and binary forms, with or without | 
| 6  * modification, are permitted provided that the following conditions | 6  * modification, are permitted provided that the following conditions | 
| 7  * are met: | 7  * are met: | 
| 8  * 1. Redistributions of source code must retain the above copyright | 8  * 1. 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  * 2. Redistributions in binary form must reproduce the above copyright | 10  * 2. Redistributions in binary form must reproduce the above copyright | 
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 327 { | 327 { | 
| 328     ASSERT(!document || document->frame() == m_frame); | 328     ASSERT(!document || document->frame() == m_frame); | 
| 329     if (m_document) { | 329     if (m_document) { | 
| 330         if (m_document->attached()) { | 330         if (m_document->attached()) { | 
| 331             // FIXME: We don't call willRemove here. Why is that OK? | 331             // FIXME: We don't call willRemove here. Why is that OK? | 
| 332             // This detach() call is also mostly redundant. Most of the calls to | 332             // This detach() call is also mostly redundant. Most of the calls to | 
| 333             // this function come via DocumentLoader::createWriterFor, which | 333             // this function come via DocumentLoader::createWriterFor, which | 
| 334             // always detaches the previous Document first. Only XSLTProcessor | 334             // always detaches the previous Document first. Only XSLTProcessor | 
| 335             // depends on this detach() call, so it seems like there's some room | 335             // depends on this detach() call, so it seems like there's some room | 
| 336             // for cleanup. | 336             // for cleanup. | 
| 337             m_document->detach(); | 337             m_document->destroyRenderTree(); | 
| 338         } | 338         } | 
| 339         m_document->setDOMWindow(0); | 339         m_document->setDOMWindow(0); | 
| 340     } | 340     } | 
| 341 | 341 | 
| 342     m_document = document; | 342     m_document = document; | 
| 343 | 343 | 
| 344     if (!m_document) | 344     if (!m_document) | 
| 345         return; | 345         return; | 
| 346 | 346 | 
| 347     m_document->setDOMWindow(this); | 347     m_document->setDOMWindow(this); | 
| 348     if (!m_document->attached()) | 348     if (!m_document->attached()) | 
| 349         m_document->attach(); | 349         m_document->createRenderTree(); | 
| 350 | 350 | 
| 351     if (!m_frame) | 351     if (!m_frame) | 
| 352         return; | 352         return; | 
| 353 | 353 | 
| 354     m_frame->script()->updateDocument(); | 354     m_frame->script()->updateDocument(); | 
| 355     m_document->updateViewportArguments(); | 355     m_document->updateViewportArguments(); | 
| 356 | 356 | 
| 357     if (m_frame->page() && m_frame->view()) { | 357     if (m_frame->page() && m_frame->view()) { | 
| 358         if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll
      ingCoordinator()) { | 358         if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll
      ingCoordinator()) { | 
| 359             scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_frame-
      >view(), HorizontalScrollbar); | 359             scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_frame-
      >view(), HorizontalScrollbar); | 
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1752     return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleN
      otifier()); | 1752     return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleN
      otifier()); | 
| 1753 } | 1753 } | 
| 1754 | 1754 | 
| 1755 PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier() | 1755 PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier() | 
| 1756 { | 1756 { | 
| 1757     return DOMWindowLifecycleNotifier::create(this); | 1757     return DOMWindowLifecycleNotifier::create(this); | 
| 1758 } | 1758 } | 
| 1759 | 1759 | 
| 1760 | 1760 | 
| 1761 } // namespace WebCore | 1761 } // namespace WebCore | 
| OLD | NEW | 
|---|