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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2916563003: Compute effective touch action in StyleAdjuster. (Closed)
Patch Set: Unifying ScrollsOverflow 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index ba9c457a87b60c5070bca829e03f7c05f570c417..46a53a0512abbd9f60ec49a7c283cc988d1094e0 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -1505,9 +1505,16 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
TouchAction GetTouchAction() const {
return static_cast<TouchAction>(rare_non_inherited_data_->touch_action_);
}
+ TouchAction GetEffectiveTouchAction() const {
+ return static_cast<TouchAction>(
+ rare_inherited_data_->effective_touch_action_);
+ }
void SetTouchAction(TouchAction t) {
SET_VAR(rare_non_inherited_data_, touch_action_, t);
}
+ void SetEffectiveTouchAction(TouchAction t) {
+ SET_VAR(rare_inherited_data_, effective_touch_action_, t);
+ }
// vertical-align
static EVerticalAlign InitialVerticalAlign() {
@@ -2986,6 +2993,36 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
OverflowY() == EOverflow::kWebkitPagedY;
}
+ bool IsDisplayTableRowOrColumnType() const {
+ return Display() == EDisplay::kTableRow ||
+ Display() == EDisplay::kTableRowGroup ||
+ Display() == EDisplay::kTableColumn ||
+ Display() == EDisplay::kTableColumnGroup;
+ }
+
+ bool HasAutoHorizontalScrollbar() const {
flackr 2017/06/08 19:35:21 nit: We should avoid saying scrollbar, since it ju
sunxd 2017/06/09 21:00:35 Done.
+ return OverflowX() == EOverflow::kAuto ||
+ OverflowX() == EOverflow::kOverlay;
+ }
+
+ bool HasAutoVerticalScrollbar() const {
+ return OverflowY() == EOverflow::kAuto ||
+ OverflowY() == EOverflow::kWebkitPagedY ||
+ OverflowY() == EOverflow::kOverlay;
+ }
+
+ bool ScrollsOverflowX() const {
+ return OverflowX() == EOverflow::kScroll || HasAutoHorizontalScrollbar();
+ }
+
+ bool ScrollsOverflowY() const {
+ return OverflowY() == EOverflow::kScroll || HasAutoVerticalScrollbar();
+ }
+
+ bool ScrollsOverflow() const {
+ return ScrollsOverflowX() || ScrollsOverflowY();
+ }
+
// Visibility utility functions.
bool VisibleToHitTesting() const {
return Visibility() == EVisibility::kVisible &&

Powered by Google App Engine
This is Rietveld 408576698