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

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

Issue 2366263002: Changed ECaptionSide to an enum class and renamed its members to keywords (Closed)
Patch Set: 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached() 337 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached()
338 // 68 bits 338 // 68 bits
339 } m_nonInheritedData; 339 } m_nonInheritedData;
340 340
341 // !END SYNC! 341 // !END SYNC!
342 342
343 void setBitDefaults() 343 void setBitDefaults()
344 { 344 {
345 ComputedStyleBase::setBitDefaults(); 345 ComputedStyleBase::setBitDefaults();
346 m_inheritedData.m_emptyCells = initialEmptyCells(); 346 m_inheritedData.m_emptyCells = initialEmptyCells();
347 m_inheritedData.m_captionSide = initialCaptionSide(); 347 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide ());
348 m_inheritedData.m_listStyleType = initialListStyleType(); 348 m_inheritedData.m_listStyleType = initialListStyleType();
349 m_inheritedData.m_listStylePosition = initialListStylePosition(); 349 m_inheritedData.m_listStylePosition = initialListStylePosition();
350 m_inheritedData.m_textAlign = initialTextAlign(); 350 m_inheritedData.m_textAlign = initialTextAlign();
351 m_inheritedData.m_textTransform = initialTextTransform(); 351 m_inheritedData.m_textTransform = initialTextTransform();
352 m_inheritedData.m_textUnderline = false; 352 m_inheritedData.m_textUnderline = false;
353 m_inheritedData.m_cursorStyle = initialCursor(); 353 m_inheritedData.m_cursorStyle = initialCursor();
354 m_inheritedData.m_direction = initialDirection(); 354 m_inheritedData.m_direction = initialDirection();
355 m_inheritedData.m_whiteSpace = initialWhiteSpace(); 355 m_inheritedData.m_whiteSpace = initialWhiteSpace();
356 m_inheritedData.m_borderCollapse = initialBorderCollapse(); 356 m_inheritedData.m_borderCollapse = initialBorderCollapse();
357 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); 357 m_inheritedData.m_rtlOrdering = initialRTLOrdering();
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 static short initialHorizontalBorderSpacing() { return 0; } 1356 static short initialHorizontalBorderSpacing() { return 0; }
1357 short horizontalBorderSpacing() const; 1357 short horizontalBorderSpacing() const;
1358 void setHorizontalBorderSpacing(short); 1358 void setHorizontalBorderSpacing(short);
1359 1359
1360 // -webkit-border-vertical-spacing 1360 // -webkit-border-vertical-spacing
1361 static short initialVerticalBorderSpacing() { return 0; } 1361 static short initialVerticalBorderSpacing() { return 0; }
1362 short verticalBorderSpacing() const; 1362 short verticalBorderSpacing() const;
1363 void setVerticalBorderSpacing(short); 1363 void setVerticalBorderSpacing(short);
1364 1364
1365 // caption-side (aka -epub-caption-side) 1365 // caption-side (aka -epub-caption-side)
1366 static ECaptionSide initialCaptionSide() { return CaptionSideTop; } 1366 static ECaptionSide initialCaptionSide() { return ECaptionSide::Top; }
1367 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(m_inheri tedData.m_captionSide); } 1367 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(m_inheri tedData.m_captionSide); }
1368 void setCaptionSide(ECaptionSide v) { m_inheritedData.m_captionSide = v; } 1368 void setCaptionSide(ECaptionSide v) { m_inheritedData.m_captionSide = static _cast<unsigned>(v); }
1369 1369
1370 // cursor 1370 // cursor
1371 static ECursor initialCursor() { return CURSOR_AUTO; } 1371 static ECursor initialCursor() { return CURSOR_AUTO; }
1372 ECursor cursor() const { return static_cast<ECursor>(m_inheritedData.m_curso rStyle); } 1372 ECursor cursor() const { return static_cast<ECursor>(m_inheritedData.m_curso rStyle); }
1373 void setCursor(ECursor c) { m_inheritedData.m_cursorStyle = c; } 1373 void setCursor(ECursor c) { m_inheritedData.m_cursorStyle = c; }
1374 1374
1375 // direction 1375 // direction
1376 static TextDirection initialDirection() { return LTR; } 1376 static TextDirection initialDirection() { return LTR; }
1377 TextDirection direction() const { return static_cast<TextDirection>(m_inheri tedData.m_direction); } 1377 TextDirection direction() const { return static_cast<TextDirection>(m_inheri tedData.m_direction); }
1378 void setDirection(TextDirection v) { m_inheritedData.m_direction = v; } 1378 void setDirection(TextDirection v) { m_inheritedData.m_direction = v; }
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 } 2630 }
2631 2631
2632 inline bool ComputedStyle::hasPseudoElementStyle() const 2632 inline bool ComputedStyle::hasPseudoElementStyle() const
2633 { 2633 {
2634 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 2634 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
2635 } 2635 }
2636 2636
2637 } // namespace blink 2637 } // namespace blink
2638 2638
2639 #endif // ComputedStyle_h 2639 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.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