| 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 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 int outlineOffset() const { | 1458 int outlineOffset() const { |
| 1459 if (m_rareNonInheritedData->m_outline.style() == BorderStyleNone) | 1459 if (m_rareNonInheritedData->m_outline.style() == BorderStyleNone) |
| 1460 return 0; | 1460 return 0; |
| 1461 return m_rareNonInheritedData->m_outline.offset(); | 1461 return m_rareNonInheritedData->m_outline.offset(); |
| 1462 } | 1462 } |
| 1463 void setOutlineOffset(int v) { | 1463 void setOutlineOffset(int v) { |
| 1464 SET_VAR(m_rareNonInheritedData, m_outline.m_offset, v); | 1464 SET_VAR(m_rareNonInheritedData, m_outline.m_offset, v); |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 // overflow-x | 1467 // overflow-x |
| 1468 static EOverflow initialOverflowX() { return EOverflow::Visible; } | 1468 static EOverflow initialOverflowX() { return EOverflow::kVisible; } |
| 1469 EOverflow overflowX() const { | 1469 EOverflow overflowX() const { |
| 1470 return static_cast<EOverflow>(m_nonInheritedData.m_overflowX); | 1470 return static_cast<EOverflow>(m_nonInheritedData.m_overflowX); |
| 1471 } | 1471 } |
| 1472 void setOverflowX(EOverflow v) { | 1472 void setOverflowX(EOverflow v) { |
| 1473 m_nonInheritedData.m_overflowX = static_cast<unsigned>(v); | 1473 m_nonInheritedData.m_overflowX = static_cast<unsigned>(v); |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 // overflow-y | 1476 // overflow-y |
| 1477 static EOverflow initialOverflowY() { return EOverflow::Visible; } | 1477 static EOverflow initialOverflowY() { return EOverflow::kVisible; } |
| 1478 EOverflow overflowY() const { | 1478 EOverflow overflowY() const { |
| 1479 return static_cast<EOverflow>(m_nonInheritedData.m_overflowY); | 1479 return static_cast<EOverflow>(m_nonInheritedData.m_overflowY); |
| 1480 } | 1480 } |
| 1481 void setOverflowY(EOverflow v) { | 1481 void setOverflowY(EOverflow v) { |
| 1482 m_nonInheritedData.m_overflowY = static_cast<unsigned>(v); | 1482 m_nonInheritedData.m_overflowY = static_cast<unsigned>(v); |
| 1483 } | 1483 } |
| 1484 | 1484 |
| 1485 // Padding properties. | 1485 // Padding properties. |
| 1486 static Length initialPadding() { return Length(Fixed); } | 1486 static Length initialPadding() { return Length(Fixed); } |
| 1487 | 1487 |
| (...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3374 EOverflow overflowInlineDirection() const { | 3374 EOverflow overflowInlineDirection() const { |
| 3375 return isHorizontalWritingMode() ? overflowX() : overflowY(); | 3375 return isHorizontalWritingMode() ? overflowX() : overflowY(); |
| 3376 } | 3376 } |
| 3377 EOverflow overflowBlockDirection() const { | 3377 EOverflow overflowBlockDirection() const { |
| 3378 return isHorizontalWritingMode() ? overflowY() : overflowX(); | 3378 return isHorizontalWritingMode() ? overflowY() : overflowX(); |
| 3379 } | 3379 } |
| 3380 | 3380 |
| 3381 // It's sufficient to just check one direction, since it's illegal to have | 3381 // It's sufficient to just check one direction, since it's illegal to have |
| 3382 // visible on only one overflow value. | 3382 // visible on only one overflow value. |
| 3383 bool isOverflowVisible() const { | 3383 bool isOverflowVisible() const { |
| 3384 DCHECK(overflowX() != EOverflow::Visible || overflowX() == overflowY()); | 3384 DCHECK(overflowX() != EOverflow::kVisible || overflowX() == overflowY()); |
| 3385 return overflowX() == EOverflow::Visible; | 3385 return overflowX() == EOverflow::kVisible; |
| 3386 } | 3386 } |
| 3387 bool isOverflowPaged() const { | 3387 bool isOverflowPaged() const { |
| 3388 return overflowY() == EOverflow::PagedX || overflowY() == EOverflow::PagedY; | 3388 return overflowY() == EOverflow::kWebkitPagedX || |
| 3389 overflowY() == EOverflow::kWebkitPagedY; |
| 3389 } | 3390 } |
| 3390 | 3391 |
| 3391 // Visibility utility functions. | 3392 // Visibility utility functions. |
| 3392 bool visibleToHitTesting() const { | 3393 bool visibleToHitTesting() const { |
| 3393 return visibility() == EVisibility::kVisible && | 3394 return visibility() == EVisibility::kVisible && |
| 3394 pointerEvents() != EPointerEvents::kNone; | 3395 pointerEvents() != EPointerEvents::kNone; |
| 3395 } | 3396 } |
| 3396 | 3397 |
| 3397 // Animation utility functions. | 3398 // Animation utility functions. |
| 3398 bool shouldCompositeForCurrentAnimations() const { | 3399 bool shouldCompositeForCurrentAnimations() const { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3577 } | 3578 } |
| 3578 | 3579 |
| 3579 // Text direction utility functions. | 3580 // Text direction utility functions. |
| 3580 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { | 3581 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { |
| 3581 return !isLeftToRightDirection() && isHorizontalWritingMode(); | 3582 return !isLeftToRightDirection() && isHorizontalWritingMode(); |
| 3582 } | 3583 } |
| 3583 bool hasInlinePaginationAxis() const { | 3584 bool hasInlinePaginationAxis() const { |
| 3584 // If the pagination axis is parallel with the writing mode inline axis, | 3585 // If the pagination axis is parallel with the writing mode inline axis, |
| 3585 // columns may be laid out along the inline axis, just like for regular | 3586 // columns may be laid out along the inline axis, just like for regular |
| 3586 // multicol. Otherwise, we need to lay out along the block axis. | 3587 // multicol. Otherwise, we need to lay out along the block axis. |
| 3587 if (isOverflowPaged()) | 3588 if (isOverflowPaged()) { |
| 3588 return (overflowY() == EOverflow::PagedX) == isHorizontalWritingMode(); | 3589 return (overflowY() == EOverflow::kWebkitPagedX) == |
| 3590 isHorizontalWritingMode(); |
| 3591 } |
| 3589 return false; | 3592 return false; |
| 3590 } | 3593 } |
| 3591 | 3594 |
| 3592 // Border utility functions. | 3595 // Border utility functions. |
| 3593 bool borderObscuresBackground() const; | 3596 bool borderObscuresBackground() const; |
| 3594 void getBorderEdgeInfo(BorderEdge edges[], | 3597 void getBorderEdgeInfo(BorderEdge edges[], |
| 3595 bool includeLogicalLeftEdge = true, | 3598 bool includeLogicalLeftEdge = true, |
| 3596 bool includeLogicalRightEdge = true) const; | 3599 bool includeLogicalRightEdge = true) const; |
| 3597 | 3600 |
| 3598 bool hasBoxDecorations() const { | 3601 bool hasBoxDecorations() const { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3922 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 3925 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 3923 } | 3926 } |
| 3924 | 3927 |
| 3925 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3928 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 3926 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 3929 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 3927 } | 3930 } |
| 3928 | 3931 |
| 3929 } // namespace blink | 3932 } // namespace blink |
| 3930 | 3933 |
| 3931 #endif // ComputedStyle_h | 3934 #endif // ComputedStyle_h |
| OLD | NEW |