| 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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Page size type. | 66 // Page size type. |
| 67 // StyleRareNonInheritedData::m_pageSize is meaningful only when | 67 // StyleRareNonInheritedData::m_pageSize is meaningful only when |
| 68 // StyleRareNonInheritedData::m_pageSizeType is PAGE_SIZE_RESOLVED. | 68 // StyleRareNonInheritedData::m_pageSizeType is PAGE_SIZE_RESOLVED. |
| 69 enum PageSizeType { | 69 enum PageSizeType { |
| 70 PAGE_SIZE_AUTO, // size: auto | 70 PAGE_SIZE_AUTO, // size: auto |
| 71 PAGE_SIZE_AUTO_LANDSCAPE, // size: landscape | 71 PAGE_SIZE_AUTO_LANDSCAPE, // size: landscape |
| 72 PAGE_SIZE_AUTO_PORTRAIT, // size: portrait | 72 PAGE_SIZE_AUTO_PORTRAIT, // size: portrait |
| 73 PAGE_SIZE_RESOLVED // Size is fully resolved. | 73 PAGE_SIZE_RESOLVED // Size is fully resolved. |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // This struct is for rarely used non-inherited CSS3, CSS2, and WebKit-specific
properties. | 76 // This struct is for rarely used non-inherited CSS3, CSS2, and WebKit-specific |
| 77 // By grouping them together, we save space, and only allocate this object when
someone | 77 // properties. By grouping them together, we save space, and only allocate this |
| 78 // actually uses one of these properties. | 78 // object when someone actually uses one of these properties. |
| 79 // TODO(sashab): Move this into a private class on ComputedStyle, and remove | 79 // TODO(sashab): Move this into a private class on ComputedStyle, and remove |
| 80 // all methods on it, merging them into copy/creation methods on ComputedStyle | 80 // all methods on it, merging them into copy/creation methods on ComputedStyle |
| 81 // instead. Keep the allocation logic, only allocating a new object if needed. | 81 // instead. Keep the allocation logic, only allocating a new object if needed. |
| 82 class CORE_EXPORT StyleRareNonInheritedData | 82 class CORE_EXPORT StyleRareNonInheritedData |
| 83 : public RefCounted<StyleRareNonInheritedData> { | 83 : public RefCounted<StyleRareNonInheritedData> { |
| 84 public: | 84 public: |
| 85 static PassRefPtr<StyleRareNonInheritedData> create() { | 85 static PassRefPtr<StyleRareNonInheritedData> create() { |
| 86 return adoptRef(new StyleRareNonInheritedData); | 86 return adoptRef(new StyleRareNonInheritedData); |
| 87 } | 87 } |
| 88 PassRefPtr<StyleRareNonInheritedData> copy() const { | 88 PassRefPtr<StyleRareNonInheritedData> copy() const { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 StyleSelfAlignmentData m_alignItems; | 174 StyleSelfAlignmentData m_alignItems; |
| 175 StyleSelfAlignmentData m_alignSelf; | 175 StyleSelfAlignmentData m_alignSelf; |
| 176 StyleContentAlignmentData m_justifyContent; | 176 StyleContentAlignmentData m_justifyContent; |
| 177 StyleSelfAlignmentData m_justifyItems; | 177 StyleSelfAlignmentData m_justifyItems; |
| 178 StyleSelfAlignmentData m_justifySelf; | 178 StyleSelfAlignmentData m_justifySelf; |
| 179 | 179 |
| 180 unsigned m_pageSizeType : 2; // PageSizeType | 180 unsigned m_pageSizeType : 2; // PageSizeType |
| 181 unsigned m_transformStyle3D : 1; // ETransformStyle3D | 181 unsigned m_transformStyle3D : 1; // ETransformStyle3D |
| 182 unsigned m_backfaceVisibility : 1; // EBackfaceVisibility | 182 unsigned m_backfaceVisibility : 1; // EBackfaceVisibility |
| 183 | 183 |
| 184 unsigned userDrag : 2; // EUserDrag | 184 unsigned userDrag : 2; // EUserDrag |
| 185 unsigned | 185 unsigned textOverflow : 1; // Whether or not lines that spill out should be |
| 186 textOverflow : 1; // Whether or not lines that spill out should be trunca
ted with "..." | 186 // truncated with "..." |
| 187 unsigned marginBeforeCollapse : 2; // EMarginCollapse | 187 unsigned marginBeforeCollapse : 2; // EMarginCollapse |
| 188 unsigned marginAfterCollapse : 2; // EMarginCollapse | 188 unsigned marginAfterCollapse : 2; // EMarginCollapse |
| 189 unsigned m_appearance : 6; // EAppearance | 189 unsigned m_appearance : 6; // EAppearance |
| 190 | 190 |
| 191 unsigned m_textDecorationStyle : 3; // TextDecorationStyle | 191 unsigned m_textDecorationStyle : 3; // TextDecorationStyle |
| 192 | 192 |
| 193 unsigned m_hasCurrentOpacityAnimation : 1; | 193 unsigned m_hasCurrentOpacityAnimation : 1; |
| 194 unsigned m_hasCurrentTransformAnimation : 1; | 194 unsigned m_hasCurrentTransformAnimation : 1; |
| 195 unsigned m_hasCurrentFilterAnimation : 1; | 195 unsigned m_hasCurrentFilterAnimation : 1; |
| 196 unsigned m_hasCurrentBackdropFilterAnimation : 1; | 196 unsigned m_hasCurrentBackdropFilterAnimation : 1; |
| 197 unsigned m_runningOpacityAnimationOnCompositor : 1; | 197 unsigned m_runningOpacityAnimationOnCompositor : 1; |
| 198 unsigned m_runningTransformAnimationOnCompositor : 1; | 198 unsigned m_runningTransformAnimationOnCompositor : 1; |
| 199 unsigned m_runningFilterAnimationOnCompositor : 1; | 199 unsigned m_runningFilterAnimationOnCompositor : 1; |
| 200 unsigned m_runningBackdropFilterAnimationOnCompositor : 1; | 200 unsigned m_runningBackdropFilterAnimationOnCompositor : 1; |
| 201 | 201 |
| 202 unsigned m_isStackingContext : 1; | 202 unsigned m_isStackingContext : 1; |
| 203 | 203 |
| 204 unsigned m_effectiveBlendMode : 5; // EBlendMode | 204 unsigned m_effectiveBlendMode : 5; // EBlendMode |
| 205 | 205 |
| 206 unsigned m_touchAction : TouchActionBits; // TouchAction | 206 unsigned m_touchAction : TouchActionBits; // TouchAction |
| 207 | 207 |
| 208 unsigned m_objectFit : 3; // ObjectFit | 208 unsigned m_objectFit : 3; // ObjectFit |
| 209 | 209 |
| 210 unsigned m_isolation : 1; // Isolation | 210 unsigned m_isolation : 1; // Isolation |
| 211 | 211 |
| 212 unsigned m_contain : 4; // Containment | 212 unsigned m_contain : 4; // Containment |
| 213 | 213 |
| 214 // ScrollBehavior. 'scroll-behavior' has 2 accepted values, but ScrollBehavior
has a third | 214 // ScrollBehavior. 'scroll-behavior' has 2 accepted values, but ScrollBehavior |
| 215 // value (that can only be specified using CSSOM scroll APIs) so 2 bits are ne
eded. | 215 // has a third value (that can only be specified using CSSOM scroll APIs) so 2 |
| 216 // bits are needed. |
| 216 unsigned m_scrollBehavior : 2; | 217 unsigned m_scrollBehavior : 2; |
| 217 | 218 |
| 218 unsigned m_scrollSnapType : 2; // ScrollSnapType | 219 unsigned m_scrollSnapType : 2; // ScrollSnapType |
| 219 | 220 |
| 220 // Plugins require accelerated compositing for reasons external to blink. | 221 // Plugins require accelerated compositing for reasons external to blink. |
| 221 // In which case, we need to update the ComputedStyle on the LayoutEmbeddedObj
ect, | 222 // In which case, we need to update the ComputedStyle on the |
| 222 // so store this bit so that the style actually changes when the plugin | 223 // LayoutEmbeddedObject, so store this bit so that the style actually changes |
| 223 // becomes composited. | 224 // when the plugin becomes composited. |
| 224 unsigned m_requiresAcceleratedCompositingForExternalReasons : 1; | 225 unsigned m_requiresAcceleratedCompositingForExternalReasons : 1; |
| 225 | 226 |
| 226 // Whether the transform (if it exists) is stored in the element's inline styl
e. | 227 // Whether the transform (if it exists) is stored in the element's inline |
| 228 // style. |
| 227 unsigned m_hasInlineTransform : 1; | 229 unsigned m_hasInlineTransform : 1; |
| 228 unsigned m_resize : 2; // EResize | 230 unsigned m_resize : 2; // EResize |
| 229 unsigned m_hasCompositorProxy : 1; | 231 unsigned m_hasCompositorProxy : 1; |
| 230 | 232 |
| 231 // Style adjustment for appearance is disabled when certain properties are set
. | 233 // Style adjustment for appearance is disabled when certain properties are |
| 232 unsigned | 234 // set. |
| 233 m_hasAuthorBackground : 1; // Whether there is a author-defined backgroun
d. | 235 unsigned m_hasAuthorBackground : 1; // Whether there is a author-defined |
| 236 // background. |
| 234 unsigned m_hasAuthorBorder : 1; // Whether there is a author-defined border. | 237 unsigned m_hasAuthorBorder : 1; // Whether there is a author-defined border. |
| 235 | 238 |
| 236 private: | 239 private: |
| 237 StyleRareNonInheritedData(); | 240 StyleRareNonInheritedData(); |
| 238 StyleRareNonInheritedData(const StyleRareNonInheritedData&); | 241 StyleRareNonInheritedData(const StyleRareNonInheritedData&); |
| 239 }; | 242 }; |
| 240 | 243 |
| 241 } // namespace blink | 244 } // namespace blink |
| 242 | 245 |
| 243 #endif // StyleRareNonInheritedData_h | 246 #endif // StyleRareNonInheritedData_h |
| OLD | NEW |