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

Side by Side Diff: sky/engine/platform/scroll/ScrollableArea.h

Issue 684353002: Remove more stuff from Widget. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 2008, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 virtual bool isActive() const = 0; 129 virtual bool isActive() const = 0;
130 virtual int scrollSize(ScrollbarOrientation) const = 0; 130 virtual int scrollSize(ScrollbarOrientation) const = 0;
131 virtual void invalidateScrollbar(Scrollbar*, const IntRect&); 131 virtual void invalidateScrollbar(Scrollbar*, const IntRect&);
132 virtual bool isScrollCornerVisible() const = 0; 132 virtual bool isScrollCornerVisible() const = 0;
133 virtual IntRect scrollCornerRect() const = 0; 133 virtual IntRect scrollCornerRect() const = 0;
134 virtual void invalidateScrollCorner(const IntRect&); 134 virtual void invalidateScrollCorner(const IntRect&);
135 135
136 // Convert points and rects between the scrollbar and its containing view. 136 // Convert points and rects between the scrollbar and its containing view.
137 // The client needs to implement these in order to be aware of layout effect s 137 // The client needs to implement these in order to be aware of layout effect s
138 // like CSS transforms. 138 // like CSS transforms.
139 virtual IntRect convertFromScrollbarToContainingView(const Scrollbar* scroll bar, const IntRect& scrollbarRect) const 139 virtual IntRect convertFromScrollbarToContainingView(const Scrollbar* scroll bar, const IntRect& scrollbarRect) const = 0;
140 { 140 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar* scroll bar, const IntRect& parentRect) const = 0;
141 return scrollbar->Widget::convertToContainingView(scrollbarRect); 141 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar* scrol lbar, const IntPoint& scrollbarPoint) const = 0;
142 } 142 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar* scrol lbar, const IntPoint& parentPoint) const = 0;
143 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar* scroll bar, const IntRect& parentRect) const
144 {
145 return scrollbar->Widget::convertFromContainingView(parentRect);
146 }
147 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar* scrol lbar, const IntPoint& scrollbarPoint) const
148 {
149 return scrollbar->Widget::convertToContainingView(scrollbarPoint);
150 }
151 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar* scrol lbar, const IntPoint& parentPoint) const
152 {
153 return scrollbar->Widget::convertFromContainingView(parentPoint);
154 }
155 143
156 virtual Scrollbar* horizontalScrollbar() const { return 0; } 144 virtual Scrollbar* horizontalScrollbar() const = 0;
157 virtual Scrollbar* verticalScrollbar() const { return 0; } 145 virtual Scrollbar* verticalScrollbar() const = 0;
158 146
159 // scrollPosition is relative to the scrollOrigin. i.e. If the page is RTL 147 // scrollPosition is relative to the scrollOrigin. i.e. If the page is RTL
160 // then scrollPosition will be negative. 148 // then scrollPosition will be negative.
161 virtual IntPoint scrollPosition() const = 0; 149 virtual IntPoint scrollPosition() const = 0;
162 virtual IntPoint minimumScrollPosition() const = 0; 150 virtual IntPoint minimumScrollPosition() const = 0;
163 virtual IntPoint maximumScrollPosition() const = 0; 151 virtual IntPoint maximumScrollPosition() const = 0;
164 152
165 virtual IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollba rs) const; 153 virtual IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollba rs) const;
166 virtual int visibleHeight() const = 0; 154 virtual int visibleHeight() const = 0;
167 virtual int visibleWidth() const = 0; 155 virtual int visibleWidth() const = 0;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // vertical-lr / ltr NO NO 273 // vertical-lr / ltr NO NO
286 // vertical-lr / rtl NO YES 274 // vertical-lr / rtl NO YES
287 // vertical-rl / ltr YES NO 275 // vertical-rl / ltr YES NO
288 // vertical-rl / rtl YES YES 276 // vertical-rl / rtl YES YES
289 IntPoint m_scrollOrigin; 277 IntPoint m_scrollOrigin;
290 }; 278 };
291 279
292 } // namespace blink 280 } // namespace blink
293 281
294 #endif // ScrollableArea_h 282 #endif // ScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698