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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 2916563003: Compute effective touch action in StyleAdjuster. (Closed)
Patch Set: Skip elements that don't need a layout object 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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 bool CanBeScrolledAndHasScrollableArea() const; 982 bool CanBeScrolledAndHasScrollableArea() const;
983 virtual bool CanBeProgramaticallyScrolled() const; 983 virtual bool CanBeProgramaticallyScrolled() const;
984 virtual void Autoscroll(const IntPoint&); 984 virtual void Autoscroll(const IntPoint&);
985 bool CanAutoscroll() const; 985 bool CanAutoscroll() const;
986 IntSize CalculateAutoscrollDirection( 986 IntSize CalculateAutoscrollDirection(
987 const IntPoint& point_in_root_frame) const; 987 const IntPoint& point_in_root_frame) const;
988 static LayoutBox* FindAutoscrollable(LayoutObject*); 988 static LayoutBox* FindAutoscrollable(LayoutObject*);
989 virtual void StopAutoscroll() {} 989 virtual void StopAutoscroll() {}
990 990
991 DISABLE_CFI_PERF bool HasAutoVerticalScrollbar() const { 991 DISABLE_CFI_PERF bool HasAutoVerticalScrollbar() const {
992 return HasOverflowClip() && 992 return HasOverflowClip() && Style()->HasAutoVerticalScroll();
993 (Style()->OverflowY() == EOverflow::kAuto ||
994 Style()->OverflowY() == EOverflow::kWebkitPagedY ||
995 Style()->OverflowY() == EOverflow::kOverlay);
996 } 993 }
997 DISABLE_CFI_PERF bool HasAutoHorizontalScrollbar() const { 994 DISABLE_CFI_PERF bool HasAutoHorizontalScrollbar() const {
998 return HasOverflowClip() && (Style()->OverflowX() == EOverflow::kAuto || 995 return HasOverflowClip() && Style()->HasAutoHorizontalScroll();
999 Style()->OverflowX() == EOverflow::kOverlay);
1000 } 996 }
1001 DISABLE_CFI_PERF bool ScrollsOverflow() const { 997 DISABLE_CFI_PERF bool ScrollsOverflow() const {
1002 return ScrollsOverflowX() || ScrollsOverflowY(); 998 return HasOverflowClip() && Style()->ScrollsOverflow();
1003 } 999 }
1004 virtual bool ShouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { 1000 virtual bool ShouldPlaceBlockDirectionScrollbarOnLogicalLeft() const {
1005 return Style()->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft(); 1001 return Style()->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft();
1006 } 1002 }
1007 1003
1008 bool HasScrollableOverflowX() const { 1004 bool HasScrollableOverflowX() const {
1009 return ScrollsOverflowX() && 1005 return ScrollsOverflowX() &&
1010 PixelSnappedScrollWidth() != PixelSnappedClientWidth(); 1006 PixelSnappedScrollWidth() != PixelSnappedClientWidth();
1011 } 1007 }
1012 bool HasScrollableOverflowY() const { 1008 bool HasScrollableOverflowY() const {
1013 return ScrollsOverflowY() && 1009 return ScrollsOverflowY() &&
1014 PixelSnappedScrollHeight() != PixelSnappedClientHeight(); 1010 PixelSnappedScrollHeight() != PixelSnappedClientHeight();
1015 } 1011 }
1016 virtual bool ScrollsOverflowX() const { 1012 virtual bool ScrollsOverflowX() const {
1017 return HasOverflowClip() && (Style()->OverflowX() == EOverflow::kScroll || 1013 return HasOverflowClip() && Style()->ScrollsOverflowX();
1018 HasAutoHorizontalScrollbar());
1019 } 1014 }
1020 virtual bool ScrollsOverflowY() const { 1015 virtual bool ScrollsOverflowY() const {
1021 return HasOverflowClip() && (Style()->OverflowY() == EOverflow::kScroll || 1016 return HasOverflowClip() && Style()->ScrollsOverflowY();
1022 HasAutoVerticalScrollbar());
1023 } 1017 }
1024 1018
1025 // Elements such as the <input> field override this to specify that they are 1019 // Elements such as the <input> field override this to specify that they are
1026 // scrollable outside the context of the CSS overflow style 1020 // scrollable outside the context of the CSS overflow style
1027 virtual bool IsIntrinsicallyScrollable( 1021 virtual bool IsIntrinsicallyScrollable(
1028 ScrollbarOrientation orientation) const { 1022 ScrollbarOrientation orientation) const {
1029 return false; 1023 return false;
1030 } 1024 }
1031 1025
1032 bool HasUnsplittableScrollingOverflow() const; 1026 bool HasUnsplittableScrollingOverflow() const;
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 break_value == EBreakBetween::kLeft || 1718 break_value == EBreakBetween::kLeft ||
1725 break_value == EBreakBetween::kPage || 1719 break_value == EBreakBetween::kPage ||
1726 break_value == EBreakBetween::kRecto || 1720 break_value == EBreakBetween::kRecto ||
1727 break_value == EBreakBetween::kRight || 1721 break_value == EBreakBetween::kRight ||
1728 break_value == EBreakBetween::kVerso; 1722 break_value == EBreakBetween::kVerso;
1729 } 1723 }
1730 1724
1731 } // namespace blink 1725 } // namespace blink
1732 1726
1733 #endif // LayoutBox_h 1727 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698