#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/css/media_query_exp.h"
#include "third_party/blink/renderer/core/css/css_math_expression_node.h"
#include "third_party/blink/renderer/core/css/css_math_function_value.h"
#include "third_party/blink/renderer/core/css/css_numeric_literal_value.h"
#include "third_party/blink/renderer/core/css/css_primitive_value.h"
#include "third_party/blink/renderer/core/css/css_unparsed_declaration_value.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_context.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_impl.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_token_range.h"
#include "third_party/blink/renderer/core/css/parser/css_variable_parser.h"
#include "third_party/blink/renderer/core/css/properties/css_parsing_utils.h"
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/decimal.h"
#include "third_party/blink/renderer/platform/wtf/text/string_buffer.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
kMaxDeviceAspectRatioMediaFeature;
kMaxDevicePixelRatioMediaFeature;
kMinDeviceAspectRatioMediaFeature;
static inline bool FeatureWithValidIdent(const String& media_feature,
CSSValueID ident,
const CSSParserContext& context) { … }
static inline bool FeatureWithValidLength(const String& media_feature,
const CSSPrimitiveValue* value) { … }
static inline bool FeatureWithValidDensity(const String& media_feature,
const CSSPrimitiveValue* value) { … }
static inline bool FeatureExpectingInteger(const String& media_feature,
const CSSParserContext& context) { … }
static inline bool FeatureWithInteger(const String& media_feature,
const CSSPrimitiveValue* value,
const CSSParserContext& context) { … }
static inline bool FeatureWithNumber(const String& media_feature,
const CSSPrimitiveValue* value) { … }
static inline bool FeatureWithZeroOrOne(const String& media_feature,
const CSSPrimitiveValue* value) { … }
static inline bool FeatureWithAspectRatio(const String& media_feature) { … }
bool MediaQueryExp::IsViewportDependent() const { … }
bool MediaQueryExp::IsDeviceDependent() const { … }
bool MediaQueryExp::IsWidthDependent() const { … }
bool MediaQueryExp::IsHeightDependent() const { … }
bool MediaQueryExp::IsInlineSizeDependent() const { … }
bool MediaQueryExp::IsBlockSizeDependent() const { … }
MediaQueryExp::MediaQueryExp(const MediaQueryExp& other)
: … { … }
MediaQueryExp::MediaQueryExp(const String& media_feature,
const MediaQueryExpValue& value)
: … { … }
MediaQueryExp::MediaQueryExp(const String& media_feature,
const MediaQueryExpBounds& bounds)
: … { … }
MediaQueryExp MediaQueryExp::Create(const String& media_feature,
CSSParserTokenRange& range,
const CSSParserTokenOffsets& offsets,
const CSSParserContext& context) { … }
std::optional<MediaQueryExpValue> MediaQueryExpValue::Consume(
const String& media_feature,
CSSParserTokenRange& range,
const CSSParserTokenOffsets& offsets,
const CSSParserContext& context) { … }
namespace {
const char* MediaQueryOperatorToString(MediaQueryOperator op) { … }
}
MediaQueryExp MediaQueryExp::Create(const String& media_feature,
const MediaQueryExpBounds& bounds) { … }
MediaQueryExp::~MediaQueryExp() = default;
void MediaQueryExp::Trace(Visitor* visitor) const { … }
bool MediaQueryExp::operator==(const MediaQueryExp& other) const { … }
String MediaQueryExp::Serialize() const { … }
unsigned MediaQueryExp::GetUnitFlags() const { … }
String MediaQueryExpValue::CssText() const { … }
unsigned MediaQueryExpValue::GetUnitFlags() const { … }
String MediaQueryExpNode::Serialize() const { … }
const MediaQueryExpNode* MediaQueryExpNode::Not(
const MediaQueryExpNode* operand) { … }
const MediaQueryExpNode* MediaQueryExpNode::Nested(
const MediaQueryExpNode* operand) { … }
const MediaQueryExpNode* MediaQueryExpNode::Function(
const MediaQueryExpNode* operand,
const AtomicString& name) { … }
const MediaQueryExpNode* MediaQueryExpNode::And(
const MediaQueryExpNode* left,
const MediaQueryExpNode* right) { … }
const MediaQueryExpNode* MediaQueryExpNode::Or(const MediaQueryExpNode* left,
const MediaQueryExpNode* right) { … }
bool MediaQueryFeatureExpNode::IsViewportDependent() const { … }
bool MediaQueryFeatureExpNode::IsDeviceDependent() const { … }
unsigned MediaQueryFeatureExpNode::GetUnitFlags() const { … }
bool MediaQueryFeatureExpNode::IsWidthDependent() const { … }
bool MediaQueryFeatureExpNode::IsHeightDependent() const { … }
bool MediaQueryFeatureExpNode::IsInlineSizeDependent() const { … }
bool MediaQueryFeatureExpNode::IsBlockSizeDependent() const { … }
void MediaQueryFeatureExpNode::SerializeTo(StringBuilder& builder) const { … }
void MediaQueryFeatureExpNode::CollectExpressions(
HeapVector<MediaQueryExp>& result) const { … }
MediaQueryExpNode::FeatureFlags MediaQueryFeatureExpNode::CollectFeatureFlags()
const { … }
void MediaQueryFeatureExpNode::Trace(Visitor* visitor) const { … }
void MediaQueryUnaryExpNode::Trace(Visitor* visitor) const { … }
void MediaQueryUnaryExpNode::CollectExpressions(
HeapVector<MediaQueryExp>& result) const { … }
MediaQueryExpNode::FeatureFlags MediaQueryUnaryExpNode::CollectFeatureFlags()
const { … }
void MediaQueryNestedExpNode::SerializeTo(StringBuilder& builder) const { … }
void MediaQueryFunctionExpNode::SerializeTo(StringBuilder& builder) const { … }
MediaQueryExpNode::FeatureFlags MediaQueryFunctionExpNode::CollectFeatureFlags()
const { … }
void MediaQueryNotExpNode::SerializeTo(StringBuilder& builder) const { … }
void MediaQueryCompoundExpNode::Trace(Visitor* visitor) const { … }
void MediaQueryCompoundExpNode::CollectExpressions(
HeapVector<MediaQueryExp>& result) const { … }
MediaQueryExpNode::FeatureFlags MediaQueryCompoundExpNode::CollectFeatureFlags()
const { … }
void MediaQueryAndExpNode::SerializeTo(StringBuilder& builder) const { … }
void MediaQueryOrExpNode::SerializeTo(StringBuilder& builder) const { … }
void MediaQueryUnknownExpNode::SerializeTo(StringBuilder& builder) const { … }
void MediaQueryUnknownExpNode::CollectExpressions(
HeapVector<MediaQueryExp>&) const { … }
MediaQueryExpNode::FeatureFlags MediaQueryUnknownExpNode::CollectFeatureFlags()
const { … }
}