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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 | 547 |
548 static bool animationMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, Med iaFeaturePrefix op) | 548 static bool animationMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, Med iaFeaturePrefix op) |
549 { | 549 { |
550 if (value) { | 550 if (value) { |
551 float number; | 551 float number; |
552 return numberValue(value, number) && compareValue(1, static_cast<int>(nu mber), op); | 552 return numberValue(value, number) && compareValue(1, static_cast<int>(nu mber), op); |
553 } | 553 } |
554 return true; | 554 return true; |
555 } | 555 } |
556 | 556 |
557 static bool transitionMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, Me diaFeaturePrefix op) | 557 static bool transitionMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* fra me, MediaFeaturePrefix op) |
558 { | 558 { |
559 UseCounter::count(frame->document(), UseCounter::PrefixedTransitionMediaFeat ure); | |
Mike West
2013/05/13 15:11:51
This is unprefixed, right? You'll need to have two
| |
560 | |
559 if (value) { | 561 if (value) { |
560 float number; | 562 float number; |
561 return numberValue(value, number) && compareValue(1, static_cast<int>(nu mber), op); | 563 return numberValue(value, number) && compareValue(1, static_cast<int>(nu mber), op); |
564 } | |
565 return true; | |
566 } | |
567 | |
568 // Legacy prefixed version. | |
569 static bool webkitTransitionMediaFeatureEval(CSSValue* value, RenderStyle*, Fram e* frame, MediaFeaturePrefix op) | |
570 { | |
571 UseCounter::countDeprecation(frame->document(), UseCounter::PrefixedTransiti onMediaFeature); | |
572 | |
573 if (value) { | |
574 float number; | |
575 return numberValue(value, number) && compareValue(1, static_cast<int>(nu mber), op); | |
562 } | 576 } |
563 return true; | 577 return true; |
564 } | 578 } |
565 | 579 |
566 static bool transform2dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, M ediaFeaturePrefix op) | 580 static bool transform2dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, M ediaFeaturePrefix op) |
567 { | 581 { |
568 if (value) { | 582 if (value) { |
569 float number; | 583 float number; |
570 return numberValue(value, number) && compareValue(1, static_cast<int>(nu mber), op); | 584 return numberValue(value, number) && compareValue(1, static_cast<int>(nu mber), op); |
571 } | 585 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
685 // and let trampoline functions override the prefix if prefix is | 699 // and let trampoline functions override the prefix if prefix is |
686 // used | 700 // used |
687 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); | 701 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); |
688 if (func) | 702 if (func) |
689 return func(expr->value(), m_style.get(), m_frame, NoPrefix); | 703 return func(expr->value(), m_style.get(), m_frame, NoPrefix); |
690 | 704 |
691 return false; | 705 return false; |
692 } | 706 } |
693 | 707 |
694 } // namespace | 708 } // namespace |
OLD | NEW |