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

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

Issue 2528573002: Changed EBorderCollapse to an enum class and renamed its members (Closed)
Patch Set: Rebase 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 ComputedStyleBase::setBitDefaults(); 361 ComputedStyleBase::setBitDefaults();
362 m_inheritedData.m_listStyleType = 362 m_inheritedData.m_listStyleType =
363 static_cast<unsigned>(initialListStyleType()); 363 static_cast<unsigned>(initialListStyleType());
364 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign()); 364 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign());
365 m_inheritedData.m_textTransform = 365 m_inheritedData.m_textTransform =
366 static_cast<unsigned>(initialTextTransform()); 366 static_cast<unsigned>(initialTextTransform());
367 m_inheritedData.m_hasSimpleUnderline = false; 367 m_inheritedData.m_hasSimpleUnderline = false;
368 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); 368 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor());
369 m_inheritedData.m_direction = initialDirection(); 369 m_inheritedData.m_direction = initialDirection();
370 m_inheritedData.m_whiteSpace = static_cast<unsigned>(initialWhiteSpace()); 370 m_inheritedData.m_whiteSpace = static_cast<unsigned>(initialWhiteSpace());
371 m_inheritedData.m_borderCollapse = initialBorderCollapse(); 371 m_inheritedData.m_borderCollapse =
372 static_cast<unsigned>(initialBorderCollapse());
372 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); 373 m_inheritedData.m_rtlOrdering = initialRTLOrdering();
373 m_inheritedData.m_boxDirection = 374 m_inheritedData.m_boxDirection =
374 static_cast<unsigned>(initialBoxDirection()); 375 static_cast<unsigned>(initialBoxDirection());
375 m_inheritedData.m_printColorAdjust = 376 m_inheritedData.m_printColorAdjust =
376 static_cast<unsigned>(initialPrintColorAdjust()); 377 static_cast<unsigned>(initialPrintColorAdjust());
377 m_inheritedData.m_pointerEvents = initialPointerEvents(); 378 m_inheritedData.m_pointerEvents = initialPointerEvents();
378 m_inheritedData.m_insideLink = NotInsideLink; 379 m_inheritedData.m_insideLink = NotInsideLink;
379 m_inheritedData.m_writingMode = initialWritingMode(); 380 m_inheritedData.m_writingMode = initialWritingMode();
380 381
381 m_nonInheritedData.m_effectiveDisplay = 382 m_nonInheritedData.m_effectiveDisplay =
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 return m_rareNonInheritedData->m_maskBoxImage.borderSlices(); 2048 return m_rareNonInheritedData->m_maskBoxImage.borderSlices();
2048 } 2049 }
2049 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) { 2050 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) {
2050 m_rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); 2051 m_rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices);
2051 } 2052 }
2052 2053
2053 // Inherited properties. 2054 // Inherited properties.
2054 2055
2055 // border-collapse 2056 // border-collapse
2056 static EBorderCollapse initialBorderCollapse() { 2057 static EBorderCollapse initialBorderCollapse() {
2057 return BorderCollapseSeparate; 2058 return EBorderCollapse::Separate;
2058 } 2059 }
2059 EBorderCollapse borderCollapse() const { 2060 EBorderCollapse borderCollapse() const {
2060 return static_cast<EBorderCollapse>(m_inheritedData.m_borderCollapse); 2061 return static_cast<EBorderCollapse>(m_inheritedData.m_borderCollapse);
2061 } 2062 }
2062 void setBorderCollapse(EBorderCollapse collapse) { 2063 void setBorderCollapse(EBorderCollapse collapse) {
2063 m_inheritedData.m_borderCollapse = collapse; 2064 m_inheritedData.m_borderCollapse = static_cast<unsigned>(collapse);
2064 } 2065 }
2065 2066
2066 // Border-spacing properties. 2067 // Border-spacing properties.
2067 // -webkit-border-horizontal-spacing 2068 // -webkit-border-horizontal-spacing
2068 static short initialHorizontalBorderSpacing() { return 0; } 2069 static short initialHorizontalBorderSpacing() { return 0; }
2069 short horizontalBorderSpacing() const; 2070 short horizontalBorderSpacing() const;
2070 void setHorizontalBorderSpacing(short); 2071 void setHorizontalBorderSpacing(short);
2071 2072
2072 // -webkit-border-vertical-spacing 2073 // -webkit-border-vertical-spacing
2073 static short initialVerticalBorderSpacing() { return 0; } 2074 static short initialVerticalBorderSpacing() { return 0; }
(...skipping 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after
4093 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 4094 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
4094 } 4095 }
4095 4096
4096 inline bool ComputedStyle::hasPseudoElementStyle() const { 4097 inline bool ComputedStyle::hasPseudoElementStyle() const {
4097 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 4098 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
4098 } 4099 }
4099 4100
4100 } // namespace blink 4101 } // namespace blink
4101 4102
4102 #endif // ComputedStyle_h 4103 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.h ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698