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

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

Issue 2366313006: CSS Properties and Values API: Support non-inherited custom properties (Closed)
Patch Set: use de morgan's law Created 4 years, 2 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) 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 10 matching lines...) Expand all
21 21
22 #include "core/style/StyleRareNonInheritedData.h" 22 #include "core/style/StyleRareNonInheritedData.h"
23 23
24 #include "core/animation/css/CSSAnimationData.h" 24 #include "core/animation/css/CSSAnimationData.h"
25 #include "core/animation/css/CSSTransitionData.h" 25 #include "core/animation/css/CSSTransitionData.h"
26 #include "core/style/ContentData.h" 26 #include "core/style/ContentData.h"
27 #include "core/style/DataEquivalency.h" 27 #include "core/style/DataEquivalency.h"
28 #include "core/style/ComputedStyle.h" 28 #include "core/style/ComputedStyle.h"
29 #include "core/style/ShadowList.h" 29 #include "core/style/ShadowList.h"
30 #include "core/style/StyleFilterData.h" 30 #include "core/style/StyleFilterData.h"
31 #include "core/style/StyleNonInheritedVariables.h"
31 #include "core/style/StyleTransformData.h" 32 #include "core/style/StyleTransformData.h"
32 #include "core/layout/svg/ReferenceFilterBuilder.h" 33 #include "core/layout/svg/ReferenceFilterBuilder.h"
33 34
34 namespace blink { 35 namespace blink {
35 36
36 class SameSizeStyleRareNonInheritedData : public RefCounted<StyleRareNonInherite dData> { 37 class SameSizeStyleRareNonInheritedData : public RefCounted<StyleRareNonInherite dData> {
37 public: 38 public:
38 float floats[3]; 39 float floats[3];
39 int integers; 40 int integers;
40 41
41 LengthPoint lengthPoints[2]; 42 LengthPoint lengthPoints[2];
42 LineClampValue lineClamps; 43 LineClampValue lineClamps;
43 DraggableRegionMode draggableRegions; 44 DraggableRegionMode draggableRegions;
44 45
45 void* dataRefs[8]; 46 void* dataRefs[8];
46 DataPersistent<void*> dataPersistents[2]; 47 DataPersistent<void*> dataPersistents[2];
47 void* ownPtrs[4]; 48 void* ownPtrs[4];
48 Persistent<void*> persistentHandles[2]; 49 Persistent<void*> persistentHandles[2];
49 void* refPtrs[2]; 50 void* refPtrs[3];
50 void* uniquePtrs[1]; 51 void* uniquePtrs[1];
51 52
52 FillLayer fillLayers; 53 FillLayer fillLayers;
53 NinePieceImage ninePieces; 54 NinePieceImage ninePieces;
54 FloatSize floatSize; 55 FloatSize floatSize;
55 Length lengths; 56 Length lengths;
56 57
57 StyleColor styleColors[8]; 58 StyleColor styleColors[8];
58 59
59 Vector<String> m_callbackSelectors; 60 Vector<String> m_callbackSelectors;
(...skipping 21 matching lines...) Expand all
81 , m_pageSize() 82 , m_pageSize()
82 , m_shapeMargin(ComputedStyle::initialShapeMargin()) 83 , m_shapeMargin(ComputedStyle::initialShapeMargin())
83 , m_textDecorationColor(StyleColor::currentColor()) 84 , m_textDecorationColor(StyleColor::currentColor())
84 , m_visitedLinkTextDecorationColor(StyleColor::currentColor()) 85 , m_visitedLinkTextDecorationColor(StyleColor::currentColor())
85 , m_visitedLinkBackgroundColor(ComputedStyle::initialBackgroundColor()) 86 , m_visitedLinkBackgroundColor(ComputedStyle::initialBackgroundColor())
86 , m_visitedLinkOutlineColor(StyleColor::currentColor()) 87 , m_visitedLinkOutlineColor(StyleColor::currentColor())
87 , m_visitedLinkBorderLeftColor(StyleColor::currentColor()) 88 , m_visitedLinkBorderLeftColor(StyleColor::currentColor())
88 , m_visitedLinkBorderRightColor(StyleColor::currentColor()) 89 , m_visitedLinkBorderRightColor(StyleColor::currentColor())
89 , m_visitedLinkBorderTopColor(StyleColor::currentColor()) 90 , m_visitedLinkBorderTopColor(StyleColor::currentColor())
90 , m_visitedLinkBorderBottomColor(StyleColor::currentColor()) 91 , m_visitedLinkBorderBottomColor(StyleColor::currentColor())
92 , m_variables(ComputedStyle::initialNonInheritedVariables())
91 , m_alignContent(ComputedStyle::initialContentAlignment()) 93 , m_alignContent(ComputedStyle::initialContentAlignment())
92 , m_alignItems(ComputedStyle::initialDefaultAlignment()) 94 , m_alignItems(ComputedStyle::initialDefaultAlignment())
93 , m_alignSelf(ComputedStyle::initialSelfAlignment()) 95 , m_alignSelf(ComputedStyle::initialSelfAlignment())
94 , m_justifyContent(ComputedStyle::initialContentAlignment()) 96 , m_justifyContent(ComputedStyle::initialContentAlignment())
95 , m_justifyItems(ComputedStyle::initialSelfAlignment()) 97 , m_justifyItems(ComputedStyle::initialSelfAlignment())
96 , m_justifySelf(ComputedStyle::initialSelfAlignment()) 98 , m_justifySelf(ComputedStyle::initialSelfAlignment())
97 , m_pageSizeType(PAGE_SIZE_AUTO) 99 , m_pageSizeType(PAGE_SIZE_AUTO)
98 , m_transformStyle3D(ComputedStyle::initialTransformStyle3D()) 100 , m_transformStyle3D(ComputedStyle::initialTransformStyle3D())
99 , m_backfaceVisibility(ComputedStyle::initialBackfaceVisibility()) 101 , m_backfaceVisibility(ComputedStyle::initialBackfaceVisibility())
100 , userDrag(ComputedStyle::initialUserDrag()) 102 , userDrag(ComputedStyle::initialUserDrag())
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 , m_pageSize(o.m_pageSize) 164 , m_pageSize(o.m_pageSize)
163 , m_shapeMargin(o.m_shapeMargin) 165 , m_shapeMargin(o.m_shapeMargin)
164 , m_textDecorationColor(o.m_textDecorationColor) 166 , m_textDecorationColor(o.m_textDecorationColor)
165 , m_visitedLinkTextDecorationColor(o.m_visitedLinkTextDecorationColor) 167 , m_visitedLinkTextDecorationColor(o.m_visitedLinkTextDecorationColor)
166 , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor) 168 , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
167 , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor) 169 , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor)
168 , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor) 170 , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor)
169 , m_visitedLinkBorderRightColor(o.m_visitedLinkBorderRightColor) 171 , m_visitedLinkBorderRightColor(o.m_visitedLinkBorderRightColor)
170 , m_visitedLinkBorderTopColor(o.m_visitedLinkBorderTopColor) 172 , m_visitedLinkBorderTopColor(o.m_visitedLinkBorderTopColor)
171 , m_visitedLinkBorderBottomColor(o.m_visitedLinkBorderBottomColor) 173 , m_visitedLinkBorderBottomColor(o.m_visitedLinkBorderBottomColor)
174 , m_variables(o.m_variables ? o.m_variables->copy() : nullptr)
172 , m_alignContent(o.m_alignContent) 175 , m_alignContent(o.m_alignContent)
173 , m_alignItems(o.m_alignItems) 176 , m_alignItems(o.m_alignItems)
174 , m_alignSelf(o.m_alignSelf) 177 , m_alignSelf(o.m_alignSelf)
175 , m_justifyContent(o.m_justifyContent) 178 , m_justifyContent(o.m_justifyContent)
176 , m_justifyItems(o.m_justifyItems) 179 , m_justifyItems(o.m_justifyItems)
177 , m_justifySelf(o.m_justifySelf) 180 , m_justifySelf(o.m_justifySelf)
178 , m_pageSizeType(o.m_pageSizeType) 181 , m_pageSizeType(o.m_pageSizeType)
179 , m_transformStyle3D(o.m_transformStyle3D) 182 , m_transformStyle3D(o.m_transformStyle3D)
180 , m_backfaceVisibility(o.m_backfaceVisibility) 183 , m_backfaceVisibility(o.m_backfaceVisibility)
181 , userDrag(o.userDrag) 184 , userDrag(o.userDrag)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 && clipPathDataEquivalent(o) 250 && clipPathDataEquivalent(o)
248 && m_textDecorationColor == o.m_textDecorationColor 251 && m_textDecorationColor == o.m_textDecorationColor
249 && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColo r 252 && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColo r
250 && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor 253 && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
251 && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor 254 && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
252 && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor 255 && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor
253 && m_visitedLinkBorderRightColor == o.m_visitedLinkBorderRightColor 256 && m_visitedLinkBorderRightColor == o.m_visitedLinkBorderRightColor
254 && m_visitedLinkBorderTopColor == o.m_visitedLinkBorderTopColor 257 && m_visitedLinkBorderTopColor == o.m_visitedLinkBorderTopColor
255 && m_visitedLinkBorderBottomColor == o.m_visitedLinkBorderBottomColor 258 && m_visitedLinkBorderBottomColor == o.m_visitedLinkBorderBottomColor
256 && m_callbackSelectors == o.m_callbackSelectors 259 && m_callbackSelectors == o.m_callbackSelectors
260 && dataEquivalent(m_variables, o.m_variables)
257 && m_alignContent == o.m_alignContent 261 && m_alignContent == o.m_alignContent
258 && m_alignItems == o.m_alignItems 262 && m_alignItems == o.m_alignItems
259 && m_alignSelf == o.m_alignSelf 263 && m_alignSelf == o.m_alignSelf
260 && m_justifyContent == o.m_justifyContent 264 && m_justifyContent == o.m_justifyContent
261 && m_justifyItems == o.m_justifyItems 265 && m_justifyItems == o.m_justifyItems
262 && m_justifySelf == o.m_justifySelf 266 && m_justifySelf == o.m_justifySelf
263 && m_pageSizeType == o.m_pageSizeType 267 && m_pageSizeType == o.m_pageSizeType
264 && m_transformStyle3D == o.m_transformStyle3D 268 && m_transformStyle3D == o.m_transformStyle3D
265 && m_backfaceVisibility == o.m_backfaceVisibility 269 && m_backfaceVisibility == o.m_backfaceVisibility
266 && userDrag == o.userDrag 270 && userDrag == o.userDrag
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 { 353 {
350 return dataEquivalent(m_shapeOutside, o.m_shapeOutside); 354 return dataEquivalent(m_shapeOutside, o.m_shapeOutside);
351 } 355 }
352 356
353 bool StyleRareNonInheritedData::clipPathDataEquivalent(const StyleRareNonInherit edData& o) const 357 bool StyleRareNonInheritedData::clipPathDataEquivalent(const StyleRareNonInherit edData& o) const
354 { 358 {
355 return dataEquivalent(m_clipPath, o.m_clipPath); 359 return dataEquivalent(m_clipPath, o.m_clipPath);
356 } 360 }
357 361
358 } // namespace blink 362 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698