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

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

Issue 2507383002: Changed ETextAlign to an enum class and renamed its members to keywords (Closed)
Patch Set: Created 4 years, 1 month 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 // !END SYNC! 361 // !END SYNC!
362 362
363 void setBitDefaults() { 363 void setBitDefaults() {
364 ComputedStyleBase::setBitDefaults(); 364 ComputedStyleBase::setBitDefaults();
365 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide()); 365 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide());
366 m_inheritedData.m_listStyleType = 366 m_inheritedData.m_listStyleType =
367 static_cast<unsigned>(initialListStyleType()); 367 static_cast<unsigned>(initialListStyleType());
368 m_inheritedData.m_listStylePosition = 368 m_inheritedData.m_listStylePosition =
369 static_cast<unsigned>(initialListStylePosition()); 369 static_cast<unsigned>(initialListStylePosition());
370 m_inheritedData.m_textAlign = initialTextAlign(); 370 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign());
371 m_inheritedData.m_textTransform = initialTextTransform(); 371 m_inheritedData.m_textTransform = initialTextTransform();
372 m_inheritedData.m_textUnderline = false; 372 m_inheritedData.m_textUnderline = false;
373 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); 373 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor());
374 m_inheritedData.m_direction = initialDirection(); 374 m_inheritedData.m_direction = initialDirection();
375 m_inheritedData.m_whiteSpace = initialWhiteSpace(); 375 m_inheritedData.m_whiteSpace = initialWhiteSpace();
376 m_inheritedData.m_borderCollapse = initialBorderCollapse(); 376 m_inheritedData.m_borderCollapse = initialBorderCollapse();
377 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); 377 m_inheritedData.m_rtlOrdering = initialRTLOrdering();
378 m_inheritedData.m_boxDirection = initialBoxDirection(); 378 m_inheritedData.m_boxDirection = initialBoxDirection();
379 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust(); 379 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust();
380 m_inheritedData.m_pointerEvents = initialPointerEvents(); 380 m_inheritedData.m_pointerEvents = initialPointerEvents();
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 void setSpeak(ESpeak s) { SET_VAR(m_rareInheritedData, speak, s); } 2211 void setSpeak(ESpeak s) { SET_VAR(m_rareInheritedData, speak, s); }
2212 2212
2213 // tab-size 2213 // tab-size
2214 static TabSize initialTabSize() { return TabSize(8); } 2214 static TabSize initialTabSize() { return TabSize(8); }
2215 TabSize getTabSize() const { return m_rareInheritedData->m_tabSize; } 2215 TabSize getTabSize() const { return m_rareInheritedData->m_tabSize; }
2216 void setTabSize(TabSize size) { 2216 void setTabSize(TabSize size) {
2217 SET_VAR(m_rareInheritedData, m_tabSize, size); 2217 SET_VAR(m_rareInheritedData, m_tabSize, size);
2218 } 2218 }
2219 2219
2220 // text-align 2220 // text-align
2221 static ETextAlign initialTextAlign() { return TASTART; } 2221 static ETextAlign initialTextAlign() { return ETextAlign::Start; }
2222 ETextAlign textAlign() const { 2222 ETextAlign textAlign() const {
2223 return static_cast<ETextAlign>(m_inheritedData.m_textAlign); 2223 return static_cast<ETextAlign>(m_inheritedData.m_textAlign);
2224 } 2224 }
2225 void setTextAlign(ETextAlign v) { m_inheritedData.m_textAlign = v; } 2225 void setTextAlign(ETextAlign v) {
2226 m_inheritedData.m_textAlign = static_cast<unsigned>(v);
2227 }
2226 2228
2227 // text-align-last 2229 // text-align-last
2228 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } 2230 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; }
2229 TextAlignLast getTextAlignLast() const { 2231 TextAlignLast getTextAlignLast() const {
2230 return static_cast<TextAlignLast>(m_rareInheritedData->m_textAlignLast); 2232 return static_cast<TextAlignLast>(m_rareInheritedData->m_textAlignLast);
2231 } 2233 }
2232 void setTextAlignLast(TextAlignLast v) { 2234 void setTextAlignLast(TextAlignLast v) {
2233 SET_VAR(m_rareInheritedData, m_textAlignLast, v); 2235 SET_VAR(m_rareInheritedData, m_textAlignLast, v);
2234 } 2236 }
2235 2237
(...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after
4106 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 4108 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
4107 } 4109 }
4108 4110
4109 inline bool ComputedStyle::hasPseudoElementStyle() const { 4111 inline bool ComputedStyle::hasPseudoElementStyle() const {
4110 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 4112 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
4111 } 4113 }
4112 4114
4113 } // namespace blink 4115 } // namespace blink
4114 4116
4115 #endif // ComputedStyle_h 4117 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698