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_AlignItems_h
- #define GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignItems_h
- #include "core/css/properties/Longhand.h"
- #include "core/css/resolver/StyleResolverState.h"
- #include "core/css/CSSPrimitiveValueMappings.h"
- #include "core/css/resolver/StyleBuilderConverter.h"
- #include "core/style/ComputedStyle.h"
- namespace blink {
- class CSSValue;
- namespace CSSLonghand {
- // Implements the 'align-items' CSS property
- // See src/third_party/WebKit/Source/core/css/properties/README.md
- class AlignItems : public Longhand {
- public:
- constexpr AlignItems(CSSPropertyID id) : Longhand(id) {}
- const CSSValue* ParseSingleValue(CSSParserTokenRange&, const CSSParserContext&, const CSSParserLocalContext&) const override;
- // Style builder functions
- void ApplyInitial(StyleResolverState& state) const override {
- state.Style()->SetAlignItems(ComputedStyleInitialValues::InitialAlignItems());
- }
- void ApplyInherit(StyleResolverState& state) const override {
- state.Style()->SetAlignItems(state.ParentStyle()->AlignItems());
- }
- void ApplyValue(StyleResolverState& state, const CSSValue& value) const override {
- state.Style()->SetAlignItems(StyleBuilderConverter::ConvertSelfOrDefaultAlignmentData(state, value));
- }
- };
- } // namespace CSSLonghand
- } // namespace blink
- #endif // GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignItems_h
Add Comment
Please, Sign In to add comment