Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2916563003: Compute effective touch action in StyleAdjuster. (Closed)
Patch Set: Do not traverse across frames Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 void SetTextDecorationSkip(TextDecorationSkip v) { 883 void SetTextDecorationSkip(TextDecorationSkip v) {
884 SetTextDecorationSkipInternal(v); 884 SetTextDecorationSkipInternal(v);
885 } 885 }
886 886
887 // touch-action 887 // touch-action
888 static TouchAction InitialTouchAction() { 888 static TouchAction InitialTouchAction() {
889 return TouchAction::kTouchActionAuto; 889 return TouchAction::kTouchActionAuto;
890 } 890 }
891 TouchAction GetTouchAction() const { return TouchActionInternal(); } 891 TouchAction GetTouchAction() const { return TouchActionInternal(); }
892 void SetTouchAction(TouchAction t) { return SetTouchActionInternal(t); } 892 void SetTouchAction(TouchAction t) { return SetTouchActionInternal(t); }
893 TouchAction GetEffectiveTouchAction() const {
894 return EffectiveTouchActionInternal();
895 }
896 void SetEffectiveTouchAction(TouchAction t) {
897 return SetEffectiveTouchActionInternal(t);
898 }
893 899
894 // vertical-align 900 // vertical-align
895 static EVerticalAlign InitialVerticalAlign() { 901 static EVerticalAlign InitialVerticalAlign() {
896 return EVerticalAlign::kBaseline; 902 return EVerticalAlign::kBaseline;
897 } 903 }
898 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } 904 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); }
899 const Length& GetVerticalAlignLength() const { 905 const Length& GetVerticalAlignLength() const {
900 return VerticalAlignLengthInternal(); 906 return VerticalAlignLengthInternal();
901 } 907 }
902 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } 908 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); }
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 // visible on only one overflow value. 2060 // visible on only one overflow value.
2055 bool IsOverflowVisible() const { 2061 bool IsOverflowVisible() const {
2056 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY()); 2062 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY());
2057 return OverflowX() == EOverflow::kVisible; 2063 return OverflowX() == EOverflow::kVisible;
2058 } 2064 }
2059 bool IsOverflowPaged() const { 2065 bool IsOverflowPaged() const {
2060 return OverflowY() == EOverflow::kWebkitPagedX || 2066 return OverflowY() == EOverflow::kWebkitPagedX ||
2061 OverflowY() == EOverflow::kWebkitPagedY; 2067 OverflowY() == EOverflow::kWebkitPagedY;
2062 } 2068 }
2063 2069
2070 bool IsDisplayTableRowOrColumnType() const {
2071 return Display() == EDisplay::kTableRow ||
2072 Display() == EDisplay::kTableRowGroup ||
2073 Display() == EDisplay::kTableColumn ||
2074 Display() == EDisplay::kTableColumnGroup;
2075 }
2076
2077 bool HasAutoHorizontalScroll() const {
2078 return OverflowX() == EOverflow::kAuto ||
2079 OverflowX() == EOverflow::kOverlay;
2080 }
2081
2082 bool HasAutoVerticalScroll() const {
2083 return OverflowY() == EOverflow::kAuto ||
2084 OverflowY() == EOverflow::kWebkitPagedY ||
2085 OverflowY() == EOverflow::kOverlay;
2086 }
2087
2088 bool ScrollsOverflowX() const {
2089 return OverflowX() == EOverflow::kScroll || HasAutoHorizontalScroll();
2090 }
2091
2092 bool ScrollsOverflowY() const {
2093 return OverflowY() == EOverflow::kScroll || HasAutoVerticalScroll();
2094 }
2095
2096 bool ScrollsOverflow() const {
2097 return ScrollsOverflowX() || ScrollsOverflowY();
2098 }
2099
2064 // Visibility utility functions. 2100 // Visibility utility functions.
2065 bool VisibleToHitTesting() const { 2101 bool VisibleToHitTesting() const {
2066 return Visibility() == EVisibility::kVisible && 2102 return Visibility() == EVisibility::kVisible &&
2067 PointerEvents() != EPointerEvents::kNone; 2103 PointerEvents() != EPointerEvents::kNone;
2068 } 2104 }
2069 2105
2070 // Animation utility functions. 2106 // Animation utility functions.
2071 bool ShouldCompositeForCurrentAnimations() const { 2107 bool ShouldCompositeForCurrentAnimations() const {
2072 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() || 2108 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() ||
2073 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation(); 2109 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation();
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 2744 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
2709 } 2745 }
2710 2746
2711 inline bool ComputedStyle::HasPseudoElementStyle() const { 2747 inline bool ComputedStyle::HasPseudoElementStyle() const {
2712 return PseudoBitsInternal() & kElementPseudoIdMask; 2748 return PseudoBitsInternal() & kElementPseudoIdMask;
2713 } 2749 }
2714 2750
2715 } // namespace blink 2751 } // namespace blink
2716 2752
2717 #endif // ComputedStyle_h 2753 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698