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

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

Issue 2786883002: Generate subgroup StyleSurroundData in ComputedStyle. (Closed)
Patch Set: Rebase Created 3 years, 8 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "core/style/StyleFlexibleBoxData.h" 45 #include "core/style/StyleFlexibleBoxData.h"
46 #include "core/style/StyleGridData.h" 46 #include "core/style/StyleGridData.h"
47 #include "core/style/StyleGridItemData.h" 47 #include "core/style/StyleGridItemData.h"
48 #include "core/style/StyleInheritedData.h" 48 #include "core/style/StyleInheritedData.h"
49 #include "core/style/StyleMultiColData.h" 49 #include "core/style/StyleMultiColData.h"
50 #include "core/style/StyleOffsetRotation.h" 50 #include "core/style/StyleOffsetRotation.h"
51 #include "core/style/StyleRareInheritedData.h" 51 #include "core/style/StyleRareInheritedData.h"
52 #include "core/style/StyleRareNonInheritedData.h" 52 #include "core/style/StyleRareNonInheritedData.h"
53 #include "core/style/StyleReflection.h" 53 #include "core/style/StyleReflection.h"
54 #include "core/style/StyleSelfAlignmentData.h" 54 #include "core/style/StyleSelfAlignmentData.h"
55 #include "core/style/StyleSurroundData.h"
56 #include "core/style/StyleTransformData.h" 55 #include "core/style/StyleTransformData.h"
57 #include "core/style/StyleVisualData.h" 56 #include "core/style/StyleVisualData.h"
58 #include "core/style/StyleWillChangeData.h" 57 #include "core/style/StyleWillChangeData.h"
59 #include "core/style/TransformOrigin.h" 58 #include "core/style/TransformOrigin.h"
60 #include "platform/Length.h" 59 #include "platform/Length.h"
61 #include "platform/LengthBox.h" 60 #include "platform/LengthBox.h"
62 #include "platform/LengthPoint.h" 61 #include "platform/LengthPoint.h"
63 #include "platform/LengthSize.h" 62 #include "platform/LengthSize.h"
64 #include "platform/RuntimeEnabledFeatures.h" 63 #include "platform/RuntimeEnabledFeatures.h"
65 #include "platform/ThemeTypes.h" 64 #include "platform/ThemeTypes.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (!group->base->variable.widthEquals(value)) \ 110 if (!group->base->variable.widthEquals(value)) \
112 group.access()->base.access()->variable.setWidth(value) 111 group.access()->base.access()->variable.setWidth(value)
113 112
114 namespace blink { 113 namespace blink {
115 114
116 using std::max; 115 using std::max;
117 116
118 class FilterOperations; 117 class FilterOperations;
119 118
120 class AppliedTextDecoration; 119 class AppliedTextDecoration;
121 class BorderData;
122 struct BorderEdge; 120 struct BorderEdge;
123 class CSSAnimationData; 121 class CSSAnimationData;
124 class CSSTransitionData; 122 class CSSTransitionData;
125 class CSSVariableData; 123 class CSSVariableData;
126 class Font; 124 class Font;
127 class Hyphenation; 125 class Hyphenation;
128 class RotateTransformOperation; 126 class RotateTransformOperation;
129 class ScaleTransformOperation; 127 class ScaleTransformOperation;
130 class ShadowList; 128 class ShadowList;
131 class ShapeValue; 129 class ShapeValue;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 friend class FilterOperationResolver; 179 friend class FilterOperationResolver;
182 friend class StyleBuilderConverter; 180 friend class StyleBuilderConverter;
183 friend class StyleResolverState; 181 friend class StyleResolverState;
184 friend class StyleResolver; 182 friend class StyleResolver;
185 183
186 protected: 184 protected:
187 // non-inherited attributes 185 // non-inherited attributes
188 DataRef<StyleBoxData> m_box; 186 DataRef<StyleBoxData> m_box;
189 DataRef<StyleVisualData> m_visual; 187 DataRef<StyleVisualData> m_visual;
190 DataRef<StyleBackgroundData> m_background; 188 DataRef<StyleBackgroundData> m_background;
191 DataRef<StyleSurroundData> m_surround;
192 DataRef<StyleRareNonInheritedData> m_rareNonInheritedData; 189 DataRef<StyleRareNonInheritedData> m_rareNonInheritedData;
193 190
194 // inherited attributes 191 // inherited attributes
195 DataRef<StyleRareInheritedData> m_rareInheritedData; 192 DataRef<StyleRareInheritedData> m_rareInheritedData;
196 DataRef<StyleInheritedData> m_styleInheritedData; 193 DataRef<StyleInheritedData> m_styleInheritedData;
197 194
198 // list of associated pseudo styles 195 // list of associated pseudo styles
199 std::unique_ptr<PseudoStyleCache> m_cachedPseudoStyles; 196 std::unique_ptr<PseudoStyleCache> m_cachedPseudoStyles;
200 197
201 DataRef<SVGComputedStyle> m_svgStyle; 198 DataRef<SVGComputedStyle> m_svgStyle;
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 const LengthSize& borderBottomRightRadius() const { 633 const LengthSize& borderBottomRightRadius() const {
637 return m_surround->m_border.bottomRight(); 634 return m_surround->m_border.bottomRight();
638 } 635 }
639 void setBorderBottomRightRadius(const LengthSize& s) { 636 void setBorderBottomRightRadius(const LengthSize& s) {
640 SET_VAR(m_surround, m_border.m_bottomRight, s); 637 SET_VAR(m_surround, m_border.m_bottomRight, s);
641 } 638 }
642 639
643 // Offset properties. 640 // Offset properties.
644 static Length initialOffset() { return Length(); } 641 static Length initialOffset() { return Length(); }
645 642
646 // left
647 const Length& left() const { return m_surround->m_left; }
648 void setLeft(const Length& v) { SET_VAR(m_surround, m_left, v); }
649
650 // right
651 const Length& right() const { return m_surround->m_right; }
652 void setRight(const Length& v) { SET_VAR(m_surround, m_right, v); }
653
654 // top
655 const Length& top() const { return m_surround->m_top; }
656 void setTop(const Length& v) { SET_VAR(m_surround, m_top, v); }
657
658 // bottom
659 const Length& bottom() const { return m_surround->m_bottom; }
660 void setBottom(const Length& v) { SET_VAR(m_surround, m_bottom, v); }
661
662 // box-shadow (aka -webkit-box-shadow) 643 // box-shadow (aka -webkit-box-shadow)
663 static ShadowList* initialBoxShadow() { return 0; } 644 static ShadowList* initialBoxShadow() { return 0; }
664 ShadowList* boxShadow() const { 645 ShadowList* boxShadow() const {
665 return m_rareNonInheritedData->m_boxShadow.get(); 646 return m_rareNonInheritedData->m_boxShadow.get();
666 } 647 }
667 void setBoxShadow(PassRefPtr<ShadowList>); 648 void setBoxShadow(PassRefPtr<ShadowList>);
668 649
669 // box-sizing (aka -webkit-box-sizing) 650 // box-sizing (aka -webkit-box-sizing)
670 static EBoxSizing initialBoxSizing() { return EBoxSizing::kContentBox; } 651 static EBoxSizing initialBoxSizing() { return EBoxSizing::kContentBox; }
671 EBoxSizing boxSizing() const { return m_box->boxSizing(); } 652 EBoxSizing boxSizing() const { return m_box->boxSizing(); }
(...skipping 3071 matching lines...) Expand 10 before | Expand all | Expand 10 after
3743 m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId); 3724 m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId);
3744 } 3725 }
3745 3726
3746 inline bool ComputedStyle::hasPseudoElementStyle() const { 3727 inline bool ComputedStyle::hasPseudoElementStyle() const {
3747 return m_pseudoBits & ElementPseudoIdMask; 3728 return m_pseudoBits & ElementPseudoIdMask;
3748 } 3729 }
3749 3730
3750 } // namespace blink 3731 } // namespace blink
3751 3732
3752 #endif // ComputedStyle_h 3733 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698