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

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

Issue 2653123002: Changed EClear to an enum class and renamed its members (Closed)
Patch Set: Rebase 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 m_nonInheritedData.m_effectiveDisplay = 307 m_nonInheritedData.m_effectiveDisplay =
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 = static_cast<unsigned>(initialClear());
317 m_nonInheritedData.m_position = initialPosition(); 317 m_nonInheritedData.m_position = initialPosition();
318 m_nonInheritedData.m_tableLayout = 318 m_nonInheritedData.m_tableLayout =
319 static_cast<unsigned>(initialTableLayout()); 319 static_cast<unsigned>(initialTableLayout());
320 m_nonInheritedData.m_breakBefore = initialBreakBefore(); 320 m_nonInheritedData.m_breakBefore = initialBreakBefore();
321 m_nonInheritedData.m_breakAfter = initialBreakAfter(); 321 m_nonInheritedData.m_breakAfter = initialBreakAfter();
322 m_nonInheritedData.m_breakInside = initialBreakInside(); 322 m_nonInheritedData.m_breakInside = initialBreakInside();
323 m_nonInheritedData.m_styleType = PseudoIdNone; 323 m_nonInheritedData.m_styleType = PseudoIdNone;
324 m_nonInheritedData.m_pseudoBits = 0; 324 m_nonInheritedData.m_pseudoBits = 0;
325 m_nonInheritedData.m_explicitInheritance = false; 325 m_nonInheritedData.m_explicitInheritance = false;
326 m_nonInheritedData.m_variableReference = false; 326 m_nonInheritedData.m_variableReference = false;
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 void setBoxShadow(PassRefPtr<ShadowList>); 760 void setBoxShadow(PassRefPtr<ShadowList>);
761 761
762 // box-sizing (aka -webkit-box-sizing) 762 // box-sizing (aka -webkit-box-sizing)
763 static EBoxSizing initialBoxSizing() { return EBoxSizing::kContentBox; } 763 static EBoxSizing initialBoxSizing() { return EBoxSizing::kContentBox; }
764 EBoxSizing boxSizing() const { return m_box->boxSizing(); } 764 EBoxSizing boxSizing() const { return m_box->boxSizing(); }
765 void setBoxSizing(EBoxSizing s) { 765 void setBoxSizing(EBoxSizing s) {
766 SET_VAR(m_box, m_boxSizing, static_cast<unsigned>(s)); 766 SET_VAR(m_box, m_boxSizing, static_cast<unsigned>(s));
767 } 767 }
768 768
769 // clear 769 // clear
770 static EClear initialClear() { return ClearNone; } 770 static EClear initialClear() { return EClear::kNone; }
771 EClear clear() const { 771 EClear clear() const {
772 return static_cast<EClear>(m_nonInheritedData.m_clear); 772 return static_cast<EClear>(m_nonInheritedData.m_clear);
773 } 773 }
774 void setClear(EClear v) { m_nonInheritedData.m_clear = v; } 774 void setClear(EClear v) {
775 m_nonInheritedData.m_clear = static_cast<unsigned>(v);
776 }
775 777
776 // Page break properties. 778 // Page break properties.
777 // break-after (shorthand for page-break-after and -webkit-column-break-after) 779 // break-after (shorthand for page-break-after and -webkit-column-break-after)
778 static EBreak initialBreakAfter() { return BreakAuto; } 780 static EBreak initialBreakAfter() { return BreakAuto; }
779 EBreak breakAfter() const { 781 EBreak breakAfter() const {
780 return static_cast<EBreak>(m_nonInheritedData.m_breakAfter); 782 return static_cast<EBreak>(m_nonInheritedData.m_breakAfter);
781 } 783 }
782 void setBreakAfter(EBreak b) { 784 void setBreakAfter(EBreak b) {
783 DCHECK_LE(b, BreakValueLastAllowedForBreakAfterAndBefore); 785 DCHECK_LE(b, BreakValueLastAllowedForBreakAfterAndBefore);
784 m_nonInheritedData.m_breakAfter = b; 786 m_nonInheritedData.m_breakAfter = b;
(...skipping 3162 matching lines...) Expand 10 before | Expand all | Expand 10 after
3947 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 3949 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
3948 } 3950 }
3949 3951
3950 inline bool ComputedStyle::hasPseudoElementStyle() const { 3952 inline bool ComputedStyle::hasPseudoElementStyle() const {
3951 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 3953 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
3952 } 3954 }
3953 3955
3954 } // namespace blink 3956 } // namespace blink
3955 3957
3956 #endif // ComputedStyle_h 3958 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698