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