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

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

Issue 2666483002: Changed ETableLayout to an enum class and renamed its members (Closed)
Patch Set: Use CSS keywords Created 3 years, 10 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 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 m_nonInheritedData.m_originalDisplay = 308 m_nonInheritedData.m_originalDisplay =
309 static_cast<unsigned>(initialDisplay()); 309 static_cast<unsigned>(initialDisplay());
310 m_nonInheritedData.m_overflowAnchor = 310 m_nonInheritedData.m_overflowAnchor =
311 static_cast<unsigned>(initialOverflowAnchor()); 311 static_cast<unsigned>(initialOverflowAnchor());
312 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX()); 312 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX());
313 m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY()); 313 m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY());
314 m_nonInheritedData.m_verticalAlign = 314 m_nonInheritedData.m_verticalAlign =
315 static_cast<unsigned>(initialVerticalAlign()); 315 static_cast<unsigned>(initialVerticalAlign());
316 m_nonInheritedData.m_clear = initialClear(); 316 m_nonInheritedData.m_clear = initialClear();
317 m_nonInheritedData.m_position = initialPosition(); 317 m_nonInheritedData.m_position = initialPosition();
318 m_nonInheritedData.m_tableLayout = initialTableLayout(); 318 m_nonInheritedData.m_tableLayout =
319 static_cast<unsigned>(initialTableLayout());
319 m_nonInheritedData.m_breakBefore = initialBreakBefore(); 320 m_nonInheritedData.m_breakBefore = initialBreakBefore();
320 m_nonInheritedData.m_breakAfter = initialBreakAfter(); 321 m_nonInheritedData.m_breakAfter = initialBreakAfter();
321 m_nonInheritedData.m_breakInside = initialBreakInside(); 322 m_nonInheritedData.m_breakInside = initialBreakInside();
322 m_nonInheritedData.m_styleType = PseudoIdNone; 323 m_nonInheritedData.m_styleType = PseudoIdNone;
323 m_nonInheritedData.m_pseudoBits = 0; 324 m_nonInheritedData.m_pseudoBits = 0;
324 m_nonInheritedData.m_explicitInheritance = false; 325 m_nonInheritedData.m_explicitInheritance = false;
325 m_nonInheritedData.m_variableReference = false; 326 m_nonInheritedData.m_variableReference = false;
326 m_nonInheritedData.m_unique = false; 327 m_nonInheritedData.m_unique = false;
327 m_nonInheritedData.m_emptyState = false; 328 m_nonInheritedData.m_emptyState = false;
328 m_nonInheritedData.m_hasViewportUnits = false; 329 m_nonInheritedData.m_hasViewportUnits = false;
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 PageSizeType getPageSizeType() const { 1773 PageSizeType getPageSizeType() const {
1773 return static_cast<PageSizeType>(m_rareNonInheritedData->m_pageSizeType); 1774 return static_cast<PageSizeType>(m_rareNonInheritedData->m_pageSizeType);
1774 } 1775 }
1775 void setPageSize(const FloatSize& s) { 1776 void setPageSize(const FloatSize& s) {
1776 SET_VAR(m_rareNonInheritedData, m_pageSize, s); 1777 SET_VAR(m_rareNonInheritedData, m_pageSize, s);
1777 } 1778 }
1778 void setPageSizeType(PageSizeType t) { 1779 void setPageSizeType(PageSizeType t) {
1779 SET_VAR(m_rareNonInheritedData, m_pageSizeType, t); 1780 SET_VAR(m_rareNonInheritedData, m_pageSizeType, t);
1780 } 1781 }
1781 // table-layout 1782 // table-layout
1782 static ETableLayout initialTableLayout() { return TableLayoutAuto; } 1783 static ETableLayout initialTableLayout() { return ETableLayout::kAuto; }
1783 ETableLayout tableLayout() const { 1784 ETableLayout tableLayout() const {
1784 return static_cast<ETableLayout>(m_nonInheritedData.m_tableLayout); 1785 return static_cast<ETableLayout>(m_nonInheritedData.m_tableLayout);
1785 } 1786 }
1786 void setTableLayout(ETableLayout v) { m_nonInheritedData.m_tableLayout = v; } 1787 void setTableLayout(ETableLayout v) {
1788 m_nonInheritedData.m_tableLayout = static_cast<unsigned>(v);
1789 }
1787 1790
1788 // Text decoration properties. 1791 // Text decoration properties.
1789 // text-decoration-line 1792 // text-decoration-line
1790 static TextDecoration initialTextDecoration() { return TextDecorationNone; } 1793 static TextDecoration initialTextDecoration() { return TextDecorationNone; }
1791 TextDecoration getTextDecoration() const { 1794 TextDecoration getTextDecoration() const {
1792 return static_cast<TextDecoration>(m_visual->textDecoration); 1795 return static_cast<TextDecoration>(m_visual->textDecoration);
1793 } 1796 }
1794 void setTextDecoration(TextDecoration v) { 1797 void setTextDecoration(TextDecoration v) {
1795 SET_VAR(m_visual, textDecoration, v); 1798 SET_VAR(m_visual, textDecoration, v);
1796 } 1799 }
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
3426 isRunningTransformAnimationOnCompositor() || 3429 isRunningTransformAnimationOnCompositor() ||
3427 isRunningFilterAnimationOnCompositor() || 3430 isRunningFilterAnimationOnCompositor() ||
3428 isRunningBackdropFilterAnimationOnCompositor(); 3431 isRunningBackdropFilterAnimationOnCompositor();
3429 } 3432 }
3430 3433
3431 // Opacity utility functions. 3434 // Opacity utility functions.
3432 bool hasOpacity() const { return opacity() < 1.0f; } 3435 bool hasOpacity() const { return opacity() < 1.0f; }
3433 3436
3434 // Table layout utility functions. 3437 // Table layout utility functions.
3435 bool isFixedTableLayout() const { 3438 bool isFixedTableLayout() const {
3436 return tableLayout() == TableLayoutFixed && !logicalWidth().isAuto(); 3439 return tableLayout() == ETableLayout::kFixed && !logicalWidth().isAuto();
3437 } 3440 }
3438 3441
3439 // Filter/transform utility functions. 3442 // Filter/transform utility functions.
3440 bool has3DTransform() const { 3443 bool has3DTransform() const {
3441 return m_rareNonInheritedData->m_transform->has3DTransform(); 3444 return m_rareNonInheritedData->m_transform->has3DTransform();
3442 } 3445 }
3443 bool hasTransform() const { 3446 bool hasTransform() const {
3444 return hasTransformOperations() || hasOffset() || 3447 return hasTransformOperations() || hasOffset() ||
3445 hasCurrentTransformAnimation() || translate() || rotate() || scale(); 3448 hasCurrentTransformAnimation() || translate() || rotate() || scale();
3446 } 3449 }
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
3944 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 3947 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
3945 } 3948 }
3946 3949
3947 inline bool ComputedStyle::hasPseudoElementStyle() const { 3950 inline bool ComputedStyle::hasPseudoElementStyle() const {
3948 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 3951 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
3949 } 3952 }
3950 3953
3951 } // namespace blink 3954 } // namespace blink
3952 3955
3953 #endif // ComputedStyle_h 3956 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698