Guest User

Untitled

a guest
Dec 11th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 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_AlignContent_h
  14. #define GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignContent_h
  15.  
  16. #include "core/css/CSSPrimitiveValueMappings.h"
  17. #include "core/css/properties/Longhand.h"
  18. #include "core/css/resolver/StyleBuilderConverter.h"
  19. #include "core/css/resolver/StyleResolverState.h"
  20. #include "core/style/ComputedStyle.h"
  21.  
  22. namespace blink {
  23.  
  24. class CSSValue;
  25.  
  26. namespace CSSLonghand {
  27.  
  28. // Implements the 'align-content' CSS property
  29. // See src/third_party/WebKit/Source/core/css/properties/README.md
  30. class AlignContent : public Longhand {
  31. public:
  32. constexpr AlignContent(CSSPropertyID id) : Longhand(id) {}
  33. const char* GetPropertyName() const override { return "align-content\0"; }
  34. const WTF::AtomicString& GetPropertyNameAtomicString() const override {
  35. static const WTF::AtomicString& name = WTF::AtomicString("align-content\0");
  36. return name;
  37. }
  38. const CSSValue* ParseSingleValue(CSSParserTokenRange&, const CSSParserContext&, const CSSParserLocalContext&) const override;
  39.  
  40. // Style builder functions
  41. void ApplyInitial(StyleResolverState& state) const override {
  42. state.Style()->SetAlignContent(ComputedStyleInitialValues::InitialAlignContent());
  43. }
  44. void ApplyInherit(StyleResolverState& state) const override {
  45. state.Style()->SetAlignContent(state.ParentStyle()->AlignContent());
  46. }
  47. void ApplyValue(StyleResolverState& state, const CSSValue& value) const override {
  48. state.Style()->SetAlignContent(StyleBuilderConverter::ConvertContentAlignmentData(state, value));
  49. }
  50.  
  51. };
  52.  
  53. } // namespace CSSLonghand
  54. } // namespace blink
  55.  
  56. #endif // GEN_BLINK_CORE_CSS_PROPERTIES_LONGHAND_AlignContent_h
Add Comment
Please, Sign In to add comment