Guest User

Untitled

a guest
Nov 22nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4.  
  5. // Generated from template:
  6. // core/css/properties/templates/CSSPropertySubclass.h.tmpl
  7. // and input files:
  8. // ../../third_party/WebKit/Source/core/css/ComputedStyleFieldAliases.json5
  9. // ../../third_party/WebKit/Source/core/css/CSSProperties.json5
  10. // ../../third_party/WebKit/Source/core/css/properties/CSSPropertyMethods.json5
  11.  
  12.  
  13. #ifndef GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignItems_h
  14. #define GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignItems_h
  15.  
  16. #include "core/css/properties/Longhand.h"
  17. #include "core/css/resolver/StyleResolverState.h"
  18. #include "core/css/CSSPrimitiveValueMappings.h"
  19. #include "core/css/resolver/StyleBuilderConverter.h"
  20. #include "core/style/ComputedStyle.h"
  21.  
  22. namespace blink {
  23.  
  24. class CSSValue;
  25.  
  26. namespace CSSLonghand {
  27.  
  28. // Implements the 'align-items' CSS property
  29. // See src/third_party/WebKit/Source/core/css/properties/README.md
  30. class AlignItems : public Longhand {
  31. public:
  32. constexpr AlignItems(CSSPropertyID id) : Longhand(id) {}
  33. const CSSValue* ParseSingleValue(CSSParserTokenRange&, const CSSParserContext&, const CSSParserLocalContext&) const override;
  34.  
  35. // Style builder functions
  36. void ApplyInitial(StyleResolverState& state) const override {
  37. state.Style()->SetAlignItems(ComputedStyleInitialValues::InitialAlignItems());
  38. }
  39. void ApplyInherit(StyleResolverState& state) const override {
  40. state.Style()->SetAlignItems(state.ParentStyle()->AlignItems());
  41. }
  42. void ApplyValue(StyleResolverState& state, const CSSValue& value) const override {
  43. state.Style()->SetAlignItems(StyleBuilderConverter::ConvertSelfOrDefaultAlignmentData(state, value));
  44. }
  45. };
  46.  
  47. } // namespace CSSLonghand
  48. } // namespace blink
  49.  
  50. #endif // GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignItems_h
Add Comment
Please, Sign In to add comment