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

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

Issue 2563353002: Generate storage for -webkit-box-direction in ComputedStyleBase (Closed)
Patch Set: Created 4 years 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // stylePropagationDiff(). 214 // stylePropagationDiff().
215 return (m_pointerEvents == other.m_pointerEvents); 215 return (m_pointerEvents == other.m_pointerEvents);
216 } 216 }
217 217
218 inline bool compareEqualNonIndependent(const InheritedData& other) const { 218 inline bool compareEqualNonIndependent(const InheritedData& other) const {
219 return (m_listStyleType == other.m_listStyleType) && 219 return (m_listStyleType == other.m_listStyleType) &&
220 (m_textAlign == other.m_textAlign) && 220 (m_textAlign == other.m_textAlign) &&
221 (m_hasSimpleUnderline == other.m_hasSimpleUnderline) && 221 (m_hasSimpleUnderline == other.m_hasSimpleUnderline) &&
222 (m_cursorStyle == other.m_cursorStyle) && 222 (m_cursorStyle == other.m_cursorStyle) &&
223 (m_direction == other.m_direction) && 223 (m_direction == other.m_direction) &&
224 (m_boxDirection == other.m_boxDirection) &&
225 (m_rtlOrdering == other.m_rtlOrdering) && 224 (m_rtlOrdering == other.m_rtlOrdering) &&
226 (m_printColorAdjust == other.m_printColorAdjust) && 225 (m_printColorAdjust == other.m_printColorAdjust) &&
227 (m_insideLink == other.m_insideLink) && 226 (m_insideLink == other.m_insideLink) &&
228 (m_writingMode == other.m_writingMode); 227 (m_writingMode == other.m_writingMode);
229 } 228 }
230 229
231 unsigned m_listStyleType : 7; // EListStyleType 230 unsigned m_listStyleType : 7; // EListStyleType
232 unsigned m_textAlign : 4; // ETextAlign 231 unsigned m_textAlign : 4; // ETextAlign
233 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the only 232 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the only
234 // text decoration on this element. 233 // text decoration on this element.
235 unsigned m_cursorStyle : 6; // ECursor 234 unsigned m_cursorStyle : 6; // ECursor
236 unsigned m_direction : 1; // TextDirection 235 unsigned m_direction : 1; // TextDirection
237 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction property,
238 // flexible box layout module)
239 // 32 bits 236 // 32 bits
240 237
241 // non CSS2 inherited 238 // non CSS2 inherited
242 unsigned m_rtlOrdering : 1; // EOrder 239 unsigned m_rtlOrdering : 1; // EOrder
243 unsigned m_printColorAdjust : 1; // PrintColorAdjust 240 unsigned m_printColorAdjust : 1; // PrintColorAdjust
244 unsigned m_pointerEvents : 4; // EPointerEvents 241 unsigned m_pointerEvents : 4; // EPointerEvents
245 unsigned m_insideLink : 2; // EInsideLink 242 unsigned m_insideLink : 2; // EInsideLink
246 243
247 // CSS Text Layout Module Level 3: Vertical writing support 244 // CSS Text Layout Module Level 3: Vertical writing support
248 unsigned m_writingMode : 2; // WritingMode 245 unsigned m_writingMode : 2; // WritingMode
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 351
355 void setBitDefaults() { 352 void setBitDefaults() {
356 ComputedStyleBase::setBitDefaults(); 353 ComputedStyleBase::setBitDefaults();
357 m_inheritedData.m_listStyleType = 354 m_inheritedData.m_listStyleType =
358 static_cast<unsigned>(initialListStyleType()); 355 static_cast<unsigned>(initialListStyleType());
359 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign()); 356 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign());
360 m_inheritedData.m_hasSimpleUnderline = false; 357 m_inheritedData.m_hasSimpleUnderline = false;
361 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); 358 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor());
362 m_inheritedData.m_direction = initialDirection(); 359 m_inheritedData.m_direction = initialDirection();
363 m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering()); 360 m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering());
364 m_inheritedData.m_boxDirection =
365 static_cast<unsigned>(initialBoxDirection());
366 m_inheritedData.m_printColorAdjust = 361 m_inheritedData.m_printColorAdjust =
367 static_cast<unsigned>(initialPrintColorAdjust()); 362 static_cast<unsigned>(initialPrintColorAdjust());
368 m_inheritedData.m_pointerEvents = 363 m_inheritedData.m_pointerEvents =
369 static_cast<unsigned>(initialPointerEvents()); 364 static_cast<unsigned>(initialPointerEvents());
370 m_inheritedData.m_insideLink = NotInsideLink; 365 m_inheritedData.m_insideLink = NotInsideLink;
371 m_inheritedData.m_writingMode = initialWritingMode(); 366 m_inheritedData.m_writingMode = initialWritingMode();
372 367
373 m_nonInheritedData.m_effectiveDisplay = 368 m_nonInheritedData.m_effectiveDisplay =
374 m_nonInheritedData.m_originalDisplay = 369 m_nonInheritedData.m_originalDisplay =
375 static_cast<unsigned>(initialDisplay()); 370 static_cast<unsigned>(initialDisplay());
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 return TextEmphasisPositionOver; 2324 return TextEmphasisPositionOver;
2330 } 2325 }
2331 TextEmphasisPosition getTextEmphasisPosition() const { 2326 TextEmphasisPosition getTextEmphasisPosition() const {
2332 return static_cast<TextEmphasisPosition>( 2327 return static_cast<TextEmphasisPosition>(
2333 m_rareInheritedData->textEmphasisPosition); 2328 m_rareInheritedData->textEmphasisPosition);
2334 } 2329 }
2335 void setTextEmphasisPosition(TextEmphasisPosition position) { 2330 void setTextEmphasisPosition(TextEmphasisPosition position) {
2336 SET_VAR(m_rareInheritedData, textEmphasisPosition, position); 2331 SET_VAR(m_rareInheritedData, textEmphasisPosition, position);
2337 } 2332 }
2338 2333
2339 // -webkit-box-direction
2340 static EBoxDirection initialBoxDirection() { return EBoxDirection::Normal; }
2341 EBoxDirection boxDirection() const {
2342 return static_cast<EBoxDirection>(m_inheritedData.m_boxDirection);
2343 }
2344 void setBoxDirection(EBoxDirection d) {
2345 m_inheritedData.m_boxDirection = static_cast<unsigned>(d);
2346 }
2347
2348 // -webkit-highlight 2334 // -webkit-highlight
2349 static const AtomicString& initialHighlight() { return nullAtom; } 2335 static const AtomicString& initialHighlight() { return nullAtom; }
2350 const AtomicString& highlight() const { 2336 const AtomicString& highlight() const {
2351 return m_rareInheritedData->highlight; 2337 return m_rareInheritedData->highlight;
2352 } 2338 }
2353 void setHighlight(const AtomicString& h) { 2339 void setHighlight(const AtomicString& h) {
2354 SET_VAR(m_rareInheritedData, highlight, h); 2340 SET_VAR(m_rareInheritedData, highlight, h);
2355 } 2341 }
2356 2342
2357 // -webkit-line-clamp 2343 // -webkit-line-clamp
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
4076 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 4062 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
4077 } 4063 }
4078 4064
4079 inline bool ComputedStyle::hasPseudoElementStyle() const { 4065 inline bool ComputedStyle::hasPseudoElementStyle() const {
4080 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 4066 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
4081 } 4067 }
4082 4068
4083 } // namespace blink 4069 } // namespace blink
4084 4070
4085 #endif // ComputedStyle_h 4071 #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