Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2017 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b315505ebc11cbd8901afd3bb01a620a to your computer and use it in GitHub Desktop.
Save anonymous/b315505ebc11cbd8901afd3bb01a620a to your computer and use it in GitHub Desktop.
CSSPropertyDescriptor
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/CSSPropertyNames.h"
namespace blink {
class CSSValue;
class CSSParserTokenRange;
class CSSParserContext;
// Stores function pointers matching those declared in CSSPropertyAPI.
struct CSSPropertyDescriptor {
const CSSValue* (*parseSingleValue)(CSSParserTokenRange&, const CSSParserContext*);
bool (*parseShorthand)(bool, CSSParserTokenRange&, const CSSParserContext*);
// Returns the corresponding CSSPropertyDescriptor for a given CSSPropertyID.
// 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.
static const CSSPropertyDescriptor& get(CSSPropertyID);
};
} // namespace blink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment