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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "core/style/StyleFlexibleBoxData.h" | 46 #include "core/style/StyleFlexibleBoxData.h" |
47 #include "core/style/StyleGridData.h" | 47 #include "core/style/StyleGridData.h" |
48 #include "core/style/StyleGridItemData.h" | 48 #include "core/style/StyleGridItemData.h" |
49 #include "core/style/StyleInheritedData.h" | 49 #include "core/style/StyleInheritedData.h" |
50 #include "core/style/StyleMultiColData.h" | 50 #include "core/style/StyleMultiColData.h" |
51 #include "core/style/StyleOffsetRotation.h" | 51 #include "core/style/StyleOffsetRotation.h" |
52 #include "core/style/StyleRareInheritedData.h" | 52 #include "core/style/StyleRareInheritedData.h" |
53 #include "core/style/StyleRareNonInheritedData.h" | 53 #include "core/style/StyleRareNonInheritedData.h" |
54 #include "core/style/StyleReflection.h" | 54 #include "core/style/StyleReflection.h" |
55 #include "core/style/StyleSelfAlignmentData.h" | 55 #include "core/style/StyleSelfAlignmentData.h" |
56 #include "core/style/StyleSurroundData.h" | |
57 #include "core/style/StyleTransformData.h" | 56 #include "core/style/StyleTransformData.h" |
58 #include "core/style/StyleVisualData.h" | 57 #include "core/style/StyleVisualData.h" |
59 #include "core/style/StyleWillChangeData.h" | 58 #include "core/style/StyleWillChangeData.h" |
60 #include "core/style/TransformOrigin.h" | 59 #include "core/style/TransformOrigin.h" |
61 #include "platform/Length.h" | 60 #include "platform/Length.h" |
62 #include "platform/LengthBox.h" | 61 #include "platform/LengthBox.h" |
63 #include "platform/LengthPoint.h" | 62 #include "platform/LengthPoint.h" |
64 #include "platform/LengthSize.h" | 63 #include "platform/LengthSize.h" |
65 #include "platform/RuntimeEnabledFeatures.h" | 64 #include "platform/RuntimeEnabledFeatures.h" |
66 #include "platform/ThemeTypes.h" | 65 #include "platform/ThemeTypes.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 friend class FilterOperationResolver; | 180 friend class FilterOperationResolver; |
182 friend class StyleBuilderConverter; | 181 friend class StyleBuilderConverter; |
183 friend class StyleResolverState; | 182 friend class StyleResolverState; |
184 friend class StyleResolver; | 183 friend class StyleResolver; |
185 | 184 |
186 protected: | 185 protected: |
187 // non-inherited attributes | 186 // non-inherited attributes |
188 DataRef<StyleBoxData> box_; | 187 DataRef<StyleBoxData> box_; |
189 DataRef<StyleVisualData> visual_; | 188 DataRef<StyleVisualData> visual_; |
190 DataRef<StyleBackgroundData> background_; | 189 DataRef<StyleBackgroundData> background_; |
191 DataRef<StyleSurroundData> surround_; | |
192 DataRef<StyleRareNonInheritedData> rare_non_inherited_data_; | 190 DataRef<StyleRareNonInheritedData> rare_non_inherited_data_; |
193 | 191 |
194 // inherited attributes | 192 // inherited attributes |
195 DataRef<StyleRareInheritedData> rare_inherited_data_; | 193 DataRef<StyleRareInheritedData> rare_inherited_data_; |
196 DataRef<StyleInheritedData> style_inherited_data_; | 194 DataRef<StyleInheritedData> style_inherited_data_; |
197 | 195 |
198 // list of associated pseudo styles | 196 // list of associated pseudo styles |
199 std::unique_ptr<PseudoStyleCache> cached_pseudo_styles_; | 197 std::unique_ptr<PseudoStyleCache> cached_pseudo_styles_; |
200 | 198 |
201 DataRef<SVGComputedStyle> svg_style_; | 199 DataRef<SVGComputedStyle> svg_style_; |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 } | 586 } |
589 | 587 |
590 // border-bottom-right-radius (aka -webkit-border-bottom-right-radius) | 588 // border-bottom-right-radius (aka -webkit-border-bottom-right-radius) |
591 const LengthSize& BorderBottomRightRadius() const { | 589 const LengthSize& BorderBottomRightRadius() const { |
592 return surround_->border_.BottomRight(); | 590 return surround_->border_.BottomRight(); |
593 } | 591 } |
594 void SetBorderBottomRightRadius(const LengthSize& s) { | 592 void SetBorderBottomRightRadius(const LengthSize& s) { |
595 SET_VAR(surround_, border_.bottom_right_, s); | 593 SET_VAR(surround_, border_.bottom_right_, s); |
596 } | 594 } |
597 | 595 |
598 // Offset properties. | |
599 // left | |
600 static Length InitialLeft() { return Length(); } | |
601 const Length& Left() const { return surround_->left_; } | |
602 void SetLeft(const Length& v) { SET_VAR(surround_, left_, v); } | |
603 | |
604 // right | |
605 static Length InitialRight() { return Length(); } | |
606 const Length& Right() const { return surround_->right_; } | |
607 void SetRight(const Length& v) { SET_VAR(surround_, right_, v); } | |
608 | |
609 // top | |
610 static Length InitialTop() { return Length(); } | |
611 const Length& Top() const { return surround_->top_; } | |
612 void SetTop(const Length& v) { SET_VAR(surround_, top_, v); } | |
613 | |
614 // bottom | |
615 static Length InitialBottom() { return Length(); } | |
616 const Length& Bottom() const { return surround_->bottom_; } | |
617 void SetBottom(const Length& v) { SET_VAR(surround_, bottom_, v); } | |
618 | |
619 // box-shadow (aka -webkit-box-shadow) | 596 // box-shadow (aka -webkit-box-shadow) |
620 static ShadowList* InitialBoxShadow() { return 0; } | 597 static ShadowList* InitialBoxShadow() { return 0; } |
621 ShadowList* BoxShadow() const { | 598 ShadowList* BoxShadow() const { |
622 return rare_non_inherited_data_->box_shadow_.Get(); | 599 return rare_non_inherited_data_->box_shadow_.Get(); |
623 } | 600 } |
624 void SetBoxShadow(PassRefPtr<ShadowList>); | 601 void SetBoxShadow(PassRefPtr<ShadowList>); |
625 | 602 |
626 // box-sizing (aka -webkit-box-sizing) | 603 // box-sizing (aka -webkit-box-sizing) |
627 static EBoxSizing InitialBoxSizing() { return EBoxSizing::kContentBox; } | 604 static EBoxSizing InitialBoxSizing() { return EBoxSizing::kContentBox; } |
628 EBoxSizing BoxSizing() const { return box_->BoxSizing(); } | 605 EBoxSizing BoxSizing() const { return box_->BoxSizing(); } |
(...skipping 3084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3713 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId); | 3690 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId); |
3714 } | 3691 } |
3715 | 3692 |
3716 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3693 inline bool ComputedStyle::HasPseudoElementStyle() const { |
3717 return pseudo_bits_ & kElementPseudoIdMask; | 3694 return pseudo_bits_ & kElementPseudoIdMask; |
3718 } | 3695 } |
3719 | 3696 |
3720 } // namespace blink | 3697 } // namespace blink |
3721 | 3698 |
3722 #endif // ComputedStyle_h | 3699 #endif // ComputedStyle_h |
OLD | NEW |