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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 m_history = nullptr; | 626 m_history = nullptr; |
627 m_locationbar = nullptr; | 627 m_locationbar = nullptr; |
628 m_menubar = nullptr; | 628 m_menubar = nullptr; |
629 m_personalbar = nullptr; | 629 m_personalbar = nullptr; |
630 m_scrollbars = nullptr; | 630 m_scrollbars = nullptr; |
631 m_statusbar = nullptr; | 631 m_statusbar = nullptr; |
632 m_toolbar = nullptr; | 632 m_toolbar = nullptr; |
633 m_console = nullptr; | 633 m_console = nullptr; |
634 m_navigator = nullptr; | 634 m_navigator = nullptr; |
635 m_performance = nullptr; | 635 m_performance = nullptr; |
636 m_location = nullptr; | |
637 m_media = nullptr; | 636 m_media = nullptr; |
638 m_applicationCache = nullptr; | 637 m_applicationCache = nullptr; |
639 #if ENABLE(ASSERT) | 638 #if ENABLE(ASSERT) |
640 m_hasBeenReset = true; | 639 m_hasBeenReset = true; |
641 #endif | 640 #endif |
642 | 641 |
| 642 DOMWindow::reset(); |
| 643 |
643 LocalDOMWindow::notifyContextDestroyed(); | 644 LocalDOMWindow::notifyContextDestroyed(); |
644 } | 645 } |
645 | 646 |
646 void LocalDOMWindow::sendOrientationChangeEvent() | 647 void LocalDOMWindow::sendOrientationChangeEvent() |
647 { | 648 { |
648 ASSERT(RuntimeEnabledFeatures::orientationEventEnabled()); | 649 ASSERT(RuntimeEnabledFeatures::orientationEventEnabled()); |
649 | 650 |
650 // Before dispatching the event, build a list of the child frames to | 651 // Before dispatching the event, build a list of the child frames to |
651 // also send the event to, to mitigate side effects from event handlers | 652 // also send the event to, to mitigate side effects from event handlers |
652 // potentially interfering with others. | 653 // potentially interfering with others. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 return m_navigator.get(); | 767 return m_navigator.get(); |
767 } | 768 } |
768 | 769 |
769 Performance* LocalDOMWindow::performance() const | 770 Performance* LocalDOMWindow::performance() const |
770 { | 771 { |
771 if (!m_performance) | 772 if (!m_performance) |
772 m_performance = Performance::create(frame()); | 773 m_performance = Performance::create(frame()); |
773 return m_performance.get(); | 774 return m_performance.get(); |
774 } | 775 } |
775 | 776 |
776 Location* LocalDOMWindow::location() const | |
777 { | |
778 if (!m_location) | |
779 m_location = Location::create(frame()); | |
780 return m_location.get(); | |
781 } | |
782 | |
783 void LocalDOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, cons
t MessagePortArray* ports, const String& targetOrigin, LocalDOMWindow* source, E
xceptionState& exceptionState) | 777 void LocalDOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, cons
t MessagePortArray* ports, const String& targetOrigin, LocalDOMWindow* source, E
xceptionState& exceptionState) |
784 { | 778 { |
785 if (!isCurrentlyDisplayedInFrame()) | 779 if (!isCurrentlyDisplayedInFrame()) |
786 return; | 780 return; |
787 | 781 |
788 Document* sourceDocument = source->document(); | 782 Document* sourceDocument = source->document(); |
789 | 783 |
790 // Compute the target origin. We need to do this synchronously in order | 784 // Compute the target origin. We need to do this synchronously in order |
791 // to generate the SyntaxError exception correctly. | 785 // to generate the SyntaxError exception correctly. |
792 RefPtr<SecurityOrigin> target; | 786 RefPtr<SecurityOrigin> target; |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 visitor->trace(m_screen); | 1795 visitor->trace(m_screen); |
1802 visitor->trace(m_history); | 1796 visitor->trace(m_history); |
1803 visitor->trace(m_locationbar); | 1797 visitor->trace(m_locationbar); |
1804 visitor->trace(m_menubar); | 1798 visitor->trace(m_menubar); |
1805 visitor->trace(m_personalbar); | 1799 visitor->trace(m_personalbar); |
1806 visitor->trace(m_scrollbars); | 1800 visitor->trace(m_scrollbars); |
1807 visitor->trace(m_statusbar); | 1801 visitor->trace(m_statusbar); |
1808 visitor->trace(m_toolbar); | 1802 visitor->trace(m_toolbar); |
1809 visitor->trace(m_console); | 1803 visitor->trace(m_console); |
1810 visitor->trace(m_navigator); | 1804 visitor->trace(m_navigator); |
1811 visitor->trace(m_location); | |
1812 visitor->trace(m_media); | 1805 visitor->trace(m_media); |
1813 visitor->trace(m_applicationCache); | 1806 visitor->trace(m_applicationCache); |
1814 visitor->trace(m_performance); | 1807 visitor->trace(m_performance); |
1815 visitor->trace(m_css); | 1808 visitor->trace(m_css); |
1816 visitor->trace(m_eventQueue); | 1809 visitor->trace(m_eventQueue); |
1817 visitor->trace(m_postMessageTimers); | 1810 visitor->trace(m_postMessageTimers); |
1818 HeapSupplementable<LocalDOMWindow>::trace(visitor); | 1811 HeapSupplementable<LocalDOMWindow>::trace(visitor); |
1819 #endif | 1812 #endif |
1820 DOMWindow::trace(visitor); | 1813 DOMWindow::trace(visitor); |
1821 DOMWindowLifecycleNotifier::trace(visitor); | 1814 DOMWindowLifecycleNotifier::trace(visitor); |
1822 } | 1815 } |
1823 | 1816 |
1824 LocalFrame* LocalDOMWindow::frame() const | 1817 LocalFrame* LocalDOMWindow::frame() const |
1825 { | 1818 { |
1826 return m_frameObserver->frame(); | 1819 return m_frameObserver->frame(); |
1827 } | 1820 } |
1828 | 1821 |
1829 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) | 1822 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) |
1830 { | 1823 { |
1831 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. | 1824 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. |
1832 return v8::Handle<v8::Object>(); | 1825 return v8::Handle<v8::Object>(); |
1833 } | 1826 } |
1834 | 1827 |
1835 } // namespace blink | 1828 } // namespace blink |
OLD | NEW |