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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 return m_frame && m_frame->domWindow() == this && m_frame->host(); | 602 return m_frame && m_frame->domWindow() == this && m_frame->host(); |
603 } | 603 } |
604 | 604 |
605 void LocalDOMWindow::sendOrientationChangeEvent() | 605 void LocalDOMWindow::sendOrientationChangeEvent() |
606 { | 606 { |
607 ASSERT(RuntimeEnabledFeatures::orientationEventEnabled()); | 607 ASSERT(RuntimeEnabledFeatures::orientationEventEnabled()); |
608 | 608 |
609 // Before dispatching the event, build a list of the child frames to | 609 // Before dispatching the event, build a list of the child frames to |
610 // also send the event to, to mitigate side effects from event handlers | 610 // also send the event to, to mitigate side effects from event handlers |
611 // potentially interfering with others. | 611 // potentially interfering with others. |
612 WillBeHeapVector<RefPtr<Frame> > childFrames; | 612 WillBeHeapVector<RefPtrWillBeMember<Frame> > childFrames; |
613 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { | 613 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { |
614 childFrames.append(child); | 614 childFrames.append(child); |
615 } | 615 } |
616 | 616 |
617 dispatchEvent(Event::create(EventTypeNames::orientationchange)); | 617 dispatchEvent(Event::create(EventTypeNames::orientationchange)); |
618 | 618 |
619 for (size_t i = 0; i < childFrames.size(); ++i) { | 619 for (size_t i = 0; i < childFrames.size(); ++i) { |
620 if (childFrames[i]->domWindow()) | 620 if (childFrames[i]->domWindow()) |
621 childFrames[i]->domWindow()->sendOrientationChangeEvent(); | 621 childFrames[i]->domWindow()->sendOrientationChangeEvent(); |
622 } | 622 } |
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 FrameDestructionObserver::trace(visitor); | 1919 FrameDestructionObserver::trace(visitor); |
1920 } | 1920 } |
1921 | 1921 |
1922 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) | 1922 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) |
1923 { | 1923 { |
1924 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. | 1924 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. |
1925 return v8::Handle<v8::Object>(); | 1925 return v8::Handle<v8::Object>(); |
1926 } | 1926 } |
1927 | 1927 |
1928 } // namespace blink | 1928 } // namespace blink |
OLD | NEW |