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 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 | 473 |
474 static bool transform_3dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* f
rame, MediaFeaturePrefix op) | 474 static bool transform_3dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* f
rame, MediaFeaturePrefix op) |
475 { | 475 { |
476 bool returnValueIfNoParameter; | 476 bool returnValueIfNoParameter; |
477 int have3dRendering; | 477 int have3dRendering; |
478 | 478 |
479 #if ENABLE(3D_RENDERING) | 479 #if ENABLE(3D_RENDERING) |
480 bool threeDEnabled = false; | 480 bool threeDEnabled = false; |
481 #if USE(ACCELERATED_COMPOSITING) | 481 #if USE(ACCELERATED_COMPOSITING) |
482 if (RenderView* view = frame->contentRenderer()) | 482 if (RenderView* view = frame->contentRenderer()) |
483 threeDEnabled = view->compositor()->hasAcceleratedCompositing(); | 483 threeDEnabled = view->compositor()->canRender3DTransforms(); |
484 #endif | 484 #endif |
485 | 485 |
486 returnValueIfNoParameter = threeDEnabled; | 486 returnValueIfNoParameter = threeDEnabled; |
487 have3dRendering = threeDEnabled ? 1 : 0; | 487 have3dRendering = threeDEnabled ? 1 : 0; |
488 #else | 488 #else |
489 UNUSED_PARAM(frame); | 489 UNUSED_PARAM(frame); |
490 returnValueIfNoParameter = false; | 490 returnValueIfNoParameter = false; |
491 have3dRendering = 0; | 491 have3dRendering = 0; |
492 #endif | 492 #endif |
493 | 493 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 // and let trampoline functions override the prefix if prefix is | 531 // and let trampoline functions override the prefix if prefix is |
532 // used | 532 // used |
533 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); | 533 EvalFunc func = gFunctionMap->get(expr->mediaFeature().impl()); |
534 if (func) | 534 if (func) |
535 return func(expr->value(), m_style, m_frame, NoPrefix); | 535 return func(expr->value(), m_style, m_frame, NoPrefix); |
536 | 536 |
537 return false; | 537 return false; |
538 } | 538 } |
539 | 539 |
540 } // namespace | 540 } // namespace |
OLD | NEW |