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

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

Issue 2916563003: Compute effective touch action in StyleAdjuster. (Closed)
Patch Set: add test case 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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 void SetTextDecorationSkip(TextDecorationSkip v) { 888 void SetTextDecorationSkip(TextDecorationSkip v) {
889 SetTextDecorationSkipInternal(v); 889 SetTextDecorationSkipInternal(v);
890 } 890 }
891 891
892 // touch-action 892 // touch-action
893 static TouchAction InitialTouchAction() { 893 static TouchAction InitialTouchAction() {
894 return TouchAction::kTouchActionAuto; 894 return TouchAction::kTouchActionAuto;
895 } 895 }
896 TouchAction GetTouchAction() const { return TouchActionInternal(); } 896 TouchAction GetTouchAction() const { return TouchActionInternal(); }
897 void SetTouchAction(TouchAction t) { return SetTouchActionInternal(t); } 897 void SetTouchAction(TouchAction t) { return SetTouchActionInternal(t); }
898 TouchAction GetEffectiveTouchAction() const {
899 return EffectiveTouchActionInternal();
900 }
901 void SetEffectiveTouchAction(TouchAction t) {
902 return SetEffectiveTouchActionInternal(t);
903 }
898 904
899 // vertical-align 905 // vertical-align
900 static EVerticalAlign InitialVerticalAlign() { 906 static EVerticalAlign InitialVerticalAlign() {
901 return EVerticalAlign::kBaseline; 907 return EVerticalAlign::kBaseline;
902 } 908 }
903 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } 909 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); }
904 const Length& GetVerticalAlignLength() const { 910 const Length& GetVerticalAlignLength() const {
905 return VerticalAlignLengthInternal(); 911 return VerticalAlignLengthInternal();
906 } 912 }
907 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } 913 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); }
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 // visible on only one overflow value. 2046 // visible on only one overflow value.
2041 bool IsOverflowVisible() const { 2047 bool IsOverflowVisible() const {
2042 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY()); 2048 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY());
2043 return OverflowX() == EOverflow::kVisible; 2049 return OverflowX() == EOverflow::kVisible;
2044 } 2050 }
2045 bool IsOverflowPaged() const { 2051 bool IsOverflowPaged() const {
2046 return OverflowY() == EOverflow::kWebkitPagedX || 2052 return OverflowY() == EOverflow::kWebkitPagedX ||
2047 OverflowY() == EOverflow::kWebkitPagedY; 2053 OverflowY() == EOverflow::kWebkitPagedY;
2048 } 2054 }
2049 2055
2056 bool IsDisplayTableRowOrColumnType() const {
2057 return Display() == EDisplay::kTableRow ||
2058 Display() == EDisplay::kTableRowGroup ||
2059 Display() == EDisplay::kTableColumn ||
2060 Display() == EDisplay::kTableColumnGroup;
2061 }
2062
2063 bool HasAutoHorizontalScroll() const {
2064 return OverflowX() == EOverflow::kAuto ||
2065 OverflowX() == EOverflow::kOverlay;
2066 }
2067
2068 bool HasAutoVerticalScroll() const {
2069 return OverflowY() == EOverflow::kAuto ||
2070 OverflowY() == EOverflow::kWebkitPagedY ||
2071 OverflowY() == EOverflow::kOverlay;
2072 }
2073
2074 bool ScrollsOverflowX() const {
2075 return OverflowX() == EOverflow::kScroll || HasAutoHorizontalScroll();
2076 }
2077
2078 bool ScrollsOverflowY() const {
2079 return OverflowY() == EOverflow::kScroll || HasAutoVerticalScroll();
2080 }
2081
2082 bool ScrollsOverflow() const {
2083 return ScrollsOverflowX() || ScrollsOverflowY();
2084 }
2085
2050 // Visibility utility functions. 2086 // Visibility utility functions.
2051 bool VisibleToHitTesting() const { 2087 bool VisibleToHitTesting() const {
2052 return Visibility() == EVisibility::kVisible && 2088 return Visibility() == EVisibility::kVisible &&
2053 PointerEvents() != EPointerEvents::kNone; 2089 PointerEvents() != EPointerEvents::kNone;
2054 } 2090 }
2055 2091
2056 // Animation utility functions. 2092 // Animation utility functions.
2057 bool ShouldCompositeForCurrentAnimations() const { 2093 bool ShouldCompositeForCurrentAnimations() const {
2058 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() || 2094 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() ||
2059 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation(); 2095 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation();
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 2692 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
2657 } 2693 }
2658 2694
2659 inline bool ComputedStyle::HasPseudoElementStyle() const { 2695 inline bool ComputedStyle::HasPseudoElementStyle() const {
2660 return PseudoBitsInternal() & kElementPseudoIdMask; 2696 return PseudoBitsInternal() & kElementPseudoIdMask;
2661 } 2697 }
2662 2698
2663 } // namespace blink 2699 } // namespace blink
2664 2700
2665 #endif // ComputedStyle_h 2701 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698