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

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: Reupload Created 7 years, 3 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 | Source/core/inspector/InspectorClient.h » ('j') | Source/core/page/FrameView.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryEvaluator.cpp
diff --git a/Source/core/css/MediaQueryEvaluator.cpp b/Source/core/css/MediaQueryEvaluator.cpp
index 01800e443c81384c0085ecf375fc1192d7509b1b..bb9c74854276b44bbee8b21ad56e1a6029e84c43 100644
--- a/Source/core/css/MediaQueryEvaluator.cpp
+++ b/Source/core/css/MediaQueryEvaluator.cpp
@@ -362,9 +362,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
@@ -376,9 +374,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 | « no previous file | Source/core/inspector/InspectorClient.h » ('j') | Source/core/page/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698