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

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

Issue 2367273003: Changed EEmptyCells 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached() 335 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached()
336 // 68 bits 336 // 68 bits
337 } m_nonInheritedData; 337 } m_nonInheritedData;
338 338
339 // !END SYNC! 339 // !END SYNC!
340 340
341 void setBitDefaults() 341 void setBitDefaults()
342 { 342 {
343 ComputedStyleBase::setBitDefaults(); 343 ComputedStyleBase::setBitDefaults();
344 m_inheritedData.m_emptyCells = initialEmptyCells(); 344 m_inheritedData.m_emptyCells = static_cast<unsigned>(initialEmptyCells() );
345 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide ()); 345 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide ());
346 m_inheritedData.m_listStyleType = initialListStyleType(); 346 m_inheritedData.m_listStyleType = initialListStyleType();
347 m_inheritedData.m_listStylePosition = initialListStylePosition(); 347 m_inheritedData.m_listStylePosition = initialListStylePosition();
348 m_inheritedData.m_textAlign = initialTextAlign(); 348 m_inheritedData.m_textAlign = initialTextAlign();
349 m_inheritedData.m_textTransform = initialTextTransform(); 349 m_inheritedData.m_textTransform = initialTextTransform();
350 m_inheritedData.m_textUnderline = false; 350 m_inheritedData.m_textUnderline = false;
351 m_inheritedData.m_cursorStyle = initialCursor(); 351 m_inheritedData.m_cursorStyle = initialCursor();
352 m_inheritedData.m_direction = initialDirection(); 352 m_inheritedData.m_direction = initialDirection();
353 m_inheritedData.m_whiteSpace = initialWhiteSpace(); 353 m_inheritedData.m_whiteSpace = initialWhiteSpace();
354 m_inheritedData.m_borderCollapse = initialBorderCollapse(); 354 m_inheritedData.m_borderCollapse = initialBorderCollapse();
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 static ECursor initialCursor() { return CURSOR_AUTO; } 1363 static ECursor initialCursor() { return CURSOR_AUTO; }
1364 ECursor cursor() const { return static_cast<ECursor>(m_inheritedData.m_curso rStyle); } 1364 ECursor cursor() const { return static_cast<ECursor>(m_inheritedData.m_curso rStyle); }
1365 void setCursor(ECursor c) { m_inheritedData.m_cursorStyle = c; } 1365 void setCursor(ECursor c) { m_inheritedData.m_cursorStyle = c; }
1366 1366
1367 // direction 1367 // direction
1368 static TextDirection initialDirection() { return LTR; } 1368 static TextDirection initialDirection() { return LTR; }
1369 TextDirection direction() const { return static_cast<TextDirection>(m_inheri tedData.m_direction); } 1369 TextDirection direction() const { return static_cast<TextDirection>(m_inheri tedData.m_direction); }
1370 void setDirection(TextDirection v) { m_inheritedData.m_direction = v; } 1370 void setDirection(TextDirection v) { m_inheritedData.m_direction = v; }
1371 1371
1372 // empty-cells 1372 // empty-cells
1373 static EEmptyCells initialEmptyCells() { return EmptyCellsShow; } 1373 static EEmptyCells initialEmptyCells() { return EEmptyCells::Show; }
1374 EEmptyCells emptyCells() const { return static_cast<EEmptyCells>(m_inherited Data.m_emptyCells); } 1374 EEmptyCells emptyCells() const { return static_cast<EEmptyCells>(m_inherited Data.m_emptyCells); }
1375 void setEmptyCells(EEmptyCells v) { m_inheritedData.m_emptyCells = v; } 1375 void setEmptyCells(EEmptyCells v) { m_inheritedData.m_emptyCells = static_ca st<unsigned>(v); }
1376 1376
1377 // color 1377 // color
1378 static Color initialColor() { return Color::black; } 1378 static Color initialColor() { return Color::black; }
1379 void setColor(const Color&); 1379 void setColor(const Color&);
1380 1380
1381 // hyphens 1381 // hyphens
1382 static Hyphens initialHyphens() { return HyphensManual; } 1382 static Hyphens initialHyphens() { return HyphensManual; }
1383 Hyphens getHyphens() const { return static_cast<Hyphens>(m_rareInheritedData ->hyphens); } 1383 Hyphens getHyphens() const { return static_cast<Hyphens>(m_rareInheritedData ->hyphens); }
1384 void setHyphens(Hyphens h) { SET_VAR(m_rareInheritedData, hyphens, h); } 1384 void setHyphens(Hyphens h) { SET_VAR(m_rareInheritedData, hyphens, h); }
1385 1385
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 } 2642 }
2643 2643
2644 inline bool ComputedStyle::hasPseudoElementStyle() const 2644 inline bool ComputedStyle::hasPseudoElementStyle() const
2645 { 2645 {
2646 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 2646 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
2647 } 2647 }
2648 2648
2649 } // namespace blink 2649 } // namespace blink
2650 2650
2651 #endif // ComputedStyle_h 2651 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698