| OLD | NEW |
| 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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 void SetContain(Containment contain) { | 721 void SetContain(Containment contain) { |
| 722 SET_VAR(rare_non_inherited_data_, contain_, contain); | 722 SET_VAR(rare_non_inherited_data_, contain_, contain); |
| 723 } | 723 } |
| 724 | 724 |
| 725 // content | 725 // content |
| 726 ContentData* GetContentData() const { | 726 ContentData* GetContentData() const { |
| 727 return rare_non_inherited_data_->content_.Get(); | 727 return rare_non_inherited_data_->content_.Get(); |
| 728 } | 728 } |
| 729 void SetContent(ContentData*); | 729 void SetContent(ContentData*); |
| 730 | 730 |
| 731 // Flex properties. | |
| 732 // flex-basis (aka -webkit-flex-basis) | |
| 733 static Length InitialFlexBasis() { return Length(kAuto); } | |
| 734 const Length& FlexBasis() const { | |
| 735 return rare_non_inherited_data_->flexible_box_data_->flex_basis_; | |
| 736 } | |
| 737 void SetFlexBasis(const Length& length) { | |
| 738 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_basis_, | |
| 739 length); | |
| 740 } | |
| 741 | |
| 742 // flex-grow (aka -webkit-flex-grow) | |
| 743 static float InitialFlexGrow() { return 0; } | |
| 744 float FlexGrow() const { | |
| 745 return rare_non_inherited_data_->flexible_box_data_->flex_grow_; | |
| 746 } | |
| 747 void SetFlexGrow(float f) { | |
| 748 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_grow_, f); | |
| 749 } | |
| 750 | |
| 751 // flex-shrink (aka -webkit-flex-shrink) | |
| 752 static float InitialFlexShrink() { return 1; } | |
| 753 float FlexShrink() const { | |
| 754 return rare_non_inherited_data_->flexible_box_data_->flex_shrink_; | |
| 755 } | |
| 756 void SetFlexShrink(float f) { | |
| 757 SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_, flex_shrink_, | |
| 758 f); | |
| 759 } | |
| 760 | |
| 761 // -webkit-box-ordinal-group | 731 // -webkit-box-ordinal-group |
| 762 static unsigned InitialBoxOrdinalGroup() { return 1; } | 732 static unsigned InitialBoxOrdinalGroup() { return 1; } |
| 763 unsigned BoxOrdinalGroup() const { | 733 unsigned BoxOrdinalGroup() const { |
| 764 return rare_non_inherited_data_->deprecated_flexible_box_data_ | 734 return rare_non_inherited_data_->deprecated_flexible_box_data_ |
| 765 ->box_ordinal_group_; | 735 ->box_ordinal_group_; |
| 766 } | 736 } |
| 767 void SetBoxOrdinalGroup(unsigned og) { | 737 void SetBoxOrdinalGroup(unsigned og) { |
| 768 SET_NESTED_VAR(rare_non_inherited_data_, deprecated_flexible_box_data_, | 738 SET_NESTED_VAR(rare_non_inherited_data_, deprecated_flexible_box_data_, |
| 769 box_ordinal_group_, | 739 box_ordinal_group_, |
| 770 std::min(std::numeric_limits<unsigned>::max() - 1, og)); | 740 std::min(std::numeric_limits<unsigned>::max() - 1, og)); |
| (...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3102 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3072 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
| 3103 } | 3073 } |
| 3104 | 3074 |
| 3105 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3075 inline bool ComputedStyle::HasPseudoElementStyle() const { |
| 3106 return PseudoBitsInternal() & kElementPseudoIdMask; | 3076 return PseudoBitsInternal() & kElementPseudoIdMask; |
| 3107 } | 3077 } |
| 3108 | 3078 |
| 3109 } // namespace blink | 3079 } // namespace blink |
| 3110 | 3080 |
| 3111 #endif // ComputedStyle_h | 3081 #endif // ComputedStyle_h |
| OLD | NEW |