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

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

Issue 2916563003: Compute effective touch action in StyleAdjuster. (Closed)
Patch Set: Iframe touch action updates trigger descendant style recalc. Created 3 years, 6 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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 SET_VAR(rare_non_inherited_data_, text_overflow_, overflow); 1498 SET_VAR(rare_non_inherited_data_, text_overflow_, overflow);
1499 } 1499 }
1500 1500
1501 // touch-action 1501 // touch-action
1502 static TouchAction InitialTouchAction() { 1502 static TouchAction InitialTouchAction() {
1503 return TouchAction::kTouchActionAuto; 1503 return TouchAction::kTouchActionAuto;
1504 } 1504 }
1505 TouchAction GetTouchAction() const { 1505 TouchAction GetTouchAction() const {
1506 return static_cast<TouchAction>(rare_non_inherited_data_->touch_action_); 1506 return static_cast<TouchAction>(rare_non_inherited_data_->touch_action_);
1507 } 1507 }
1508 TouchAction GetEffectiveTouchAction() const {
1509 return static_cast<TouchAction>(
1510 rare_inherited_data_->effective_touch_action_);
1511 }
1508 void SetTouchAction(TouchAction t) { 1512 void SetTouchAction(TouchAction t) {
1509 SET_VAR(rare_non_inherited_data_, touch_action_, t); 1513 SET_VAR(rare_non_inherited_data_, touch_action_, t);
1510 } 1514 }
1515 void SetEffectiveTouchAction(TouchAction t) {
1516 SET_VAR(rare_inherited_data_, effective_touch_action_, t);
1517 }
1511 1518
1512 // vertical-align 1519 // vertical-align
1513 static EVerticalAlign InitialVerticalAlign() { 1520 static EVerticalAlign InitialVerticalAlign() {
1514 return EVerticalAlign::kBaseline; 1521 return EVerticalAlign::kBaseline;
1515 } 1522 }
1516 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); } 1523 EVerticalAlign VerticalAlign() const { return VerticalAlignInternal(); }
1517 const Length& GetVerticalAlignLength() const { 1524 const Length& GetVerticalAlignLength() const {
1518 return VerticalAlignLengthInternal(); 1525 return VerticalAlignLengthInternal();
1519 } 1526 }
1520 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); } 1527 void SetVerticalAlign(EVerticalAlign v) { SetVerticalAlignInternal(v); }
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
2981 // visible on only one overflow value. 2988 // visible on only one overflow value.
2982 bool IsOverflowVisible() const { 2989 bool IsOverflowVisible() const {
2983 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY()); 2990 DCHECK(OverflowX() != EOverflow::kVisible || OverflowX() == OverflowY());
2984 return OverflowX() == EOverflow::kVisible; 2991 return OverflowX() == EOverflow::kVisible;
2985 } 2992 }
2986 bool IsOverflowPaged() const { 2993 bool IsOverflowPaged() const {
2987 return OverflowY() == EOverflow::kWebkitPagedX || 2994 return OverflowY() == EOverflow::kWebkitPagedX ||
2988 OverflowY() == EOverflow::kWebkitPagedY; 2995 OverflowY() == EOverflow::kWebkitPagedY;
2989 } 2996 }
2990 2997
2998 bool IsDisplayTableRowOrColumnType() const {
2999 return Display() == EDisplay::kTableRow ||
3000 Display() == EDisplay::kTableRowGroup ||
3001 Display() == EDisplay::kTableColumn ||
3002 Display() == EDisplay::kTableColumnGroup;
3003 }
3004
3005 bool HasAutoHorizontalScroll() const {
3006 return OverflowX() == EOverflow::kAuto ||
3007 OverflowX() == EOverflow::kOverlay;
3008 }
3009
3010 bool HasAutoVerticalScroll() const {
3011 return OverflowY() == EOverflow::kAuto ||
3012 OverflowY() == EOverflow::kWebkitPagedY ||
3013 OverflowY() == EOverflow::kOverlay;
3014 }
3015
3016 bool ScrollsOverflowX() const {
3017 return OverflowX() == EOverflow::kScroll || HasAutoHorizontalScroll();
3018 }
3019
3020 bool ScrollsOverflowY() const {
3021 return OverflowY() == EOverflow::kScroll || HasAutoVerticalScroll();
3022 }
3023
3024 bool ScrollsOverflow() const {
3025 return ScrollsOverflowX() || ScrollsOverflowY();
3026 }
3027
2991 // Visibility utility functions. 3028 // Visibility utility functions.
2992 bool VisibleToHitTesting() const { 3029 bool VisibleToHitTesting() const {
2993 return Visibility() == EVisibility::kVisible && 3030 return Visibility() == EVisibility::kVisible &&
2994 PointerEvents() != EPointerEvents::kNone; 3031 PointerEvents() != EPointerEvents::kNone;
2995 } 3032 }
2996 3033
2997 // Animation utility functions. 3034 // Animation utility functions.
2998 bool ShouldCompositeForCurrentAnimations() const { 3035 bool ShouldCompositeForCurrentAnimations() const {
2999 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() || 3036 return HasCurrentOpacityAnimation() || HasCurrentTransformAnimation() ||
3000 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation(); 3037 HasCurrentFilterAnimation() || HasCurrentBackdropFilterAnimation();
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
3574 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3611 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3575 } 3612 }
3576 3613
3577 inline bool ComputedStyle::HasPseudoElementStyle() const { 3614 inline bool ComputedStyle::HasPseudoElementStyle() const {
3578 return PseudoBitsInternal() & kElementPseudoIdMask; 3615 return PseudoBitsInternal() & kElementPseudoIdMask;
3579 } 3616 }
3580 3617
3581 } // namespace blink 3618 } // namespace blink
3582 3619
3583 #endif // ComputedStyle_h 3620 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698