Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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.
- // Generated from template:
- // core/css/properties/templates/CSSPropertySubclass.h.tmpl
- // and input files:
- // ../../third_party/WebKit/Source/core/css/ComputedStyleFieldAliases.json5
- // ../../third_party/WebKit/Source/core/css/CSSProperties.json5
- // ../../third_party/WebKit/Source/core/css/properties/CSSPropertyMethods.json5
- #ifndef GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignContent_h
- #define GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignContent_h
- #include "core/css/CSSPrimitiveValueMappings.h"
- #include "core/css/properties/Longhand.h"
- #include "core/css/resolver/StyleBuilderConverter.h"
- #include "core/css/resolver/StyleResolverState.h"
- #include "core/style/ComputedStyle.h"
- namespace blink {
- class CSSValue;
- namespace CSSLonghand {
- // Implements the 'align-content' CSS property
- // See src/third_party/WebKit/Source/core/css/properties/README.md
- class AlignContent : public Longhand {
- public:
- constexpr AlignContent(CSSPropertyID id) : Longhand(id) {}
- const char* GetPropertyName() const override { return "align-content\0"; }
- const WTF::AtomicString& GetPropertyNameAtomicString() const override {
- static const WTF::AtomicString& name = WTF::AtomicString("align-content\0");
- return name;
- }
- const CSSValue* ParseSingleValue(CSSParserTokenRange&, const CSSParserContext&, const CSSParserLocalContext&) const override;
- // Style builder functions
- void ApplyInitial(StyleResolverState& state) const override {
- state.Style()->SetAlignContent(ComputedStyleInitialValues::InitialAlignContent());
- }
- void ApplyInherit(StyleResolverState& state) const override {
- state.Style()->SetAlignContent(state.ParentStyle()->AlignContent());
- }
- void ApplyValue(StyleResolverState& state, const CSSValue& value) const override {
- state.Style()->SetAlignContent(StyleBuilderConverter::ConvertContentAlignmentData(state, value));
- }
- };
- } // namespace CSSLonghand
- } // namespace blink
- #endif // GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignContent_h
Add Comment
Please, Sign In to add comment