Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 362773003: [DevTools] Explicitly enable/disable Page.viewportChanged protocol event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: bound to setDeviceMetricsOverride Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index 57483985c9b9a8f6112b28889f8934e7d6bfb976..33969743824d7fbf18d70d274ac9fea96a1cbbef 100644
--- a/Source/core/inspector/InspectorPageAgent.cpp
+++ b/Source/core/inspector/InspectorPageAgent.cpp
@@ -1166,7 +1166,7 @@ void InspectorPageAgent::didScroll()
void InspectorPageAgent::viewportChanged()
{
- if (!m_enabled)
+ if (!m_enabled || !m_deviceMetricsOverridden)
return;
IntSize contentsSize = m_page->deprecatedLocalMainFrame()->view()->contentsSize();
IntRect viewRect = m_page->deprecatedLocalMainFrame()->view()->visibleContentRect();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698