| 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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 SET_VAR(rare_non_inherited_data_, text_overflow_, overflow); | 1510 SET_VAR(rare_non_inherited_data_, text_overflow_, overflow); |
| 1511 } | 1511 } |
| 1512 | 1512 |
| 1513 // touch-action | 1513 // touch-action |
| 1514 static TouchAction InitialTouchAction() { | 1514 static TouchAction InitialTouchAction() { |
| 1515 return TouchAction::kTouchActionAuto; | 1515 return TouchAction::kTouchActionAuto; |
| 1516 } | 1516 } |
| 1517 TouchAction GetTouchAction() const { | 1517 TouchAction GetTouchAction() const { |
| 1518 return static_cast<TouchAction>(rare_non_inherited_data_->touch_action_); | 1518 return static_cast<TouchAction>(rare_non_inherited_data_->touch_action_); |
| 1519 } | 1519 } |
| 1520 TouchAction GetEffectiveTouchAction() const { |
| 1521 return static_cast<TouchAction>( |
| 1522 rare_inherited_data_->effective_touch_action_); |
| 1523 } |
| 1520 void SetTouchAction(TouchAction t) { | 1524 void SetTouchAction(TouchAction t) { |
| 1521 SET_VAR(rare_non_inherited_data_, touch_action_, t); | 1525 SET_VAR(rare_non_inherited_data_, touch_action_, t); |
| 1522 } | 1526 } |
| 1527 void SetEffectiveTouchAction(TouchAction t) { |
| 1528 SET_VAR(rare_inherited_data_, effective_touch_action_, t); |
| 1529 } |
| 1523 | 1530 |
| 1524 // vertical-align | 1531 // vertical-align |
| 1525 static EVerticalAlign InitialVerticalAlign() { | 1532 static EVerticalAlign InitialVerticalAlign() { |
| 1526 return EVerticalAlign::kBaseline; | 1533 return EVerticalAlign::kBaseline; |
| 1527 } | 1534 } |
| 1528 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } | 1535 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } |
| 1529 const Length& GetVerticalAlignLength() const { | 1536 const Length& GetVerticalAlignLength() const { |
| 1530 return VerticalAlignLengthInternal(); | 1537 return VerticalAlignLengthInternal(); |
| 1531 } | 1538 } |
| 1532 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } | 1539 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2997 // visible on only one overflow value. | 3004 // visible on only one overflow value. |
| 2998 bool IsOverflowVisible() const { | 3005 bool IsOverflowVisible() const { |
| 2999 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY()); | 3006 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY()); |
| 3000 return OverflowX() == EOverflow::kVisible; | 3007 return OverflowX() == EOverflow::kVisible; |
| 3001 } | 3008 } |
| 3002 bool IsOverflowPaged() const { | 3009 bool IsOverflowPaged() const { |
| 3003 return OverflowY() == EOverflow::kWebkitPagedX || | 3010 return OverflowY() == EOverflow::kWebkitPagedX || |
| 3004 OverflowY() == EOverflow::kWebkitPagedY; | 3011 OverflowY() == EOverflow::kWebkitPagedY; |
| 3005 } | 3012 } |
| 3006 | 3013 |
| 3014 bool IsDisplayTableRowOrColumnType() const { |
| 3015 return Display() == EDisplay::kTableRow || |
| 3016 Display() == EDisplay::kTableRowGroup || |
| 3017 Display() == EDisplay::kTableColumn || |
| 3018 Display() == EDisplay::kTableColumnGroup; |
| 3019 } |
| 3020 |
| 3021 bool HasAutoHorizontalScroll() const { |
| 3022 return OverflowX() == EOverflow::kAuto || |
| 3023 OverflowX() == EOverflow::kOverlay; |
| 3024 } |
| 3025 |
| 3026 bool HasAutoVerticalScroll() const { |
| 3027 return OverflowY() == EOverflow::kAuto || |
| 3028 OverflowY() == EOverflow::kWebkitPagedY || |
| 3029 OverflowY() == EOverflow::kOverlay; |
| 3030 } |
| 3031 |
| 3032 bool ScrollsOverflowX() const { |
| 3033 return OverflowX() == EOverflow::kScroll || HasAutoHorizontalScroll(); |
| 3034 } |
| 3035 |
| 3036 bool ScrollsOverflowY() const { |
| 3037 return OverflowY() == EOverflow::kScroll || HasAutoVerticalScroll(); |
| 3038 } |
| 3039 |
| 3040 bool ScrollsOverflow() const { |
| 3041 return ScrollsOverflowX() || ScrollsOverflowY(); |
| 3042 } |
| 3043 |
| 3007 // Visibility utility functions. | 3044 // Visibility utility functions. |
| 3008 bool VisibleToHitTesting() const { | 3045 bool VisibleToHitTesting() const { |
| 3009 return Visibility() == EVisibility::kVisible && | 3046 return Visibility() == EVisibility::kVisible && |
| 3010 PointerEvents() != EPointerEvents::kNone; | 3047 PointerEvents() != EPointerEvents::kNone; |
| 3011 } | 3048 } |
| 3012 | 3049 |
| 3013 // Animation utility functions. | 3050 // Animation utility functions. |
| 3014 bool ShouldCompositeForCurrentAnimations() const { | 3051 bool ShouldCompositeForCurrentAnimations() const { |
| 3015 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() || | 3052 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() || |
| 3016 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation(); | 3053 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation(); |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3617 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3654 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
| 3618 } | 3655 } |
| 3619 | 3656 |
| 3620 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3657 inline bool ComputedStyle::HasPseudoElementStyle() const { |
| 3621 return PseudoBitsInternal() & kElementPseudoIdMask; | 3658 return PseudoBitsInternal() & kElementPseudoIdMask; |
| 3622 } | 3659 } |
| 3623 | 3660 |
| 3624 } // namespace blink | 3661 } // namespace blink |
| 3625 | 3662 |
| 3626 #endif // ComputedStyle_h | 3663 #endif // ComputedStyle_h |
| OLD | NEW |