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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 bool CanBeScrolledAndHasScrollableArea() const; 1029 bool CanBeScrolledAndHasScrollableArea() const;
1030 virtual bool CanBeProgramaticallyScrolled() const; 1030 virtual bool CanBeProgramaticallyScrolled() const;
1031 virtual void Autoscroll(const IntPoint&); 1031 virtual void Autoscroll(const IntPoint&);
1032 bool CanAutoscroll() const; 1032 bool CanAutoscroll() const;
1033 IntSize CalculateAutoscrollDirection( 1033 IntSize CalculateAutoscrollDirection(
1034 const IntPoint& point_in_root_frame) const; 1034 const IntPoint& point_in_root_frame) const;
1035 static LayoutBox* FindAutoscrollable(LayoutObject*); 1035 static LayoutBox* FindAutoscrollable(LayoutObject*);
1036 virtual void StopAutoscroll() {} 1036 virtual void StopAutoscroll() {}
1037 1037
1038 DISABLE_CFI_PERF bool HasAutoVerticalScrollbar() const { 1038 DISABLE_CFI_PERF bool HasAutoVerticalScrollbar() const {
1039 return HasOverflowClip() && 1039 return HasOverflowClip() && Style()->HasAutoVerticalScroll();
1040 (Style()->OverflowY() == EOverflow::kAuto ||
1041 Style()->OverflowY() == EOverflow::kWebkitPagedY ||
1042 Style()->OverflowY() == EOverflow::kOverlay);
1043 } 1040 }
1044 DISABLE_CFI_PERF bool HasAutoHorizontalScrollbar() const { 1041 DISABLE_CFI_PERF bool HasAutoHorizontalScrollbar() const {
1045 return HasOverflowClip() && (Style()->OverflowX() == EOverflow::kAuto || 1042 return HasOverflowClip() && Style()->HasAutoHorizontalScroll();
1046 Style()->OverflowX() == EOverflow::kOverlay);
1047 } 1043 }
1048 DISABLE_CFI_PERF bool ScrollsOverflow() const { 1044 DISABLE_CFI_PERF bool ScrollsOverflow() const {
1049 return ScrollsOverflowX() || ScrollsOverflowY(); 1045 return HasOverflowClip() && Style()->ScrollsOverflow();
1050 } 1046 }
1051 virtual bool ShouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { 1047 virtual bool ShouldPlaceBlockDirectionScrollbarOnLogicalLeft() const {
1052 return Style()->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft(); 1048 return Style()->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft();
1053 } 1049 }
1054 1050
1055 bool HasScrollableOverflowX() const { 1051 bool HasScrollableOverflowX() const {
1056 return ScrollsOverflowX() && 1052 return ScrollsOverflowX() &&
1057 PixelSnappedScrollWidth() != PixelSnappedClientWidth(); 1053 PixelSnappedScrollWidth() != PixelSnappedClientWidth();
1058 } 1054 }
1059 bool HasScrollableOverflowY() const { 1055 bool HasScrollableOverflowY() const {
1060 return ScrollsOverflowY() && 1056 return ScrollsOverflowY() &&
1061 PixelSnappedScrollHeight() != PixelSnappedClientHeight(); 1057 PixelSnappedScrollHeight() != PixelSnappedClientHeight();
1062 } 1058 }
1063 virtual bool ScrollsOverflowX() const { 1059 virtual bool ScrollsOverflowX() const {
1064 return HasOverflowClip() && (Style()->OverflowX() == EOverflow::kScroll || 1060 return HasOverflowClip() && Style()->ScrollsOverflowX();
1065 HasAutoHorizontalScrollbar());
1066 } 1061 }
1067 virtual bool ScrollsOverflowY() const { 1062 virtual bool ScrollsOverflowY() const {
1068 return HasOverflowClip() && (Style()->OverflowY() == EOverflow::kScroll || 1063 return HasOverflowClip() && Style()->ScrollsOverflowY();
1069 HasAutoVerticalScrollbar());
1070 } 1064 }
1071 1065
1072 // Elements such as the <input> field override this to specify that they are 1066 // Elements such as the <input> field override this to specify that they are
1073 // scrollable outside the context of the CSS overflow style 1067 // scrollable outside the context of the CSS overflow style
1074 virtual bool IsIntrinsicallyScrollable( 1068 virtual bool IsIntrinsicallyScrollable(
1075 ScrollbarOrientation orientation) const { 1069 ScrollbarOrientation orientation) const {
1076 return false; 1070 return false;
1077 } 1071 }
1078 1072
1079 bool HasUnsplittableScrollingOverflow() const; 1073 bool HasUnsplittableScrollingOverflow() const;
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 break_value == EBreakBetween::kLeft || 1758 break_value == EBreakBetween::kLeft ||
1765 break_value == EBreakBetween::kPage || 1759 break_value == EBreakBetween::kPage ||
1766 break_value == EBreakBetween::kRecto || 1760 break_value == EBreakBetween::kRecto ||
1767 break_value == EBreakBetween::kRight || 1761 break_value == EBreakBetween::kRight ||
1768 break_value == EBreakBetween::kVerso; 1762 break_value == EBreakBetween::kVerso;
1769 } 1763 }
1770 1764
1771 } // namespace blink 1765 } // namespace blink
1772 1766
1773 #endif // LayoutBox_h 1767 #endif // LayoutBox_h
OLDNEW
« 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