static bool deviceAspectRatioMediaFeatureEval(const MediaQueryExpValue& value, MediaFeaturePrefix op, const MediaValues& mediaValues) { if (value.isValid()) return compareAspectRatioValue(value, mediaValues.deviceWidth(), mediaValues.deviceHeight(), op); // ({,min-,max-}device-aspect-ratio) // assume if we have a device, its aspect ratio is non-zero. return true; }
static bool deviceHeightMediaFeatureEval(const MediaQueryExpValue& value, MediaFeaturePrefix op, const MediaValues& mediaValues) { if (value.isValid()) return computeLengthAndCompare(value, op, mediaValues, mediaValues.deviceHeight()); // ({,min-,max-}device-height) // assume if we have a device, assume non-zero return true; }
static bool deviceHeightMediaFeatureEval(const MediaQueryExpValue& value, MediaFeaturePrefix op, const MediaValues& mediaValues) { if (value.isValid()) { int length; return computeLength(value, mediaValues, length) && compareValue(static_cast<int>(mediaValues.deviceHeight()), length, op); } // ({,min-,max-}device-height) // assume if we have a device, assume non-zero return true; }