Chromium Code Reviews| Index: Source/web/WebViewImpl.cpp |
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
| index 51c45460b378c2f15239fceba6f3b17969307127..0f8af0913004786143820c8fcd6dbee1a94d463f 100644 |
| --- a/Source/web/WebViewImpl.cpp |
| +++ b/Source/web/WebViewImpl.cpp |
| @@ -1621,6 +1621,15 @@ void WebViewImpl::resize(const WebSize& newSize) |
| if (pinchVirtualViewportEnabled()) |
| page()->frameHost().pinchViewport().setSize(m_size); |
| + |
| + // When device emulation is enabled, device size values may change - they are |
| + // usually set equal to the view size. These values are not considered viewport-dependent |
| + // (see MediaQueryExp::isViewportDependent), and will not be invalidated in |FrameView::performPreLayoutTasks|. |
|
ojan
2014/06/10 17:22:37
I would add something like...
These values are no
dgozman
2014/06/18 13:15:43
Done.
|
| + // Therefore we should force explicit media queries invalidation here. |
| + if (page()->inspectorController().deviceEmulationEnabled()) { |
| + if (Document* document = mainFrameImpl()->frame()->document()) |
| + document->mediaQueryAffectingValueChanged(); |
| + } |
| } |
| if (settings()->viewportEnabled() && !m_fixedLayoutSizeLock) { |