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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 | 312 |
313 Document* LocalDOMWindow::installNewDocument(const String& mimeType, const Docum
entInit& init, bool forceXHTML) | 313 Document* LocalDOMWindow::installNewDocument(const String& mimeType, const Docum
entInit& init, bool forceXHTML) |
314 { | 314 { |
315 ASSERT(init.frame() == frame()); | 315 ASSERT(init.frame() == frame()); |
316 | 316 |
317 clearDocument(); | 317 clearDocument(); |
318 | 318 |
319 m_document = createDocument(mimeType, init, forceXHTML); | 319 m_document = createDocument(mimeType, init, forceXHTML); |
320 m_eventQueue = DOMWindowEventQueue::create(m_document.get()); | 320 m_eventQueue = DOMWindowEventQueue::create(m_document.get()); |
321 m_document->attachLayoutTree(); | 321 m_document->initialize(); |
322 | 322 |
323 if (!frame()) | 323 if (!frame()) |
324 return m_document; | 324 return m_document; |
325 | 325 |
326 frame()->script().updateDocument(); | 326 frame()->script().updateDocument(); |
327 m_document->updateViewportDescription(); | 327 m_document->updateViewportDescription(); |
328 | 328 |
329 if (frame()->page() && frame()->view()) { | 329 if (frame()->page() && frame()->view()) { |
330 if (ScrollingCoordinator* scrollingCoordinator = frame()->page()->scroll
ingCoordinator()) { | 330 if (ScrollingCoordinator* scrollingCoordinator = frame()->page()->scroll
ingCoordinator()) { |
331 scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(frame()-
>view(), HorizontalScrollbar); | 331 scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(frame()-
>view(), HorizontalScrollbar); |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 LocalFrame* LocalDOMWindow::frame() const | 1497 LocalFrame* LocalDOMWindow::frame() const |
1498 { | 1498 { |
1499 // If the LocalDOMWindow still has a frame reference, that frame must point | 1499 // If the LocalDOMWindow still has a frame reference, that frame must point |
1500 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1500 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
1501 // where script execution leaks between different LocalDOMWindows. | 1501 // where script execution leaks between different LocalDOMWindows. |
1502 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); | 1502 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); |
1503 return m_frame; | 1503 return m_frame; |
1504 } | 1504 } |
1505 | 1505 |
1506 } // namespace blink | 1506 } // namespace blink |
OLD | NEW |