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

Side by Side Diff: Source/core/style/StyleRareNonInheritedData.cpp

Issue 1148873005: Parsing CSS properties for scroll snap points (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix comment Created 5 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
« no previous file with comments | « Source/core/style/StyleRareNonInheritedData.h ('k') | Source/core/style/StyleScrollSnapData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 23 matching lines...) Expand all
34 34
35 class SameSizeStyleRareNonInheritedData : public RefCounted<StyleRareNonInherite dData> { 35 class SameSizeStyleRareNonInheritedData : public RefCounted<StyleRareNonInherite dData> {
36 public: 36 public:
37 float floats[3]; 37 float floats[3];
38 int integers; 38 int integers;
39 39
40 LengthPoint lengthPoints[2]; 40 LengthPoint lengthPoints[2];
41 LineClampValue lineClamps; 41 LineClampValue lineClamps;
42 DraggableRegionMode draggableRegions; 42 DraggableRegionMode draggableRegions;
43 43
44 void* dataRefs[8]; 44 void* dataRefs[9];
45 void* ownPtrs[4]; 45 void* ownPtrs[4];
46 void* refPtrs[4]; 46 void* refPtrs[4];
47 47
48 FillLayer fillLayers; 48 FillLayer fillLayers;
49 NinePieceImage ninePieces; 49 NinePieceImage ninePieces;
50 FloatSize floatSize; 50 FloatSize floatSize;
51 Length lengths; 51 Length lengths;
52 52
53 StyleColor styleColors[8]; 53 StyleColor styleColors[8];
54 54
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 , m_hasCurrentFilterAnimation(false) 107 , m_hasCurrentFilterAnimation(false)
108 , m_runningOpacityAnimationOnCompositor(false) 108 , m_runningOpacityAnimationOnCompositor(false)
109 , m_runningTransformAnimationOnCompositor(false) 109 , m_runningTransformAnimationOnCompositor(false)
110 , m_runningFilterAnimationOnCompositor(false) 110 , m_runningFilterAnimationOnCompositor(false)
111 , m_effectiveBlendMode(ComputedStyle::initialBlendMode()) 111 , m_effectiveBlendMode(ComputedStyle::initialBlendMode())
112 , m_touchAction(ComputedStyle::initialTouchAction()) 112 , m_touchAction(ComputedStyle::initialTouchAction())
113 , m_objectFit(ComputedStyle::initialObjectFit()) 113 , m_objectFit(ComputedStyle::initialObjectFit())
114 , m_isolation(ComputedStyle::initialIsolation()) 114 , m_isolation(ComputedStyle::initialIsolation())
115 , m_scrollBehavior(ComputedStyle::initialScrollBehavior()) 115 , m_scrollBehavior(ComputedStyle::initialScrollBehavior())
116 , m_scrollBlocksOn(ComputedStyle::initialScrollBlocksOn()) 116 , m_scrollBlocksOn(ComputedStyle::initialScrollBlocksOn())
117 , m_scrollSnapType(ComputedStyle::initialScrollSnapType())
117 , m_requiresAcceleratedCompositingForExternalReasons(false) 118 , m_requiresAcceleratedCompositingForExternalReasons(false)
118 , m_hasInlineTransform(false) 119 , m_hasInlineTransform(false)
119 , m_resize(ComputedStyle::initialResize()) 120 , m_resize(ComputedStyle::initialResize())
120 , m_hasCompositorProxy(false) 121 , m_hasCompositorProxy(false)
121 { 122 {
122 m_maskBoxImage.setMaskDefaults(); 123 m_maskBoxImage.setMaskDefaults();
123 } 124 }
124 125
125 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited Data& o) 126 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited Data& o)
126 : RefCounted<StyleRareNonInheritedData>() 127 : RefCounted<StyleRareNonInheritedData>()
127 , opacity(o.opacity) 128 , opacity(o.opacity)
128 , m_perspective(o.m_perspective) 129 , m_perspective(o.m_perspective)
129 , m_shapeImageThreshold(o.m_shapeImageThreshold) 130 , m_shapeImageThreshold(o.m_shapeImageThreshold)
130 , m_order(o.m_order) 131 , m_order(o.m_order)
131 , m_perspectiveOrigin(o.m_perspectiveOrigin) 132 , m_perspectiveOrigin(o.m_perspectiveOrigin)
132 , m_objectPosition(o.m_objectPosition) 133 , m_objectPosition(o.m_objectPosition)
133 , lineClamp(o.lineClamp) 134 , lineClamp(o.lineClamp)
134 , m_draggableRegionMode(o.m_draggableRegionMode) 135 , m_draggableRegionMode(o.m_draggableRegionMode)
135 , m_deprecatedFlexibleBox(o.m_deprecatedFlexibleBox) 136 , m_deprecatedFlexibleBox(o.m_deprecatedFlexibleBox)
136 , m_flexibleBox(o.m_flexibleBox) 137 , m_flexibleBox(o.m_flexibleBox)
137 , m_multiCol(o.m_multiCol) 138 , m_multiCol(o.m_multiCol)
138 , m_transform(o.m_transform) 139 , m_transform(o.m_transform)
139 , m_willChange(o.m_willChange) 140 , m_willChange(o.m_willChange)
140 , m_filter(o.m_filter) 141 , m_filter(o.m_filter)
141 , m_grid(o.m_grid) 142 , m_grid(o.m_grid)
142 , m_gridItem(o.m_gridItem) 143 , m_gridItem(o.m_gridItem)
144 , m_scrollSnap(o.m_scrollSnap)
143 , m_content(o.m_content ? o.m_content->clone() : nullptr) 145 , m_content(o.m_content ? o.m_content->clone() : nullptr)
144 , m_counterDirectives(o.m_counterDirectives ? clone(*o.m_counterDirectives) : nullptr) 146 , m_counterDirectives(o.m_counterDirectives ? clone(*o.m_counterDirectives) : nullptr)
145 , m_animations(o.m_animations ? CSSAnimationData::create(*o.m_animations) : nullptr) 147 , m_animations(o.m_animations ? CSSAnimationData::create(*o.m_animations) : nullptr)
146 , m_transitions(o.m_transitions ? CSSTransitionData::create(*o.m_transitions ) : nullptr) 148 , m_transitions(o.m_transitions ? CSSTransitionData::create(*o.m_transitions ) : nullptr)
147 , m_boxShadow(o.m_boxShadow) 149 , m_boxShadow(o.m_boxShadow)
148 , m_boxReflect(o.m_boxReflect) 150 , m_boxReflect(o.m_boxReflect)
149 , m_shapeOutside(o.m_shapeOutside) 151 , m_shapeOutside(o.m_shapeOutside)
150 , m_clipPath(o.m_clipPath) 152 , m_clipPath(o.m_clipPath)
151 , m_mask(o.m_mask) 153 , m_mask(o.m_mask)
152 , m_maskBoxImage(o.m_maskBoxImage) 154 , m_maskBoxImage(o.m_maskBoxImage)
(...skipping 30 matching lines...) Expand all
183 , m_hasCurrentFilterAnimation(o.m_hasCurrentFilterAnimation) 185 , m_hasCurrentFilterAnimation(o.m_hasCurrentFilterAnimation)
184 , m_runningOpacityAnimationOnCompositor(o.m_runningOpacityAnimationOnComposi tor) 186 , m_runningOpacityAnimationOnCompositor(o.m_runningOpacityAnimationOnComposi tor)
185 , m_runningTransformAnimationOnCompositor(o.m_runningTransformAnimationOnCom positor) 187 , m_runningTransformAnimationOnCompositor(o.m_runningTransformAnimationOnCom positor)
186 , m_runningFilterAnimationOnCompositor(o.m_runningFilterAnimationOnComposito r) 188 , m_runningFilterAnimationOnCompositor(o.m_runningFilterAnimationOnComposito r)
187 , m_effectiveBlendMode(o.m_effectiveBlendMode) 189 , m_effectiveBlendMode(o.m_effectiveBlendMode)
188 , m_touchAction(o.m_touchAction) 190 , m_touchAction(o.m_touchAction)
189 , m_objectFit(o.m_objectFit) 191 , m_objectFit(o.m_objectFit)
190 , m_isolation(o.m_isolation) 192 , m_isolation(o.m_isolation)
191 , m_scrollBehavior(o.m_scrollBehavior) 193 , m_scrollBehavior(o.m_scrollBehavior)
192 , m_scrollBlocksOn(o.m_scrollBlocksOn) 194 , m_scrollBlocksOn(o.m_scrollBlocksOn)
195 , m_scrollSnapType(o.m_scrollSnapType)
193 , m_requiresAcceleratedCompositingForExternalReasons(o.m_requiresAccelerated CompositingForExternalReasons) 196 , m_requiresAcceleratedCompositingForExternalReasons(o.m_requiresAccelerated CompositingForExternalReasons)
194 , m_hasInlineTransform(o.m_hasInlineTransform) 197 , m_hasInlineTransform(o.m_hasInlineTransform)
195 , m_resize(o.m_resize) 198 , m_resize(o.m_resize)
196 , m_hasCompositorProxy(o.m_hasCompositorProxy) 199 , m_hasCompositorProxy(o.m_hasCompositorProxy)
197 { 200 {
198 } 201 }
199 202
200 StyleRareNonInheritedData::~StyleRareNonInheritedData() 203 StyleRareNonInheritedData::~StyleRareNonInheritedData()
201 { 204 {
202 const FilterOperations& filterOperations = m_filter->m_operations; 205 const FilterOperations& filterOperations = m_filter->m_operations;
(...skipping 12 matching lines...) Expand all
215 && lineClamp == o.lineClamp 218 && lineClamp == o.lineClamp
216 && m_draggableRegionMode == o.m_draggableRegionMode 219 && m_draggableRegionMode == o.m_draggableRegionMode
217 && m_deprecatedFlexibleBox == o.m_deprecatedFlexibleBox 220 && m_deprecatedFlexibleBox == o.m_deprecatedFlexibleBox
218 && m_flexibleBox == o.m_flexibleBox 221 && m_flexibleBox == o.m_flexibleBox
219 && m_multiCol == o.m_multiCol 222 && m_multiCol == o.m_multiCol
220 && m_transform == o.m_transform 223 && m_transform == o.m_transform
221 && m_willChange == o.m_willChange 224 && m_willChange == o.m_willChange
222 && m_filter == o.m_filter 225 && m_filter == o.m_filter
223 && m_grid == o.m_grid 226 && m_grid == o.m_grid
224 && m_gridItem == o.m_gridItem 227 && m_gridItem == o.m_gridItem
228 && m_scrollSnap == o.m_scrollSnap
225 && contentDataEquivalent(o) 229 && contentDataEquivalent(o)
226 && counterDataEquivalent(o) 230 && counterDataEquivalent(o)
227 && shadowDataEquivalent(o) 231 && shadowDataEquivalent(o)
228 && reflectionDataEquivalent(o) 232 && reflectionDataEquivalent(o)
229 && animationDataEquivalent(o) 233 && animationDataEquivalent(o)
230 && transitionDataEquivalent(o) 234 && transitionDataEquivalent(o)
231 && shapeOutsideDataEquivalent(o) 235 && shapeOutsideDataEquivalent(o)
232 && m_mask == o.m_mask 236 && m_mask == o.m_mask
233 && m_maskBoxImage == o.m_maskBoxImage 237 && m_maskBoxImage == o.m_maskBoxImage
234 && m_pageSize == o.m_pageSize 238 && m_pageSize == o.m_pageSize
(...skipping 28 matching lines...) Expand all
263 && m_wrapThrough == o.m_wrapThrough 267 && m_wrapThrough == o.m_wrapThrough
264 && m_hasCurrentOpacityAnimation == o.m_hasCurrentOpacityAnimation 268 && m_hasCurrentOpacityAnimation == o.m_hasCurrentOpacityAnimation
265 && m_hasCurrentTransformAnimation == o.m_hasCurrentTransformAnimation 269 && m_hasCurrentTransformAnimation == o.m_hasCurrentTransformAnimation
266 && m_hasCurrentFilterAnimation == o.m_hasCurrentFilterAnimation 270 && m_hasCurrentFilterAnimation == o.m_hasCurrentFilterAnimation
267 && m_effectiveBlendMode == o.m_effectiveBlendMode 271 && m_effectiveBlendMode == o.m_effectiveBlendMode
268 && m_touchAction == o.m_touchAction 272 && m_touchAction == o.m_touchAction
269 && m_objectFit == o.m_objectFit 273 && m_objectFit == o.m_objectFit
270 && m_isolation == o.m_isolation 274 && m_isolation == o.m_isolation
271 && m_scrollBehavior == o.m_scrollBehavior 275 && m_scrollBehavior == o.m_scrollBehavior
272 && m_scrollBlocksOn == o.m_scrollBlocksOn 276 && m_scrollBlocksOn == o.m_scrollBlocksOn
277 && m_scrollBlocksOn == o.m_scrollSnapType
273 && m_requiresAcceleratedCompositingForExternalReasons == o.m_requiresAcc eleratedCompositingForExternalReasons 278 && m_requiresAcceleratedCompositingForExternalReasons == o.m_requiresAcc eleratedCompositingForExternalReasons
274 && m_hasInlineTransform == o.m_hasInlineTransform 279 && m_hasInlineTransform == o.m_hasInlineTransform
275 && m_resize == o.m_resize 280 && m_resize == o.m_resize
276 && m_hasCompositorProxy == o.m_hasCompositorProxy; 281 && m_hasCompositorProxy == o.m_hasCompositorProxy;
277 } 282 }
278 283
279 bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInherite dData& o) const 284 bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInherite dData& o) const
280 { 285 {
281 ContentData* a = m_content.get(); 286 ContentData* a = m_content.get();
282 ContentData* b = o.m_content.get(); 287 ContentData* b = o.m_content.get();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 { 336 {
332 return dataEquivalent(m_shapeOutside, o.m_shapeOutside); 337 return dataEquivalent(m_shapeOutside, o.m_shapeOutside);
333 } 338 }
334 339
335 bool StyleRareNonInheritedData::clipPathDataEquivalent(const StyleRareNonInherit edData& o) const 340 bool StyleRareNonInheritedData::clipPathDataEquivalent(const StyleRareNonInherit edData& o) const
336 { 341 {
337 return dataEquivalent(m_clipPath, o.m_clipPath); 342 return dataEquivalent(m_clipPath, o.m_clipPath);
338 } 343 }
339 344
340 } // namespace blink 345 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/style/StyleRareNonInheritedData.h ('k') | Source/core/style/StyleScrollSnapData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698