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

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

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
11 * License as published by the Free Software Foundation; either 11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version. 12 * version 2 of the License, or (at your option) any later version.
13 * 13 *
14 * This library is distributed in the hope that it will be useful, 14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details. 17 * Library General Public License for more details.
18 * 18 *
19 * You should have received a copy of the GNU Library General Public License 19 * You should have received a copy of the GNU Library General Public License
20 * along with this library; see the file COPYING.LIB. If not, write to 20 * along with this library; see the file COPYING.LIB. If not, write to
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA. 22 * Boston, MA 02110-1301, USA.
23 * 23 *
24 */ 24 */
25 25
26 #ifndef ComputedStyle_h 26 #ifndef ComputedStyle_h
27 #define ComputedStyle_h 27 #define ComputedStyle_h
28 28
29 #include <memory>
29 #include "core/CSSPropertyNames.h" 30 #include "core/CSSPropertyNames.h"
30 #include "core/ComputedStyleBase.h" 31 #include "core/ComputedStyleBase.h"
31 #include "core/CoreExport.h" 32 #include "core/CoreExport.h"
32 #include "core/style/BorderValue.h" 33 #include "core/style/BorderValue.h"
33 #include "core/style/ComputedStyleConstants.h" 34 #include "core/style/ComputedStyleConstants.h"
34 #include "core/style/CounterDirectives.h" 35 #include "core/style/CounterDirectives.h"
35 #include "core/style/DataRef.h" 36 #include "core/style/DataRef.h"
36 #include "core/style/LineClampValue.h" 37 #include "core/style/LineClampValue.h"
37 #include "core/style/NinePieceImage.h" 38 #include "core/style/NinePieceImage.h"
38 #include "core/style/SVGComputedStyle.h" 39 #include "core/style/SVGComputedStyle.h"
(...skipping 29 matching lines...) Expand all
68 #include "platform/geometry/LayoutRectOutsets.h" 69 #include "platform/geometry/LayoutRectOutsets.h"
69 #include "platform/graphics/Color.h" 70 #include "platform/graphics/Color.h"
70 #include "platform/scroll/ScrollTypes.h" 71 #include "platform/scroll/ScrollTypes.h"
71 #include "platform/text/TextDirection.h" 72 #include "platform/text/TextDirection.h"
72 #include "platform/text/UnicodeBidi.h" 73 #include "platform/text/UnicodeBidi.h"
73 #include "platform/transforms/TransformOperations.h" 74 #include "platform/transforms/TransformOperations.h"
74 #include "wtf/Forward.h" 75 #include "wtf/Forward.h"
75 #include "wtf/LeakAnnotations.h" 76 #include "wtf/LeakAnnotations.h"
76 #include "wtf/RefCounted.h" 77 #include "wtf/RefCounted.h"
77 #include "wtf/Vector.h" 78 #include "wtf/Vector.h"
78 #include <memory>
79 79
80 template <typename T, typename U> 80 template <typename T, typename U>
81 inline bool compareEqual(const T& t, const U& u) { 81 inline bool compareEqual(const T& t, const U& u) {
82 return t == static_cast<T>(u); 82 return t == static_cast<T>(u);
83 } 83 }
84 84
85 template <typename T> 85 template <typename T>
86 inline bool compareEqual(const T& a, const T& b) { 86 inline bool compareEqual(const T& a, const T& b) {
87 return a == b; 87 return a == b;
88 } 88 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 (m_cursorStyle == other.m_cursorStyle) && 211 (m_cursorStyle == other.m_cursorStyle) &&
212 (m_insideLink == other.m_insideLink); 212 (m_insideLink == other.m_insideLink);
213 } 213 }
214 214
215 bool operator!=(const InheritedData& other) const { 215 bool operator!=(const InheritedData& other) const {
216 return !(*this == other); 216 return !(*this == other);
217 } 217 }
218 218
219 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the only 219 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the only
220 // text decoration on this element. 220 // text decoration on this element.
221 unsigned m_cursorStyle : 6; // ECursor 221 unsigned m_cursorStyle : 6; // ECursor
222 222
223 // non CSS2 inherited 223 // non CSS2 inherited
224 unsigned m_insideLink : 2; // EInsideLink 224 unsigned m_insideLink : 2; // EInsideLink
225 } m_inheritedData; 225 } m_inheritedData;
226 226
227 // don't inherit 227 // don't inherit
228 struct NonInheritedData { 228 struct NonInheritedData {
229 // Compare computed styles, differences in inherited bits or other flags 229 // Compare computed styles, differences in inherited bits or other flags
230 // should not cause an inequality. 230 // should not cause an inequality.
231 bool operator==(const NonInheritedData& other) const { 231 bool operator==(const NonInheritedData& other) const {
232 // Generated properties are compared in ComputedStyleBase 232 // Generated properties are compared in ComputedStyleBase
233 return m_effectiveDisplay == other.m_effectiveDisplay && 233 return m_effectiveDisplay == other.m_effectiveDisplay &&
234 m_originalDisplay == other.m_originalDisplay && 234 m_originalDisplay == other.m_originalDisplay &&
(...skipping 3612 matching lines...) Expand 10 before | Expand all | Expand 10 after
3847 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 3847 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
3848 } 3848 }
3849 3849
3850 inline bool ComputedStyle::hasPseudoElementStyle() const { 3850 inline bool ComputedStyle::hasPseudoElementStyle() const {
3851 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 3851 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
3852 } 3852 }
3853 3853
3854 } // namespace blink 3854 } // namespace blink
3855 3855
3856 #endif // ComputedStyle_h 3856 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ClipPathOperation.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698