Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2944193002: Generate enum/getters/setters/mappings for flex-wrap (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 // flex-shrink (aka -webkit-flex-shrink) 751 // flex-shrink (aka -webkit-flex-shrink)
752 static float InitialFlexShrink() { return 1; } 752 static float InitialFlexShrink() { return 1; }
753 float FlexShrink() const { 753 float FlexShrink() const {
754 return rare_non_inherited_data_->flexible_box_data_->flex_shrink_; 754 return rare_non_inherited_data_->flexible_box_data_->flex_shrink_;
755 } 755 }
756 void SetFlexShrink(float f) { 756 void SetFlexShrink(float f) {
757 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_shrink_, 757 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_shrink_,
758 f); 758 f);
759 } 759 }
760 760
761 // flex-wrap (aka -webkit-flex-wrap)
762 static EFlexWrap InitialFlexWrap() { return EFlexWrap::kNowrap; }
763 EFlexWrap FlexWrap() const {
764 return static_cast<EFlexWrap>(
765 rare_non_inherited_data_->flexible_box_data_->flex_wrap_);
766 }
767 void SetFlexWrap(EFlexWrap w) {
768 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_wrap_,
769 static_cast<unsigned>(w));
770 }
771
772 // -webkit-box-ordinal-group 761 // -webkit-box-ordinal-group
773 static unsigned InitialBoxOrdinalGroup() { return 1; } 762 static unsigned InitialBoxOrdinalGroup() { return 1; }
774 unsigned BoxOrdinalGroup() const { 763 unsigned BoxOrdinalGroup() const {
775 return rare_non_inherited_data_->deprecated_flexible_box_data_ 764 return rare_non_inherited_data_->deprecated_flexible_box_data_
776 ->box_ordinal_group_; 765 ->box_ordinal_group_;
777 } 766 }
778 void SetBoxOrdinalGroup(unsigned og) { 767 void SetBoxOrdinalGroup(unsigned og) {
779 SET_NESTED_VAR(rare_non_inherited_data_, deprecated_flexible_box_data_, 768 SET_NESTED_VAR(rare_non_inherited_data_, deprecated_flexible_box_data_,
780 box_ordinal_group_, 769 box_ordinal_group_,
781 std::min(std::numeric_limits<unsigned>::max() - 1, og)); 770 std::min(std::numeric_limits<unsigned>::max() - 1, og));
(...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after
3113 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3102 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3114 } 3103 }
3115 3104
3116 inline bool ComputedStyle::HasPseudoElementStyle() const { 3105 inline bool ComputedStyle::HasPseudoElementStyle() const {
3117 return PseudoBitsInternal() & kElementPseudoIdMask; 3106 return PseudoBitsInternal() & kElementPseudoIdMask;
3118 } 3107 }
3119 3108
3120 } // namespace blink 3109 } // namespace blink
3121 3110
3122 #endif // ComputedStyle_h 3111 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.json5 ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698