| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 m_inheritedData.m_pointerEvents = | 363 m_inheritedData.m_pointerEvents = |
| 364 static_cast<unsigned>(initialPointerEvents()); | 364 static_cast<unsigned>(initialPointerEvents()); |
| 365 m_inheritedData.m_insideLink = NotInsideLink; | 365 m_inheritedData.m_insideLink = NotInsideLink; |
| 366 m_inheritedData.m_writingMode = initialWritingMode(); | 366 m_inheritedData.m_writingMode = initialWritingMode(); |
| 367 | 367 |
| 368 m_nonInheritedData.m_effectiveDisplay = | 368 m_nonInheritedData.m_effectiveDisplay = |
| 369 m_nonInheritedData.m_originalDisplay = | 369 m_nonInheritedData.m_originalDisplay = |
| 370 static_cast<unsigned>(initialDisplay()); | 370 static_cast<unsigned>(initialDisplay()); |
| 371 m_nonInheritedData.m_overflowAnchor = | 371 m_nonInheritedData.m_overflowAnchor = |
| 372 static_cast<unsigned>(initialOverflowAnchor()); | 372 static_cast<unsigned>(initialOverflowAnchor()); |
| 373 m_nonInheritedData.m_overflowX = initialOverflowX(); | 373 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX()); |
| 374 m_nonInheritedData.m_overflowY = initialOverflowY(); | 374 m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY()); |
| 375 m_nonInheritedData.m_verticalAlign = initialVerticalAlign(); | 375 m_nonInheritedData.m_verticalAlign = initialVerticalAlign(); |
| 376 m_nonInheritedData.m_clear = initialClear(); | 376 m_nonInheritedData.m_clear = initialClear(); |
| 377 m_nonInheritedData.m_position = initialPosition(); | 377 m_nonInheritedData.m_position = initialPosition(); |
| 378 m_nonInheritedData.m_tableLayout = initialTableLayout(); | 378 m_nonInheritedData.m_tableLayout = initialTableLayout(); |
| 379 m_nonInheritedData.m_unicodeBidi = initialUnicodeBidi(); | 379 m_nonInheritedData.m_unicodeBidi = initialUnicodeBidi(); |
| 380 m_nonInheritedData.m_breakBefore = initialBreakBefore(); | 380 m_nonInheritedData.m_breakBefore = initialBreakBefore(); |
| 381 m_nonInheritedData.m_breakAfter = initialBreakAfter(); | 381 m_nonInheritedData.m_breakAfter = initialBreakAfter(); |
| 382 m_nonInheritedData.m_breakInside = initialBreakInside(); | 382 m_nonInheritedData.m_breakInside = initialBreakInside(); |
| 383 m_nonInheritedData.m_styleType = PseudoIdNone; | 383 m_nonInheritedData.m_styleType = PseudoIdNone; |
| 384 m_nonInheritedData.m_pseudoBits = 0; | 384 m_nonInheritedData.m_pseudoBits = 0; |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1544 return EOverflowAnchor::Auto; | 1544 return EOverflowAnchor::Auto; |
| 1545 } | 1545 } |
| 1546 EOverflowAnchor overflowAnchor() const { | 1546 EOverflowAnchor overflowAnchor() const { |
| 1547 return static_cast<EOverflowAnchor>(m_nonInheritedData.m_overflowAnchor); | 1547 return static_cast<EOverflowAnchor>(m_nonInheritedData.m_overflowAnchor); |
| 1548 } | 1548 } |
| 1549 void setOverflowAnchor(EOverflowAnchor v) { | 1549 void setOverflowAnchor(EOverflowAnchor v) { |
| 1550 m_nonInheritedData.m_overflowAnchor = static_cast<unsigned>(v); | 1550 m_nonInheritedData.m_overflowAnchor = static_cast<unsigned>(v); |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 // overflow-x | 1553 // overflow-x |
| 1554 static EOverflow initialOverflowX() { return OverflowVisible; } | 1554 static EOverflow initialOverflowX() { return EOverflow::Visible; } |
| 1555 EOverflow overflowX() const { | 1555 EOverflow overflowX() const { |
| 1556 return static_cast<EOverflow>(m_nonInheritedData.m_overflowX); | 1556 return static_cast<EOverflow>(m_nonInheritedData.m_overflowX); |
| 1557 } | 1557 } |
| 1558 void setOverflowX(EOverflow v) { m_nonInheritedData.m_overflowX = v; } | 1558 void setOverflowX(EOverflow v) { |
| 1559 m_nonInheritedData.m_overflowX = static_cast<unsigned>(v); |
| 1560 } |
| 1559 | 1561 |
| 1560 // overflow-y | 1562 // overflow-y |
| 1561 static EOverflow initialOverflowY() { return OverflowVisible; } | 1563 static EOverflow initialOverflowY() { return EOverflow::Visible; } |
| 1562 EOverflow overflowY() const { | 1564 EOverflow overflowY() const { |
| 1563 return static_cast<EOverflow>(m_nonInheritedData.m_overflowY); | 1565 return static_cast<EOverflow>(m_nonInheritedData.m_overflowY); |
| 1564 } | 1566 } |
| 1565 void setOverflowY(EOverflow v) { m_nonInheritedData.m_overflowY = v; } | 1567 void setOverflowY(EOverflow v) { |
| 1568 m_nonInheritedData.m_overflowY = static_cast<unsigned>(v); |
| 1569 } |
| 1566 | 1570 |
| 1567 // Padding properties. | 1571 // Padding properties. |
| 1568 static Length initialPadding() { return Length(Fixed); } | 1572 static Length initialPadding() { return Length(Fixed); } |
| 1569 | 1573 |
| 1570 // padding-bottom | 1574 // padding-bottom |
| 1571 const Length& paddingBottom() const { return m_surround->padding.bottom(); } | 1575 const Length& paddingBottom() const { return m_surround->padding.bottom(); } |
| 1572 void setPaddingBottom(const Length& v) { | 1576 void setPaddingBottom(const Length& v) { |
| 1573 SET_VAR(m_surround, padding.m_bottom, v); | 1577 SET_VAR(m_surround, padding.m_bottom, v); |
| 1574 } | 1578 } |
| 1575 | 1579 |
| (...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3519 EOverflow overflowInlineDirection() const { | 3523 EOverflow overflowInlineDirection() const { |
| 3520 return isHorizontalWritingMode() ? overflowX() : overflowY(); | 3524 return isHorizontalWritingMode() ? overflowX() : overflowY(); |
| 3521 } | 3525 } |
| 3522 EOverflow overflowBlockDirection() const { | 3526 EOverflow overflowBlockDirection() const { |
| 3523 return isHorizontalWritingMode() ? overflowY() : overflowX(); | 3527 return isHorizontalWritingMode() ? overflowY() : overflowX(); |
| 3524 } | 3528 } |
| 3525 | 3529 |
| 3526 // It's sufficient to just check one direction, since it's illegal to have | 3530 // It's sufficient to just check one direction, since it's illegal to have |
| 3527 // visible on only one overflow value. | 3531 // visible on only one overflow value. |
| 3528 bool isOverflowVisible() const { | 3532 bool isOverflowVisible() const { |
| 3529 DCHECK(overflowX() != OverflowVisible || overflowX() == overflowY()); | 3533 DCHECK(overflowX() != EOverflow::Visible || overflowX() == overflowY()); |
| 3530 return overflowX() == OverflowVisible; | 3534 return overflowX() == EOverflow::Visible; |
| 3531 } | 3535 } |
| 3532 bool isOverflowPaged() const { | 3536 bool isOverflowPaged() const { |
| 3533 return overflowY() == OverflowPagedX || overflowY() == OverflowPagedY; | 3537 return overflowY() == EOverflow::PagedX || overflowY() == EOverflow::PagedY; |
| 3534 } | 3538 } |
| 3535 | 3539 |
| 3536 // Visibility utility functions. | 3540 // Visibility utility functions. |
| 3537 bool visibleToHitTesting() const { | 3541 bool visibleToHitTesting() const { |
| 3538 return visibility() == EVisibility::Visible && | 3542 return visibility() == EVisibility::Visible && |
| 3539 pointerEvents() != EPointerEvents::None; | 3543 pointerEvents() != EPointerEvents::None; |
| 3540 } | 3544 } |
| 3541 | 3545 |
| 3542 // Animation utility functions. | 3546 // Animation utility functions. |
| 3543 bool shouldCompositeForCurrentAnimations() const { | 3547 bool shouldCompositeForCurrentAnimations() const { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3723 | 3727 |
| 3724 // Text direction utility functions. | 3728 // Text direction utility functions. |
| 3725 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { | 3729 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { |
| 3726 return !isLeftToRightDirection() && isHorizontalWritingMode(); | 3730 return !isLeftToRightDirection() && isHorizontalWritingMode(); |
| 3727 } | 3731 } |
| 3728 bool hasInlinePaginationAxis() const { | 3732 bool hasInlinePaginationAxis() const { |
| 3729 // If the pagination axis is parallel with the writing mode inline axis, | 3733 // If the pagination axis is parallel with the writing mode inline axis, |
| 3730 // columns may be laid out along the inline axis, just like for regular | 3734 // columns may be laid out along the inline axis, just like for regular |
| 3731 // multicol. Otherwise, we need to lay out along the block axis. | 3735 // multicol. Otherwise, we need to lay out along the block axis. |
| 3732 if (isOverflowPaged()) | 3736 if (isOverflowPaged()) |
| 3733 return (overflowY() == OverflowPagedX) == isHorizontalWritingMode(); | 3737 return (overflowY() == EOverflow::PagedX) == isHorizontalWritingMode(); |
| 3734 return false; | 3738 return false; |
| 3735 } | 3739 } |
| 3736 | 3740 |
| 3737 // Border utility functions. | 3741 // Border utility functions. |
| 3738 bool borderObscuresBackground() const; | 3742 bool borderObscuresBackground() const; |
| 3739 void getBorderEdgeInfo(BorderEdge edges[], | 3743 void getBorderEdgeInfo(BorderEdge edges[], |
| 3740 bool includeLogicalLeftEdge = true, | 3744 bool includeLogicalLeftEdge = true, |
| 3741 bool includeLogicalRightEdge = true) const; | 3745 bool includeLogicalRightEdge = true) const; |
| 3742 | 3746 |
| 3743 bool hasBoxDecorations() const { | 3747 bool hasBoxDecorations() const { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4067 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 4071 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 4068 } | 4072 } |
| 4069 | 4073 |
| 4070 inline bool ComputedStyle::hasPseudoElementStyle() const { | 4074 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 4071 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 4075 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 4072 } | 4076 } |
| 4073 | 4077 |
| 4074 } // namespace blink | 4078 } // namespace blink |
| 4075 | 4079 |
| 4076 #endif // ComputedStyle_h | 4080 #endif // ComputedStyle_h |
| OLD | NEW |