Chromium Code Reviews| Index: Source/core/frame/LocalFrame.cpp |
| diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp |
| index 09c78c8d4f8ed7b0cb884c85ee56f153ecf98978..63708d4c0660f072ea9ce54de598d8592360e1b8 100644 |
| --- a/Source/core/frame/LocalFrame.cpp |
| +++ b/Source/core/frame/LocalFrame.cpp |
| @@ -167,6 +167,10 @@ void LocalFrame::sendOrientationChangeEvent() |
| if (!RuntimeEnabledFeatures::orientationEventEnabled() && !RuntimeEnabledFeatures::screenOrientationEnabled()) |
| return; |
| + // 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.
|
| + if (page()->visibilityState() != PageVisibilityStateVisible) |
| + return; |
| + |
| DOMWindow* window = domWindow(); |
| if (!window) |
| return; |