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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 2916563003: Compute effective touch action in StyleAdjuster. (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBox.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h
index 133f171c7ea633a95cdfbb9573080cc2f465551b..23be3d27ade47882745ca9b85d85bbdab6557f15 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -1036,17 +1036,13 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject {
virtual void StopAutoscroll() {}
DISABLE_CFI_PERF bool HasAutoVerticalScrollbar() const {
- return HasOverflowClip() &&
- (Style()->OverflowY() == EOverflow::kAuto ||
- Style()->OverflowY() == EOverflow::kWebkitPagedY ||
- Style()->OverflowY() == EOverflow::kOverlay);
+ return HasOverflowClip() && Style()->HasAutoVerticalScroll();
}
DISABLE_CFI_PERF bool HasAutoHorizontalScrollbar() const {
- return HasOverflowClip() && (Style()->OverflowX() == EOverflow::kAuto ||
- Style()->OverflowX() == EOverflow::kOverlay);
+ return HasOverflowClip() && Style()->HasAutoHorizontalScroll();
}
DISABLE_CFI_PERF bool ScrollsOverflow() const {
- return ScrollsOverflowX() || ScrollsOverflowY();
+ return HasOverflowClip() && Style()->ScrollsOverflow();
}
virtual bool ShouldPlaceBlockDirectionScrollbarOnLogicalLeft() const {
return Style()->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft();
@@ -1061,12 +1057,10 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject {
PixelSnappedScrollHeight() != PixelSnappedClientHeight();
}
virtual bool ScrollsOverflowX() const {
- return HasOverflowClip() && (Style()->OverflowX() == EOverflow::kScroll ||
- HasAutoHorizontalScrollbar());
+ return HasOverflowClip() && Style()->ScrollsOverflowX();
}
virtual bool ScrollsOverflowY() const {
- return HasOverflowClip() && (Style()->OverflowY() == EOverflow::kScroll ||
- HasAutoVerticalScrollbar());
+ return HasOverflowClip() && Style()->ScrollsOverflowY();
}
// Elements such as the <input> field override this to specify that they are
« no previous file with comments | « third_party/WebKit/Source/core/input/TouchActionUtil.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698