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

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

Issue 2627563002: Generated unicode-bidi in ComputedStyleBase (Closed)
Patch Set: Created 3 years, 11 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
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // should not cause an inequality. 223 // should not cause an inequality.
224 bool operator==(const NonInheritedData& other) const { 224 bool operator==(const NonInheritedData& other) const {
225 return m_effectiveDisplay == other.m_effectiveDisplay && 225 return m_effectiveDisplay == other.m_effectiveDisplay &&
226 m_originalDisplay == other.m_originalDisplay && 226 m_originalDisplay == other.m_originalDisplay &&
227 m_overflowAnchor == other.m_overflowAnchor && 227 m_overflowAnchor == other.m_overflowAnchor &&
228 m_overflowX == other.m_overflowX && 228 m_overflowX == other.m_overflowX &&
229 m_overflowY == other.m_overflowY && 229 m_overflowY == other.m_overflowY &&
230 m_verticalAlign == other.m_verticalAlign && 230 m_verticalAlign == other.m_verticalAlign &&
231 m_clear == other.m_clear && m_position == other.m_position && 231 m_clear == other.m_clear && m_position == other.m_position &&
232 m_tableLayout == other.m_tableLayout && 232 m_tableLayout == other.m_tableLayout &&
233 m_unicodeBidi == other.m_unicodeBidi
234 // hasViewportUnits 233 // hasViewportUnits
235 && m_breakBefore == other.m_breakBefore && 234 m_breakBefore == other.m_breakBefore &&
236 m_breakAfter == other.m_breakAfter && 235 m_breakAfter == other.m_breakAfter &&
237 m_breakInside == other.m_breakInside; 236 m_breakInside == other.m_breakInside;
238 // styleType 237 // styleType
239 // pseudoBits 238 // pseudoBits
240 // explicitInheritance 239 // explicitInheritance
241 // unique 240 // unique
242 // emptyState 241 // emptyState
243 // affectedByFocus 242 // affectedByFocus
244 // affectedByHover 243 // affectedByHover
245 // affectedByActive 244 // affectedByActive
246 // affectedByDrag 245 // affectedByDrag
247 // isLink 246 // isLink
248 // isInherited flags 247 // isInherited flags
249 } 248 }
250 249
251 bool operator!=(const NonInheritedData& other) const { 250 bool operator!=(const NonInheritedData& other) const {
252 return !(*this == other); 251 return !(*this == other);
253 } 252 }
254 253
255 unsigned m_effectiveDisplay : 5; // EDisplay 254 unsigned m_effectiveDisplay : 5; // EDisplay
256 unsigned m_originalDisplay : 5; // EDisplay 255 unsigned m_originalDisplay : 5; // EDisplay
257 unsigned m_overflowAnchor : 2; // EOverflowAnchor 256 unsigned m_overflowAnchor : 2; // EOverflowAnchor
258 unsigned m_overflowX : 3; // EOverflow 257 unsigned m_overflowX : 3; // EOverflow
259 unsigned m_overflowY : 3; // EOverflow 258 unsigned m_overflowY : 3; // EOverflow
260 unsigned m_verticalAlign : 4; // EVerticalAlign 259 unsigned m_verticalAlign : 4; // EVerticalAlign
261 unsigned m_clear : 2; // EClear 260 unsigned m_clear : 2; // EClear
262 unsigned m_position : 3; // EPosition 261 unsigned m_position : 3; // EPosition
263 unsigned m_tableLayout : 1; // ETableLayout 262 unsigned m_tableLayout : 1; // ETableLayout
264 unsigned m_unicodeBidi : 3; // UnicodeBidi
265 263
266 // This is set if we used viewport units when resolving a length. 264 // This is set if we used viewport units when resolving a length.
267 // It is mutable so we can pass around const ComputedStyles to resolve 265 // It is mutable so we can pass around const ComputedStyles to resolve
268 // lengths. 266 // lengths.
269 mutable unsigned m_hasViewportUnits : 1; 267 mutable unsigned m_hasViewportUnits : 1;
270 268
271 // 32 bits 269 // 32 bits
272 270
273 unsigned m_breakBefore : 4; // EBreak 271 unsigned m_breakBefore : 4; // EBreak
274 unsigned m_breakAfter : 4; // EBreak 272 unsigned m_breakAfter : 4; // EBreak
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 static_cast<unsigned>(initialDisplay()); 311 static_cast<unsigned>(initialDisplay());
314 m_nonInheritedData.m_overflowAnchor = 312 m_nonInheritedData.m_overflowAnchor =
315 static_cast<unsigned>(initialOverflowAnchor()); 313 static_cast<unsigned>(initialOverflowAnchor());
316 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX()); 314 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX());
317 m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY()); 315 m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY());
318 m_nonInheritedData.m_verticalAlign = 316 m_nonInheritedData.m_verticalAlign =
319 static_cast<unsigned>(initialVerticalAlign()); 317 static_cast<unsigned>(initialVerticalAlign());
320 m_nonInheritedData.m_clear = initialClear(); 318 m_nonInheritedData.m_clear = initialClear();
321 m_nonInheritedData.m_position = initialPosition(); 319 m_nonInheritedData.m_position = initialPosition();
322 m_nonInheritedData.m_tableLayout = initialTableLayout(); 320 m_nonInheritedData.m_tableLayout = initialTableLayout();
323 m_nonInheritedData.m_unicodeBidi =
324 static_cast<unsigned>(initialUnicodeBidi());
325 m_nonInheritedData.m_breakBefore = initialBreakBefore(); 321 m_nonInheritedData.m_breakBefore = initialBreakBefore();
326 m_nonInheritedData.m_breakAfter = initialBreakAfter(); 322 m_nonInheritedData.m_breakAfter = initialBreakAfter();
327 m_nonInheritedData.m_breakInside = initialBreakInside(); 323 m_nonInheritedData.m_breakInside = initialBreakInside();
328 m_nonInheritedData.m_styleType = PseudoIdNone; 324 m_nonInheritedData.m_styleType = PseudoIdNone;
329 m_nonInheritedData.m_pseudoBits = 0; 325 m_nonInheritedData.m_pseudoBits = 0;
330 m_nonInheritedData.m_explicitInheritance = false; 326 m_nonInheritedData.m_explicitInheritance = false;
331 m_nonInheritedData.m_variableReference = false; 327 m_nonInheritedData.m_variableReference = false;
332 m_nonInheritedData.m_unique = false; 328 m_nonInheritedData.m_unique = false;
333 m_nonInheritedData.m_emptyState = false; 329 m_nonInheritedData.m_emptyState = false;
334 m_nonInheritedData.m_hasViewportUnits = false; 330 m_nonInheritedData.m_hasViewportUnits = false;
(...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 1847
1852 // touch-action 1848 // touch-action
1853 static TouchAction initialTouchAction() { return TouchActionAuto; } 1849 static TouchAction initialTouchAction() { return TouchActionAuto; }
1854 TouchAction getTouchAction() const { 1850 TouchAction getTouchAction() const {
1855 return static_cast<TouchAction>(m_rareNonInheritedData->m_touchAction); 1851 return static_cast<TouchAction>(m_rareNonInheritedData->m_touchAction);
1856 } 1852 }
1857 void setTouchAction(TouchAction t) { 1853 void setTouchAction(TouchAction t) {
1858 SET_VAR(m_rareNonInheritedData, m_touchAction, t); 1854 SET_VAR(m_rareNonInheritedData, m_touchAction, t);
1859 } 1855 }
1860 1856
1861 // unicode-bidi
1862 static UnicodeBidi initialUnicodeBidi() { return UnicodeBidi::kNormal; }
1863 UnicodeBidi getUnicodeBidi() const {
1864 return static_cast<UnicodeBidi>(m_nonInheritedData.m_unicodeBidi);
1865 }
1866 void setUnicodeBidi(UnicodeBidi b) {
1867 m_nonInheritedData.m_unicodeBidi = static_cast<unsigned>(b);
1868 }
1869
1870 // vertical-align 1857 // vertical-align
1871 static EVerticalAlign initialVerticalAlign() { 1858 static EVerticalAlign initialVerticalAlign() {
1872 return EVerticalAlign::Baseline; 1859 return EVerticalAlign::Baseline;
1873 } 1860 }
1874 EVerticalAlign verticalAlign() const { 1861 EVerticalAlign verticalAlign() const {
1875 return static_cast<EVerticalAlign>(m_nonInheritedData.m_verticalAlign); 1862 return static_cast<EVerticalAlign>(m_nonInheritedData.m_verticalAlign);
1876 } 1863 }
1877 const Length& getVerticalAlignLength() const { 1864 const Length& getVerticalAlignLength() const {
1878 return m_box->verticalAlign(); 1865 return m_box->verticalAlign();
1879 } 1866 }
(...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after
3952 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 3939 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
3953 } 3940 }
3954 3941
3955 inline bool ComputedStyle::hasPseudoElementStyle() const { 3942 inline bool ComputedStyle::hasPseudoElementStyle() const {
3956 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 3943 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
3957 } 3944 }
3958 3945
3959 } // namespace blink 3946 } // namespace blink
3960 3947
3961 #endif // ComputedStyle_h 3948 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.in ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698