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

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

Issue 2942393002: Generate enum/getters/setters/mappings for flex-direction (Closed)
Patch Set: Retry 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 // flex-basis (aka -webkit-flex-basis) 732 // flex-basis (aka -webkit-flex-basis)
733 static Length InitialFlexBasis() { return Length(kAuto); } 733 static Length InitialFlexBasis() { return Length(kAuto); }
734 const Length& FlexBasis() const { 734 const Length& FlexBasis() const {
735 return rare_non_inherited_data_->flexible_box_data_->flex_basis_; 735 return rare_non_inherited_data_->flexible_box_data_->flex_basis_;
736 } 736 }
737 void SetFlexBasis(const Length& length) { 737 void SetFlexBasis(const Length& length) {
738 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_basis_, 738 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_basis_,
739 length); 739 length);
740 } 740 }
741 741
742 // flex-direction (aka -webkit-flex-direction)
743 static EFlexDirection InitialFlexDirection() { return EFlexDirection::kRow; }
744 EFlexDirection FlexDirection() const {
745 return static_cast<EFlexDirection>(
746 rare_non_inherited_data_->flexible_box_data_->flex_direction_);
747 }
748 void SetFlexDirection(EFlexDirection direction) {
749 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_,
750 flex_direction_, static_cast<unsigned>(direction));
751 }
752
753 // flex-grow (aka -webkit-flex-grow) 742 // flex-grow (aka -webkit-flex-grow)
754 static float InitialFlexGrow() { return 0; } 743 static float InitialFlexGrow() { return 0; }
755 float FlexGrow() const { 744 float FlexGrow() const {
756 return rare_non_inherited_data_->flexible_box_data_->flex_grow_; 745 return rare_non_inherited_data_->flexible_box_data_->flex_grow_;
757 } 746 }
758 void SetFlexGrow(float f) { 747 void SetFlexGrow(float f) {
759 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_grow_, f); 748 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_grow_, f);
760 } 749 }
761 750
762 // flex-shrink (aka -webkit-flex-shrink) 751 // flex-shrink (aka -webkit-flex-shrink)
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
3104 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3093 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3105 } 3094 }
3106 3095
3107 inline bool ComputedStyle::HasPseudoElementStyle() const { 3096 inline bool ComputedStyle::HasPseudoElementStyle() const {
3108 return PseudoBitsInternal() & kElementPseudoIdMask; 3097 return PseudoBitsInternal() & kElementPseudoIdMask;
3109 } 3098 }
3110 3099
3111 } // namespace blink 3100 } // namespace blink
3112 3101
3113 #endif // ComputedStyle_h 3102 #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