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

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

Issue 2380233002: Changed EListStylePosition to an enum class and renamed its members to keywords (Closed)
Patch Set: Rebase 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) 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 r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // 68 bits 347 // 68 bits
348 } m_nonInheritedData; 348 } m_nonInheritedData;
349 349
350 // !END SYNC! 350 // !END SYNC!
351 351
352 void setBitDefaults() { 352 void setBitDefaults() {
353 ComputedStyleBase::setBitDefaults(); 353 ComputedStyleBase::setBitDefaults();
354 m_inheritedData.m_emptyCells = static_cast<unsigned>(initialEmptyCells()); 354 m_inheritedData.m_emptyCells = static_cast<unsigned>(initialEmptyCells());
355 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide()); 355 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide());
356 m_inheritedData.m_listStyleType = initialListStyleType(); 356 m_inheritedData.m_listStyleType = initialListStyleType();
357 m_inheritedData.m_listStylePosition = initialListStylePosition(); 357 m_inheritedData.m_listStylePosition =
358 static_cast<unsigned>(initialListStylePosition());
358 m_inheritedData.m_textAlign = initialTextAlign(); 359 m_inheritedData.m_textAlign = initialTextAlign();
359 m_inheritedData.m_textTransform = initialTextTransform(); 360 m_inheritedData.m_textTransform = initialTextTransform();
360 m_inheritedData.m_textUnderline = false; 361 m_inheritedData.m_textUnderline = false;
361 m_inheritedData.m_cursorStyle = initialCursor(); 362 m_inheritedData.m_cursorStyle = initialCursor();
362 m_inheritedData.m_direction = initialDirection(); 363 m_inheritedData.m_direction = initialDirection();
363 m_inheritedData.m_whiteSpace = initialWhiteSpace(); 364 m_inheritedData.m_whiteSpace = initialWhiteSpace();
364 m_inheritedData.m_borderCollapse = initialBorderCollapse(); 365 m_inheritedData.m_borderCollapse = initialBorderCollapse();
365 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); 366 m_inheritedData.m_rtlOrdering = initialRTLOrdering();
366 m_inheritedData.m_boxDirection = initialBoxDirection(); 367 m_inheritedData.m_boxDirection = initialBoxDirection();
367 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust(); 368 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust();
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 static EListStyleType initialListStyleType() { return Disc; } 2112 static EListStyleType initialListStyleType() { return Disc; }
2112 EListStyleType listStyleType() const { 2113 EListStyleType listStyleType() const {
2113 return static_cast<EListStyleType>(m_inheritedData.m_listStyleType); 2114 return static_cast<EListStyleType>(m_inheritedData.m_listStyleType);
2114 } 2115 }
2115 void setListStyleType(EListStyleType v) { 2116 void setListStyleType(EListStyleType v) {
2116 m_inheritedData.m_listStyleType = v; 2117 m_inheritedData.m_listStyleType = v;
2117 } 2118 }
2118 2119
2119 // list-style-position 2120 // list-style-position
2120 static EListStylePosition initialListStylePosition() { 2121 static EListStylePosition initialListStylePosition() {
2121 return ListStylePositionOutside; 2122 return EListStylePosition::Outside;
2122 } 2123 }
2123 EListStylePosition listStylePosition() const { 2124 EListStylePosition listStylePosition() const {
2124 return static_cast<EListStylePosition>(m_inheritedData.m_listStylePosition); 2125 return static_cast<EListStylePosition>(m_inheritedData.m_listStylePosition);
2125 } 2126 }
2126 void setListStylePosition(EListStylePosition v) { 2127 void setListStylePosition(EListStylePosition v) {
2127 m_inheritedData.m_listStylePosition = v; 2128 m_inheritedData.m_listStylePosition = static_cast<unsigned>(v);
2128 } 2129 }
2129 2130
2130 // list-style-image 2131 // list-style-image
2131 static StyleImage* initialListStyleImage() { return 0; } 2132 static StyleImage* initialListStyleImage() { return 0; }
2132 StyleImage* listStyleImage() const; 2133 StyleImage* listStyleImage() const;
2133 void setListStyleImage(StyleImage*); 2134 void setListStyleImage(StyleImage*);
2134 2135
2135 // orphans 2136 // orphans
2136 static short initialOrphans() { return 2; } 2137 static short initialOrphans() { return 2; }
2137 short orphans() const { return m_rareInheritedData->orphans; } 2138 short orphans() const { return m_rareInheritedData->orphans; }
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
4071 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 4072 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
4072 } 4073 }
4073 4074
4074 inline bool ComputedStyle::hasPseudoElementStyle() const { 4075 inline bool ComputedStyle::hasPseudoElementStyle() const {
4075 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 4076 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
4076 } 4077 }
4077 4078
4078 } // namespace blink 4079 } // namespace blink
4079 4080
4080 #endif // ComputedStyle_h 4081 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698