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

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

Issue 2893833004: When moving past a left-hand scrollbar, don't jump way outside the content box. (Closed)
Patch Set: Created 3 years, 7 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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 int VerticalScrollbarWidth() const; 1008 int VerticalScrollbarWidth() const;
1009 int HorizontalScrollbarHeight() const; 1009 int HorizontalScrollbarHeight() const;
1010 int ScrollbarLogicalWidth() const { 1010 int ScrollbarLogicalWidth() const {
1011 return Style()->IsHorizontalWritingMode() ? VerticalScrollbarWidth() 1011 return Style()->IsHorizontalWritingMode() ? VerticalScrollbarWidth()
1012 : HorizontalScrollbarHeight(); 1012 : HorizontalScrollbarHeight();
1013 } 1013 }
1014 int ScrollbarLogicalHeight() const { 1014 int ScrollbarLogicalHeight() const {
1015 return Style()->IsHorizontalWritingMode() ? HorizontalScrollbarHeight() 1015 return Style()->IsHorizontalWritingMode() ? HorizontalScrollbarHeight()
1016 : VerticalScrollbarWidth(); 1016 : VerticalScrollbarWidth();
1017 } 1017 }
1018
1019 // Return the width of the vertical scrollbar, unless it's larger than the
1020 // logical width of the content box, in which case we'll return that instead.
1021 // Scrollbar handling is quite bad in such situations, and this method here
1022 // is just to make sure that left-hand scrollbars don't mess up
1023 // scrollWidth. For the full story, visit crbug.com/724255
1024 LayoutUnit VerticalScrollbarWidthClampedToContentBox() const;
1025
1018 virtual ScrollResult Scroll(ScrollGranularity, const FloatSize&); 1026 virtual ScrollResult Scroll(ScrollGranularity, const FloatSize&);
1019 bool CanBeScrolledAndHasScrollableArea() const; 1027 bool CanBeScrolledAndHasScrollableArea() const;
1020 virtual bool CanBeProgramaticallyScrolled() const; 1028 virtual bool CanBeProgramaticallyScrolled() const;
1021 virtual void Autoscroll(const IntPoint&); 1029 virtual void Autoscroll(const IntPoint&);
1022 bool CanAutoscroll() const; 1030 bool CanAutoscroll() const;
1023 IntSize CalculateAutoscrollDirection( 1031 IntSize CalculateAutoscrollDirection(
1024 const IntPoint& point_in_root_frame) const; 1032 const IntPoint& point_in_root_frame) const;
1025 static LayoutBox* FindAutoscrollable(LayoutObject*); 1033 static LayoutBox* FindAutoscrollable(LayoutObject*);
1026 virtual void StopAutoscroll() {} 1034 virtual void StopAutoscroll() {}
1027 1035
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 break_value == EBreakBetween::kLeft || 1744 break_value == EBreakBetween::kLeft ||
1737 break_value == EBreakBetween::kPage || 1745 break_value == EBreakBetween::kPage ||
1738 break_value == EBreakBetween::kRecto || 1746 break_value == EBreakBetween::kRecto ||
1739 break_value == EBreakBetween::kRight || 1747 break_value == EBreakBetween::kRight ||
1740 break_value == EBreakBetween::kVerso; 1748 break_value == EBreakBetween::kVerso;
1741 } 1749 }
1742 1750
1743 } // namespace blink 1751 } // namespace blink
1744 1752
1745 #endif // LayoutBox_h 1753 #endif // LayoutBox_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698