| Index: Source/core/css/MediaQueryEvaluator.cpp
|
| diff --git a/Source/core/css/MediaQueryEvaluator.cpp b/Source/core/css/MediaQueryEvaluator.cpp
|
| index d1aa3f74b23342f292cac7de4e29f9d4ac323a69..f124b9901f9d14c23b75f1675e9bca5eeb3c3605 100644
|
| --- a/Source/core/css/MediaQueryEvaluator.cpp
|
| +++ b/Source/core/css/MediaQueryEvaluator.cpp
|
| @@ -67,14 +67,6 @@ typedef bool (*EvalFunc)(CSSValue*, RenderStyle*, Frame*, MediaFeaturePrefix);
|
| typedef HashMap<AtomicStringImpl*, EvalFunc> FunctionMap;
|
| static FunctionMap* gFunctionMap;
|
|
|
| -/*
|
| - * FIXME: following media features are not implemented: scan
|
| - *
|
| - * scan: The "scan" media feature describes the scanning process of
|
| - * tv output devices. It's unknown how to retrieve this information from
|
| - * the platform
|
| - */
|
| -
|
| MediaQueryEvaluator::MediaQueryEvaluator(bool mediaFeatureResult)
|
| : m_frame(0)
|
| , m_style(0)
|
| @@ -660,6 +652,25 @@ static bool pointerMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame,
|
| || (pointer == MousePointer && id == CSSValueFine);
|
| }
|
|
|
| +static bool scanMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame, MediaFeaturePrefix)
|
| +{
|
| + // Scan only applies to tv media.
|
| + if (!equalIgnoringCase(frame->view()->mediaType(), "tv"))
|
| + return false;
|
| +
|
| + if (!value)
|
| + return true;
|
| +
|
| + if (!value->isPrimitiveValue())
|
| + return false;
|
| +
|
| + // If a platform interface supplies progressive/interlace info for TVs in the
|
| + // future, it needs to be handled here. For now, assume a modern TV with
|
| + // progressive display.
|
| + const int id = toCSSPrimitiveValue(value)->getIdent();
|
| + return id == CSSValueProgressive;
|
| +}
|
| +
|
| static void createFunctionMap()
|
| {
|
| // Create the table.
|
|
|