| 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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 SetTextDecorationSkipInternal(v); | 1120 SetTextDecorationSkipInternal(v); |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 // touch-action | 1123 // touch-action |
| 1124 static TouchAction InitialTouchAction() { | 1124 static TouchAction InitialTouchAction() { |
| 1125 return TouchAction::kTouchActionAuto; | 1125 return TouchAction::kTouchActionAuto; |
| 1126 } | 1126 } |
| 1127 TouchAction GetTouchAction() const { | 1127 TouchAction GetTouchAction() const { |
| 1128 return static_cast<TouchAction>(rare_non_inherited_data_->touch_action_); | 1128 return static_cast<TouchAction>(rare_non_inherited_data_->touch_action_); |
| 1129 } | 1129 } |
| 1130 TouchAction GetEffectiveTouchAction() const { |
| 1131 return static_cast<TouchAction>( |
| 1132 rare_inherited_data_->effective_touch_action_); |
| 1133 } |
| 1130 void SetTouchAction(TouchAction t) { | 1134 void SetTouchAction(TouchAction t) { |
| 1131 SET_VAR(rare_non_inherited_data_, touch_action_, t); | 1135 SET_VAR(rare_non_inherited_data_, touch_action_, t); |
| 1132 } | 1136 } |
| 1137 void SetEffectiveTouchAction(TouchAction t) { |
| 1138 SET_VAR(rare_inherited_data_, effective_touch_action_, t); |
| 1139 } |
| 1133 | 1140 |
| 1134 // vertical-align | 1141 // vertical-align |
| 1135 static EVerticalAlign InitialVerticalAlign() { | 1142 static EVerticalAlign InitialVerticalAlign() { |
| 1136 return EVerticalAlign::kBaseline; | 1143 return EVerticalAlign::kBaseline; |
| 1137 } | 1144 } |
| 1138 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } | 1145 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } |
| 1139 const Length& GetVerticalAlignLength() const { | 1146 const Length& GetVerticalAlignLength() const { |
| 1140 return VerticalAlignLengthInternal(); | 1147 return VerticalAlignLengthInternal(); |
| 1141 } | 1148 } |
| 1142 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } | 1149 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } |
| (...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2387 // visible on only one overflow value. | 2394 // visible on only one overflow value. |
| 2388 bool IsOverflowVisible() const { | 2395 bool IsOverflowVisible() const { |
| 2389 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY()); | 2396 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY()); |
| 2390 return OverflowX() == EOverflow::kVisible; | 2397 return OverflowX() == EOverflow::kVisible; |
| 2391 } | 2398 } |
| 2392 bool IsOverflowPaged() const { | 2399 bool IsOverflowPaged() const { |
| 2393 return OverflowY() == EOverflow::kWebkitPagedX || | 2400 return OverflowY() == EOverflow::kWebkitPagedX || |
| 2394 OverflowY() == EOverflow::kWebkitPagedY; | 2401 OverflowY() == EOverflow::kWebkitPagedY; |
| 2395 } | 2402 } |
| 2396 | 2403 |
| 2404 bool IsDisplayTableRowOrColumnType() const { |
| 2405 return Display() == EDisplay::kTableRow || |
| 2406 Display() == EDisplay::kTableRowGroup || |
| 2407 Display() == EDisplay::kTableColumn || |
| 2408 Display() == EDisplay::kTableColumnGroup; |
| 2409 } |
| 2410 |
| 2411 bool HasAutoHorizontalScroll() const { |
| 2412 return OverflowX() == EOverflow::kAuto || |
| 2413 OverflowX() == EOverflow::kOverlay; |
| 2414 } |
| 2415 |
| 2416 bool HasAutoVerticalScroll() const { |
| 2417 return OverflowY() == EOverflow::kAuto || |
| 2418 OverflowY() == EOverflow::kWebkitPagedY || |
| 2419 OverflowY() == EOverflow::kOverlay; |
| 2420 } |
| 2421 |
| 2422 bool ScrollsOverflowX() const { |
| 2423 return OverflowX() == EOverflow::kScroll || HasAutoHorizontalScroll(); |
| 2424 } |
| 2425 |
| 2426 bool ScrollsOverflowY() const { |
| 2427 return OverflowY() == EOverflow::kScroll || HasAutoVerticalScroll(); |
| 2428 } |
| 2429 |
| 2430 bool ScrollsOverflow() const { |
| 2431 return ScrollsOverflowX() || ScrollsOverflowY(); |
| 2432 } |
| 2433 |
| 2397 // Visibility utility functions. | 2434 // Visibility utility functions. |
| 2398 bool VisibleToHitTesting() const { | 2435 bool VisibleToHitTesting() const { |
| 2399 return Visibility() == EVisibility::kVisible && | 2436 return Visibility() == EVisibility::kVisible && |
| 2400 PointerEvents() != EPointerEvents::kNone; | 2437 PointerEvents() != EPointerEvents::kNone; |
| 2401 } | 2438 } |
| 2402 | 2439 |
| 2403 // Animation utility functions. | 2440 // Animation utility functions. |
| 2404 bool ShouldCompositeForCurrentAnimations() const { | 2441 bool ShouldCompositeForCurrentAnimations() const { |
| 2405 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() || | 2442 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() || |
| 2406 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation(); | 2443 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation(); |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3006 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3043 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
| 3007 } | 3044 } |
| 3008 | 3045 |
| 3009 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3046 inline bool ComputedStyle::HasPseudoElementStyle() const { |
| 3010 return PseudoBitsInternal() & kElementPseudoIdMask; | 3047 return PseudoBitsInternal() & kElementPseudoIdMask; |
| 3011 } | 3048 } |
| 3012 | 3049 |
| 3013 } // namespace blink | 3050 } // namespace blink |
| 3014 | 3051 |
| 3015 #endif // ComputedStyle_h | 3052 #endif // ComputedStyle_h |
| OLD | NEW |