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

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

Issue 2916563003: Compute effective touch action in StyleAdjuster. (Closed)
Patch Set: Move ComputeEffectiveTouchAction out of AdjustComputedStyle. 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 f92778921737c5718bc1a4e24fd13821faba285d..0cd8c401a5390262cbd0c5ae17d4b8b044fcc151 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -1518,9 +1518,16 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
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() {
@@ -3010,6 +3017,24 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
OverflowY() == EOverflow::kWebkitPagedY;
}
+ bool IsDisplayTableRowOrColumnType() const {
+ return Display() == EDisplay::kTableRow ||
+ Display() == EDisplay::kTableRowGroup ||
+ Display() == EDisplay::kTableColumn ||
+ Display() == EDisplay::kTableColumnGroup;
+ }
+
+ bool ScrollsOverflow() const {
+ bool overflow_x = OverflowX() == EOverflow::kScroll ||
+ OverflowX() == EOverflow::kAuto ||
+ OverflowX() == EOverflow::kOverlay;
+ bool overflow_y = OverflowY() == EOverflow::kScroll ||
+ OverflowY() == EOverflow::kAuto ||
+ OverflowY() == EOverflow::kWebkitPagedY ||
+ OverflowY() == EOverflow::kOverlay;
flackr 2017/06/07 18:21:47 Can you move the code from HasAutoVerticalScrollba
sunxd 2017/06/08 19:08:12 Done.
+ return overflow_x || overflow_y;
+ }
+
// Visibility utility functions.
bool VisibleToHitTesting() const {
return Visibility() == EVisibility::kVisible &&

Powered by Google App Engine
This is Rietveld 408576698