OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |