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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.h

Issue 2832883003: Remove unneeded Convert* methods and move many from FrameViewBase to FrameView (Closed)
Patch Set: remove scrollbar convert methods Created 3 years, 8 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) 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 virtual bool IsActive() const = 0; 173 virtual bool IsActive() const = 0;
174 virtual int ScrollSize(ScrollbarOrientation) const = 0; 174 virtual int ScrollSize(ScrollbarOrientation) const = 0;
175 void SetScrollbarNeedsPaintInvalidation(ScrollbarOrientation); 175 void SetScrollbarNeedsPaintInvalidation(ScrollbarOrientation);
176 virtual bool IsScrollCornerVisible() const = 0; 176 virtual bool IsScrollCornerVisible() const = 0;
177 virtual IntRect ScrollCornerRect() const = 0; 177 virtual IntRect ScrollCornerRect() const = 0;
178 void SetScrollCornerNeedsPaintInvalidation(); 178 void SetScrollCornerNeedsPaintInvalidation();
179 virtual void GetTickmarks(Vector<IntRect>&) const {} 179 virtual void GetTickmarks(Vector<IntRect>&) const {}
180 180
181 // Convert points and rects between the scrollbar and its containing
182 // FrameViewBase. The client needs to implement these in order to be aware of
183 // layout effects like CSS transforms.
184 virtual IntRect ConvertFromScrollbarToContainingFrameViewBase(
185 const Scrollbar& scrollbar,
186 const IntRect& scrollbar_rect) const {
187 return scrollbar.FrameViewBase::ConvertToContainingFrameViewBase(
188 scrollbar_rect);
189 }
190 virtual IntRect ConvertFromContainingFrameViewBaseToScrollbar(
191 const Scrollbar& scrollbar,
192 const IntRect& parent_rect) const {
193 return scrollbar.FrameViewBase::ConvertFromContainingFrameViewBase(
194 parent_rect);
195 }
196 virtual IntPoint ConvertFromScrollbarToContainingFrameViewBase(
197 const Scrollbar& scrollbar,
198 const IntPoint& scrollbar_point) const {
199 return scrollbar.FrameViewBase::ConvertToContainingFrameViewBase(
200 scrollbar_point);
201 }
202 virtual IntPoint ConvertFromContainingFrameViewBaseToScrollbar( 181 virtual IntPoint ConvertFromContainingFrameViewBaseToScrollbar(
203 const Scrollbar& scrollbar, 182 const Scrollbar& scrollbar,
204 const IntPoint& parent_point) const { 183 const IntPoint& parent_point) const {
205 return scrollbar.FrameViewBase::ConvertFromContainingFrameViewBase( 184 return parent_point;
206 parent_point);
207 } 185 }
208
209 virtual Scrollbar* HorizontalScrollbar() const { return nullptr; } 186 virtual Scrollbar* HorizontalScrollbar() const { return nullptr; }
210 virtual Scrollbar* VerticalScrollbar() const { return nullptr; } 187 virtual Scrollbar* VerticalScrollbar() const { return nullptr; }
211 188
212 virtual PaintLayer* Layer() const { return nullptr; } 189 virtual PaintLayer* Layer() const { return nullptr; }
213 190
214 // scrollPosition is the location of the top/left of the scroll viewport in 191 // scrollPosition is the location of the top/left of the scroll viewport in
215 // the coordinate system defined by the top/left of the overflow rect. 192 // the coordinate system defined by the top/left of the overflow rect.
216 // scrollOffset is the offset of the scroll viewport from its position when 193 // scrollOffset is the offset of the scroll viewport from its position when
217 // scrolled all the way to the beginning of its content's flow. 194 // scrolled all the way to the beginning of its content's flow.
218 // For a more detailed explanation of scrollPosition, scrollOffset, and 195 // For a more detailed explanation of scrollPosition, scrollOffset, and
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // vertical-lr / ltr NO NO 433 // vertical-lr / ltr NO NO
457 // vertical-lr / rtl NO YES 434 // vertical-lr / rtl NO YES
458 // vertical-rl / ltr YES NO 435 // vertical-rl / ltr YES NO
459 // vertical-rl / rtl YES YES 436 // vertical-rl / rtl YES YES
460 IntPoint scroll_origin_; 437 IntPoint scroll_origin_;
461 }; 438 };
462 439
463 } // namespace blink 440 } // namespace blink
464 441
465 #endif // ScrollableArea_h 442 #endif // ScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698