| OLD | NEW |
| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 static_cast<unsigned>(EInsideLink::kNotInsideLink); | 303 static_cast<unsigned>(EInsideLink::kNotInsideLink); |
| 304 | 304 |
| 305 m_nonInheritedData.m_effectiveDisplay = | 305 m_nonInheritedData.m_effectiveDisplay = |
| 306 m_nonInheritedData.m_originalDisplay = | 306 m_nonInheritedData.m_originalDisplay = |
| 307 static_cast<unsigned>(initialDisplay()); | 307 static_cast<unsigned>(initialDisplay()); |
| 308 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX()); | 308 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX()); |
| 309 m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY()); | 309 m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY()); |
| 310 m_nonInheritedData.m_verticalAlign = | 310 m_nonInheritedData.m_verticalAlign = |
| 311 static_cast<unsigned>(initialVerticalAlign()); | 311 static_cast<unsigned>(initialVerticalAlign()); |
| 312 m_nonInheritedData.m_position = initialPosition(); | 312 m_nonInheritedData.m_position = initialPosition(); |
| 313 m_nonInheritedData.m_breakBefore = initialBreakBefore(); | 313 m_nonInheritedData.m_breakBefore = |
| 314 m_nonInheritedData.m_breakAfter = initialBreakAfter(); | 314 static_cast<unsigned>(initialBreakBefore()); |
| 315 m_nonInheritedData.m_breakInside = initialBreakInside(); | 315 m_nonInheritedData.m_breakAfter = |
| 316 static_cast<unsigned>(initialBreakAfter()); |
| 317 m_nonInheritedData.m_breakInside = |
| 318 static_cast<unsigned>(initialBreakInside()); |
| 316 m_nonInheritedData.m_styleType = PseudoIdNone; | 319 m_nonInheritedData.m_styleType = PseudoIdNone; |
| 317 m_nonInheritedData.m_pseudoBits = 0; | 320 m_nonInheritedData.m_pseudoBits = 0; |
| 318 m_nonInheritedData.m_explicitInheritance = false; | 321 m_nonInheritedData.m_explicitInheritance = false; |
| 319 m_nonInheritedData.m_variableReference = false; | 322 m_nonInheritedData.m_variableReference = false; |
| 320 m_nonInheritedData.m_unique = false; | 323 m_nonInheritedData.m_unique = false; |
| 321 m_nonInheritedData.m_emptyState = false; | 324 m_nonInheritedData.m_emptyState = false; |
| 322 m_nonInheritedData.m_hasViewportUnits = false; | 325 m_nonInheritedData.m_hasViewportUnits = false; |
| 323 m_nonInheritedData.m_affectedByFocus = false; | 326 m_nonInheritedData.m_affectedByFocus = false; |
| 324 m_nonInheritedData.m_affectedByHover = false; | 327 m_nonInheritedData.m_affectedByHover = false; |
| 325 m_nonInheritedData.m_affectedByActive = false; | 328 m_nonInheritedData.m_affectedByActive = false; |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 | 757 |
| 755 // box-sizing (aka -webkit-box-sizing) | 758 // box-sizing (aka -webkit-box-sizing) |
| 756 static EBoxSizing initialBoxSizing() { return EBoxSizing::kContentBox; } | 759 static EBoxSizing initialBoxSizing() { return EBoxSizing::kContentBox; } |
| 757 EBoxSizing boxSizing() const { return m_box->boxSizing(); } | 760 EBoxSizing boxSizing() const { return m_box->boxSizing(); } |
| 758 void setBoxSizing(EBoxSizing s) { | 761 void setBoxSizing(EBoxSizing s) { |
| 759 SET_VAR(m_box, m_boxSizing, static_cast<unsigned>(s)); | 762 SET_VAR(m_box, m_boxSizing, static_cast<unsigned>(s)); |
| 760 } | 763 } |
| 761 | 764 |
| 762 // Page break properties. | 765 // Page break properties. |
| 763 // break-after (shorthand for page-break-after and -webkit-column-break-after) | 766 // break-after (shorthand for page-break-after and -webkit-column-break-after) |
| 764 static EBreak initialBreakAfter() { return BreakAuto; } | 767 static EBreakBetween initialBreakAfter() { return EBreakBetween::kAuto; } |
| 765 EBreak breakAfter() const { | 768 EBreakBetween breakAfter() const { |
| 766 return static_cast<EBreak>(m_nonInheritedData.m_breakAfter); | 769 return static_cast<EBreakBetween>(m_nonInheritedData.m_breakAfter); |
| 767 } | 770 } |
| 768 void setBreakAfter(EBreak b) { | 771 void setBreakAfter(EBreakBetween b) { |
| 769 m_nonInheritedData.m_breakAfter = b; | 772 m_nonInheritedData.m_breakAfter = static_cast<unsigned>(b); |
| 770 } | 773 } |
| 771 | 774 |
| 772 // break-before (shorthand for page-break-before and | 775 // break-before (shorthand for page-break-before and |
| 773 // -webkit-column-break-before) | 776 // -webkit-column-break-before) |
| 774 static EBreak initialBreakBefore() { return BreakAuto; } | 777 static EBreakBetween initialBreakBefore() { return EBreakBetween::kAuto; } |
| 775 EBreak breakBefore() const { | 778 EBreakBetween breakBefore() const { |
| 776 return static_cast<EBreak>(m_nonInheritedData.m_breakBefore); | 779 return static_cast<EBreakBetween>(m_nonInheritedData.m_breakBefore); |
| 777 } | 780 } |
| 778 void setBreakBefore(EBreak b) { | 781 void setBreakBefore(EBreakBetween b) { |
| 779 m_nonInheritedData.m_breakBefore = b; | 782 m_nonInheritedData.m_breakBefore = static_cast<unsigned>(b); |
| 780 } | 783 } |
| 781 | 784 |
| 782 // break-inside (shorthand for page-break-inside and | 785 // break-inside (shorthand for page-break-inside and |
| 783 // -webkit-column-break-inside) | 786 // -webkit-column-break-inside) |
| 784 static EBreak initialBreakInside() { return BreakAuto; } | 787 static EBreakInside initialBreakInside() { return EBreakInside::kAuto; } |
| 785 EBreak breakInside() const { | 788 EBreakInside breakInside() const { |
| 786 return static_cast<EBreak>(m_nonInheritedData.m_breakInside); | 789 return static_cast<EBreakInside>(m_nonInheritedData.m_breakInside); |
| 787 } | 790 } |
| 788 void setBreakInside(EBreak b) { | 791 void setBreakInside(EBreakInside b) { |
| 789 DCHECK_LE(b, BreakValueLastAllowedForBreakInside); | 792 m_nonInheritedData.m_breakInside = static_cast<unsigned>(b); |
| 790 m_nonInheritedData.m_breakInside = b; | |
| 791 } | 793 } |
| 792 | 794 |
| 793 // clip | 795 // clip |
| 794 static LengthBox initialClip() { return LengthBox(); } | 796 static LengthBox initialClip() { return LengthBox(); } |
| 795 const LengthBox& clip() const { return m_visual->clip; } | 797 const LengthBox& clip() const { return m_visual->clip; } |
| 796 void setClip(const LengthBox& box) { | 798 void setClip(const LengthBox& box) { |
| 797 SET_VAR(m_visual, hasAutoClip, false); | 799 SET_VAR(m_visual, hasAutoClip, false); |
| 798 SET_VAR(m_visual, clip, box); | 800 SET_VAR(m_visual, clip, box); |
| 799 } | 801 } |
| 800 bool hasAutoClip() const { return m_visual->hasAutoClip; } | 802 bool hasAutoClip() const { return m_visual->hasAutoClip; } |
| (...skipping 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3914 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 3916 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 3915 } | 3917 } |
| 3916 | 3918 |
| 3917 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3919 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 3918 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 3920 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 3919 } | 3921 } |
| 3920 | 3922 |
| 3921 } // namespace blink | 3923 } // namespace blink |
| 3922 | 3924 |
| 3923 #endif // ComputedStyle_h | 3925 #endif // ComputedStyle_h |
| OLD | NEW |