| 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 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 static short InitialOrphans() { return 2; } | 1639 static short InitialOrphans() { return 2; } |
| 1640 short Orphans() const { return rare_inherited_data_->orphans_; } | 1640 short Orphans() const { return rare_inherited_data_->orphans_; } |
| 1641 void SetOrphans(short o) { SET_VAR(rare_inherited_data_, orphans_, o); } | 1641 void SetOrphans(short o) { SET_VAR(rare_inherited_data_, orphans_, o); } |
| 1642 | 1642 |
| 1643 // widows | 1643 // widows |
| 1644 static short InitialWidows() { return 2; } | 1644 static short InitialWidows() { return 2; } |
| 1645 short Widows() const { return rare_inherited_data_->widows_; } | 1645 short Widows() const { return rare_inherited_data_->widows_; } |
| 1646 void SetWidows(short w) { SET_VAR(rare_inherited_data_, widows_, w); } | 1646 void SetWidows(short w) { SET_VAR(rare_inherited_data_, widows_, w); } |
| 1647 | 1647 |
| 1648 // overflow-wrap (aka word-wrap) | 1648 // overflow-wrap (aka word-wrap) |
| 1649 static EOverflowWrap InitialOverflowWrap() { return kNormalOverflowWrap; } | 1649 static EOverflowWrap InitialOverflowWrap() { return EOverflowWrap::kNormal; } |
| 1650 EOverflowWrap OverflowWrap() const { | 1650 EOverflowWrap OverflowWrap() const { |
| 1651 return static_cast<EOverflowWrap>(rare_inherited_data_->overflow_wrap_); | 1651 return static_cast<EOverflowWrap>(rare_inherited_data_->overflow_wrap_); |
| 1652 } | 1652 } |
| 1653 void SetOverflowWrap(EOverflowWrap b) { | 1653 void SetOverflowWrap(EOverflowWrap b) { |
| 1654 SET_VAR(rare_inherited_data_, overflow_wrap_, b); | 1654 SET_VAR(rare_inherited_data_, overflow_wrap_, static_cast<unsigned>(b)); |
| 1655 } | 1655 } |
| 1656 | 1656 |
| 1657 // quotes | 1657 // quotes |
| 1658 static QuotesData* InitialQuotes() { return 0; } | 1658 static QuotesData* InitialQuotes() { return 0; } |
| 1659 QuotesData* Quotes() const { return rare_inherited_data_->quotes_.Get(); } | 1659 QuotesData* Quotes() const { return rare_inherited_data_->quotes_.Get(); } |
| 1660 void SetQuotes(RefPtr<QuotesData>); | 1660 void SetQuotes(RefPtr<QuotesData>); |
| 1661 | 1661 |
| 1662 bool QuotesDataEquivalent(const ComputedStyle&) const; | 1662 bool QuotesDataEquivalent(const ComputedStyle&) const; |
| 1663 | 1663 |
| 1664 // line-height-step | 1664 // line-height-step |
| (...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3360 } | 3360 } |
| 3361 return false; | 3361 return false; |
| 3362 } | 3362 } |
| 3363 bool BreakOnlyAfterWhiteSpace() const { | 3363 bool BreakOnlyAfterWhiteSpace() const { |
| 3364 return WhiteSpace() == EWhiteSpace::kPreWrap || | 3364 return WhiteSpace() == EWhiteSpace::kPreWrap || |
| 3365 GetLineBreak() == LineBreak::kAfterWhiteSpace; | 3365 GetLineBreak() == LineBreak::kAfterWhiteSpace; |
| 3366 } | 3366 } |
| 3367 | 3367 |
| 3368 bool BreakWords() const { | 3368 bool BreakWords() const { |
| 3369 return (WordBreak() == kBreakWordBreak || | 3369 return (WordBreak() == kBreakWordBreak || |
| 3370 OverflowWrap() == kBreakOverflowWrap) && | 3370 OverflowWrap() == EOverflowWrap::kBreakWord) && |
| 3371 WhiteSpace() != EWhiteSpace::kPre && | 3371 WhiteSpace() != EWhiteSpace::kPre && |
| 3372 WhiteSpace() != EWhiteSpace::kNowrap; | 3372 WhiteSpace() != EWhiteSpace::kNowrap; |
| 3373 } | 3373 } |
| 3374 | 3374 |
| 3375 // Text direction utility functions. | 3375 // Text direction utility functions. |
| 3376 bool ShouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { | 3376 bool ShouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { |
| 3377 return !IsLeftToRightDirection() && IsHorizontalWritingMode(); | 3377 return !IsLeftToRightDirection() && IsHorizontalWritingMode(); |
| 3378 } | 3378 } |
| 3379 bool HasInlinePaginationAxis() const { | 3379 bool HasInlinePaginationAxis() const { |
| 3380 // If the pagination axis is parallel with the writing mode inline axis, | 3380 // If the pagination axis is parallel with the writing mode inline axis, |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3778 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3778 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
| 3779 } | 3779 } |
| 3780 | 3780 |
| 3781 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3781 inline bool ComputedStyle::HasPseudoElementStyle() const { |
| 3782 return PseudoBitsInternal() & kElementPseudoIdMask; | 3782 return PseudoBitsInternal() & kElementPseudoIdMask; |
| 3783 } | 3783 } |
| 3784 | 3784 |
| 3785 } // namespace blink | 3785 } // namespace blink |
| 3786 | 3786 |
| 3787 #endif // ComputedStyle_h | 3787 #endif // ComputedStyle_h |
| OLD | NEW |