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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 LocalDOMWindow* LocalDOMWindow::toDOMWindow() | 478 LocalDOMWindow* LocalDOMWindow::toDOMWindow() |
479 { | 479 { |
480 return this; | 480 return this; |
481 } | 481 } |
482 | 482 |
483 PassRefPtrWillBeRawPtr<MediaQueryList> LocalDOMWindow::matchMedia(const String&
media) | 483 PassRefPtrWillBeRawPtr<MediaQueryList> LocalDOMWindow::matchMedia(const String&
media) |
484 { | 484 { |
485 return document() ? document()->mediaQueryMatcher().matchMedia(media) : null
ptr; | 485 return document() ? document()->mediaQueryMatcher().matchMedia(media) : null
ptr; |
486 } | 486 } |
487 | 487 |
488 Page* LocalDOMWindow::page() | |
489 { | |
490 return frame() ? frame()->page() : nullptr; | |
491 } | |
492 | |
493 void LocalDOMWindow::willDetachFrameHost() | 488 void LocalDOMWindow::willDetachFrameHost() |
494 { | 489 { |
495 frame()->host()->eventHandlerRegistry().didRemoveAllEventHandlers(*this); | 490 frame()->host()->eventHandlerRegistry().didRemoveAllEventHandlers(*this); |
496 frame()->host()->consoleMessageStorage().frameWindowDiscarded(this); | 491 frame()->host()->consoleMessageStorage().frameWindowDiscarded(this); |
497 LocalDOMWindow::notifyContextDestroyed(); | 492 LocalDOMWindow::notifyContextDestroyed(); |
498 } | 493 } |
499 | 494 |
500 void LocalDOMWindow::frameDestroyed() | 495 void LocalDOMWindow::frameDestroyed() |
501 { | 496 { |
502 willDestroyDocumentInFrame(); | 497 willDestroyDocumentInFrame(); |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 { | 1501 { |
1507 // If the LocalDOMWindow still has a frame reference, that frame must point | 1502 // If the LocalDOMWindow still has a frame reference, that frame must point |
1508 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1503 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
1509 // where script execution leaks between different LocalDOMWindows. | 1504 // where script execution leaks between different LocalDOMWindows. |
1510 if (m_frameObserver->frame()) | 1505 if (m_frameObserver->frame()) |
1511 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1506 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
1512 return m_frameObserver->frame(); | 1507 return m_frameObserver->frame(); |
1513 } | 1508 } |
1514 | 1509 |
1515 } // namespace blink | 1510 } // namespace blink |
OLD | NEW |