OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 else | 160 else |
161 m_view->setVisibleContentScaleFactor(page()->pageScaleFactor()); | 161 m_view->setVisibleContentScaleFactor(page()->pageScaleFactor()); |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 void LocalFrame::sendOrientationChangeEvent() | 165 void LocalFrame::sendOrientationChangeEvent() |
166 { | 166 { |
167 if (!RuntimeEnabledFeatures::orientationEventEnabled() && !RuntimeEnabledFea tures::screenOrientationEnabled()) | 167 if (!RuntimeEnabledFeatures::orientationEventEnabled() && !RuntimeEnabledFea tures::screenOrientationEnabled()) |
168 return; | 168 return; |
169 | 169 |
170 // Don't fire 'orientationchange' events at pages that are not visible. | |
mlamouri (slow - plz ping)
2014/05/28 14:05:33
nit: I'm pretty sure the code is self explanatory
Inactive
2014/05/28 15:27:28
Done.
| |
171 if (page()->visibilityState() != PageVisibilityStateVisible) | |
172 return; | |
173 | |
170 DOMWindow* window = domWindow(); | 174 DOMWindow* window = domWindow(); |
171 if (!window) | 175 if (!window) |
172 return; | 176 return; |
173 window->dispatchEvent(Event::create(EventTypeNames::orientationchange)); | 177 window->dispatchEvent(Event::create(EventTypeNames::orientationchange)); |
174 | 178 |
175 // Notify subframes. | 179 // Notify subframes. |
176 Vector<RefPtr<LocalFrame> > childFrames; | 180 Vector<RefPtr<LocalFrame> > childFrames; |
177 for (LocalFrame* child = tree().firstChild(); child; child = child->tree().n extSibling()) | 181 for (LocalFrame* child = tree().firstChild(); child; child = child->tree().n extSibling()) |
178 childFrames.append(child); | 182 childFrames.append(child); |
179 | 183 |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
651 LocalFrame* LocalFrame::localFrameRoot() | 655 LocalFrame* LocalFrame::localFrameRoot() |
652 { | 656 { |
653 LocalFrame* curFrame = this; | 657 LocalFrame* curFrame = this; |
654 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame()) | 658 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame()) |
655 curFrame = curFrame->tree().parent(); | 659 curFrame = curFrame->tree().parent(); |
656 | 660 |
657 return curFrame; | 661 return curFrame; |
658 } | 662 } |
659 | 663 |
660 } // namespace WebCore | 664 } // namespace WebCore |
OLD | NEW |