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

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

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ToTed Created 5 years, 4 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 | Annotate | Revision Log
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, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void* refPtrs[3]; 47 void* refPtrs[3];
48 #endif 48 #endif
49 Length lengths[1]; 49 Length lengths[1];
50 float secondFloat; 50 float secondFloat;
51 unsigned m_bitfields[2]; 51 unsigned m_bitfields[2];
52 short pagedMediaShorts[2]; 52 short pagedMediaShorts[2];
53 short hyphenationShorts[3]; 53 short hyphenationShorts[3];
54 54
55 Color touchColors; 55 Color touchColors;
56 TabSize tabSize; 56 TabSize tabSize;
57 void* variables[1];
57 }; 58 };
58 59
59 static_assert(sizeof(StyleRareInheritedData) <= sizeof(SameSizeAsStyleRareInheri tedData), "StyleRareInheritedData should stay small"); 60 static_assert(sizeof(StyleRareInheritedData) <= sizeof(SameSizeAsStyleRareInheri tedData), "StyleRareInheritedData should stay small");
60 61
61 StyleRareInheritedData::StyleRareInheritedData() 62 StyleRareInheritedData::StyleRareInheritedData()
62 : listStyleImage(ComputedStyle::initialListStyleImage()) 63 : listStyleImage(ComputedStyle::initialListStyleImage())
63 , textStrokeWidth(ComputedStyle::initialTextStrokeWidth()) 64 , textStrokeWidth(ComputedStyle::initialTextStrokeWidth())
64 , indent(ComputedStyle::initialTextIndent()) 65 , indent(ComputedStyle::initialTextIndent())
65 , m_effectiveZoom(ComputedStyle::initialZoom()) 66 , m_effectiveZoom(ComputedStyle::initialZoom())
66 , widows(ComputedStyle::initialWidows()) 67 , widows(ComputedStyle::initialWidows())
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 , m_respectImageOrientation(o.m_respectImageOrientation) 155 , m_respectImageOrientation(o.m_respectImageOrientation)
155 , hyphenationString(o.hyphenationString) 156 , hyphenationString(o.hyphenationString)
156 , hyphenationLimitBefore(o.hyphenationLimitBefore) 157 , hyphenationLimitBefore(o.hyphenationLimitBefore)
157 , hyphenationLimitAfter(o.hyphenationLimitAfter) 158 , hyphenationLimitAfter(o.hyphenationLimitAfter)
158 , hyphenationLimitLines(o.hyphenationLimitLines) 159 , hyphenationLimitLines(o.hyphenationLimitLines)
159 , locale(o.locale) 160 , locale(o.locale)
160 , textEmphasisCustomMark(o.textEmphasisCustomMark) 161 , textEmphasisCustomMark(o.textEmphasisCustomMark)
161 , tapHighlightColor(o.tapHighlightColor) 162 , tapHighlightColor(o.tapHighlightColor)
162 , appliedTextDecorations(o.appliedTextDecorations) 163 , appliedTextDecorations(o.appliedTextDecorations)
163 , m_tabSize(o.m_tabSize) 164 , m_tabSize(o.m_tabSize)
165 , variables(o.variables)
164 { 166 {
165 } 167 }
166 168
167 StyleRareInheritedData::~StyleRareInheritedData() 169 StyleRareInheritedData::~StyleRareInheritedData()
168 { 170 {
169 } 171 }
170 172
171 bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const 173 bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
172 { 174 {
173 return m_textStrokeColor == o.m_textStrokeColor 175 return m_textStrokeColor == o.m_textStrokeColor
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 && m_respectImageOrientation == o.m_respectImageOrientation 220 && m_respectImageOrientation == o.m_respectImageOrientation
219 && hyphenationString == o.hyphenationString 221 && hyphenationString == o.hyphenationString
220 && locale == o.locale 222 && locale == o.locale
221 && textEmphasisCustomMark == o.textEmphasisCustomMark 223 && textEmphasisCustomMark == o.textEmphasisCustomMark
222 && quotesDataEquivalent(o) 224 && quotesDataEquivalent(o)
223 && m_tabSize == o.m_tabSize 225 && m_tabSize == o.m_tabSize
224 && m_imageRendering == o.m_imageRendering 226 && m_imageRendering == o.m_imageRendering
225 && m_textUnderlinePosition == o.m_textUnderlinePosition 227 && m_textUnderlinePosition == o.m_textUnderlinePosition
226 && m_rubyPosition == o.m_rubyPosition 228 && m_rubyPosition == o.m_rubyPosition
227 && dataEquivalent(listStyleImage.get(), o.listStyleImage.get()) 229 && dataEquivalent(listStyleImage.get(), o.listStyleImage.get())
228 && dataEquivalent(appliedTextDecorations, o.appliedTextDecorations); 230 && dataEquivalent(appliedTextDecorations, o.appliedTextDecorations)
231 && variables == o.variables;
229 } 232 }
230 233
231 bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const 234 bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const
232 { 235 {
233 return dataEquivalent(textShadow.get(), o.textShadow.get()); 236 return dataEquivalent(textShadow.get(), o.textShadow.get());
234 } 237 }
235 238
236 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData& o) const 239 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData& o) const
237 { 240 {
238 return dataEquivalent(quotes, o.quotes); 241 return dataEquivalent(quotes, o.quotes);
239 } 242 }
240 243
241 } // namespace blink 244 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698