Untitled diff

Created Diff never expires
3 removals
25 lines
2 additions
24 lines
// Copyright 2016 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.


#include "core/CSSPropertyNames.h"
#include "core/CSSPropertyNames.h"


namespace blink {
namespace blink {


class CSSValue;
class CSSValue;
class CSSParserTokenRange;
class CSSParserTokenRange;

class CSSParserContext;
class CSSParserContext;

// Stores function pointers matching those declared in CSSPropertyAPI.
// Stores function pointers matching those declared in CSSPropertyAPI.
struct CSSPropertyDescriptor {
struct CSSPropertyDescriptor {
const CSSValue* (*parseSingleValue)(CSSParserTokenRange&,
const CSSValue* (*parseSingleValue)(CSSParserTokenRange&, const CSSParserContext*);
const CSSParserContext*);
bool (*parseShorthand)(bool, CSSParserTokenRange&, const CSSParserContext*);
bool (*parseShorthand)(bool, CSSParserTokenRange&, const CSSParserContext*);


// Returns the corresponding CSSPropertyDescriptor for a given CSSPropertyID.
// Returns the corresponding CSSPropertyDescriptor for a given CSSPropertyID.
// Use this function to access the API for a property. Returns a descriptor
// Use this function to access the API for a property. Returns a descriptor
// with isValid set to false if no descriptor exists for this ID.
// with isValid set to false if no descriptor exists for this ID.
static const CSSPropertyDescriptor& get(CSSPropertyID);
static const CSSPropertyDescriptor& get(CSSPropertyID);
};
};


} // namespace blink
} // namespace blink