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

Unified Diff: Source/core/css/MediaQueryEvaluator.cpp

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Another rebase Created 7 years, 2 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
Index: Source/core/css/MediaQueryEvaluator.cpp
diff --git a/Source/core/css/MediaQueryEvaluator.cpp b/Source/core/css/MediaQueryEvaluator.cpp
index d4eaa3f2890dc75004a52102629ddfc3c5e64077..3002abbe9f6d0339eb14034d0593d77f70e211db 100644
--- a/Source/core/css/MediaQueryEvaluator.cpp
+++ b/Source/core/css/MediaQueryEvaluator.cpp
@@ -359,9 +359,7 @@ static bool deviceHeightMediaFeatureEval(CSSValue* value, RenderStyle* style, Fr
if (value) {
FloatRect sg = screenRect(frame->page()->mainFrame()->view());
int length;
- long height = sg.height();
- InspectorInstrumentation::applyScreenHeightOverride(frame, &height);
- return computeLength(value, !frame->document()->inQuirksMode(), style, length) && compareValue(static_cast<int>(height), length, op);
+ return computeLength(value, !frame->document()->inQuirksMode(), style, length) && compareValue(static_cast<int>(sg.height()), length, op);
}
// ({,min-,max-}device-height)
// assume if we have a device, assume non-zero
@@ -373,9 +371,7 @@ static bool deviceWidthMediaFeatureEval(CSSValue* value, RenderStyle* style, Fra
if (value) {
FloatRect sg = screenRect(frame->page()->mainFrame()->view());
int length;
- long width = sg.width();
- InspectorInstrumentation::applyScreenWidthOverride(frame, &width);
- return computeLength(value, !frame->document()->inQuirksMode(), style, length) && compareValue(static_cast<int>(width), length, op);
+ return computeLength(value, !frame->document()->inQuirksMode(), style, length) && compareValue(static_cast<int>(sg.width()), length, op);
}
// ({,min-,max-}device-width)
// assume if we have a device, assume non-zero
« no previous file with comments | « LayoutTests/inspector/styles/override-screen-size-expected.txt ('k') | Source/core/inspector/InspectorClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698