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

Side by Side Diff: Source/core/css/MediaQueryEvaluator.cpp

Issue 15841015: Fix a zooming bug with EM MQs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * CSS Media Query Evaluator 2 * CSS Media Query Evaluator
3 * 3 *
4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>. 4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>.
5 * Copyright (C) 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2013 Intel Corporation. All rights reserved. 6 * Copyright (C) 2013 Intel Corporation. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 return false; 343 return false;
344 344
345 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 345 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
346 346
347 if (primitiveValue->isNumber()) { 347 if (primitiveValue->isNumber()) {
348 result = primitiveValue->getIntValue(); 348 result = primitiveValue->getIntValue();
349 return !strict || !result; 349 return !strict || !result;
350 } 350 }
351 351
352 if (primitiveValue->isLength()) { 352 if (primitiveValue->isLength()) {
353 result = primitiveValue->computeLength<int>(style, rootStyle); 353 result = primitiveValue->computeLength<int>(style, rootStyle, 1.0, true) ;
kenneth.r.christiansen 2013/05/31 08:21:21 Could you add some comments like /* zoom level */
354 return true; 354 return true;
355 } 355 }
356 356
357 return false; 357 return false;
358 } 358 }
359 359
360 static bool deviceHeightMediaFeatureEval(CSSValue* value, RenderStyle* style, Fr ame* frame, MediaFeaturePrefix op) 360 static bool deviceHeightMediaFeatureEval(CSSValue* value, RenderStyle* style, Fr ame* frame, MediaFeaturePrefix op)
361 { 361 {
362 if (value) { 362 if (value) {
363 FloatRect sg = screenRect(frame->page()->mainFrame()->view()); 363 FloatRect sg = screenRect(frame->page()->mainFrame()->view());
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 // and let trampoline functions override the prefix if prefix is 692 // and let trampoline functions override the prefix if prefix is
693 // used 693 // used
694 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); 694 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl());
695 if (func) 695 if (func)
696 return func(expr->value(), m_style.get(), m_frame, NoPrefix); 696 return func(expr->value(), m_style.get(), m_frame, NoPrefix);
697 697
698 return false; 698 return false;
699 } 699 }
700 700
701 } // namespace 701 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698