| OLD | NEW |
| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 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 | 182 // FrameViewBase. The client needs to implement these in order to be aware of |
| 183 // layout effects like CSS transforms. | 183 // layout effects like CSS transforms. |
| 184 virtual IntRect ConvertFromScrollbarToContainingFrameViewBase( | 184 virtual IntRect ConvertFromScrollbarToContainingFrameViewBase( |
| 185 const Scrollbar& scrollbar, | 185 const Scrollbar& scrollbar, |
| 186 const IntRect& scrollbar_rect) const { | 186 const IntRect& scrollbar_rect) const { |
| 187 return scrollbar.FrameViewBase::ConvertToContainingFrameViewBase( | 187 IntRect local_rect = scrollbar_rect; |
| 188 scrollbar_rect); | 188 local_rect.MoveBy(scrollbar.Location()); |
| 189 return local_rect; |
| 189 } | 190 } |
| 190 virtual IntRect ConvertFromContainingFrameViewBaseToScrollbar( | 191 virtual IntPoint ConvertFromContainingFrameViewBaseToScrollbar( |
| 191 const Scrollbar& scrollbar, | 192 const Scrollbar& scrollbar, |
| 192 const IntRect& parent_rect) const { | 193 const IntPoint& parent_point) const { |
| 193 return scrollbar.FrameViewBase::ConvertFromContainingFrameViewBase( | 194 NOTREACHED(); |
| 194 parent_rect); | 195 return parent_point; |
| 195 } | 196 } |
| 196 virtual IntPoint ConvertFromScrollbarToContainingFrameViewBase( | 197 virtual IntPoint ConvertFromScrollbarToContainingFrameViewBase( |
| 197 const Scrollbar& scrollbar, | 198 const Scrollbar& scrollbar, |
| 198 const IntPoint& scrollbar_point) const { | 199 const IntPoint& scrollbar_point) const { |
| 199 return scrollbar.FrameViewBase::ConvertToContainingFrameViewBase( | 200 NOTREACHED(); |
| 200 scrollbar_point); | 201 return scrollbar_point; |
| 201 } | 202 } |
| 202 virtual IntPoint ConvertFromContainingFrameViewBaseToScrollbar( | |
| 203 const Scrollbar& scrollbar, | |
| 204 const IntPoint& parent_point) const { | |
| 205 return scrollbar.FrameViewBase::ConvertFromContainingFrameViewBase( | |
| 206 parent_point); | |
| 207 } | |
| 208 | |
| 209 virtual Scrollbar* HorizontalScrollbar() const { return nullptr; } | 203 virtual Scrollbar* HorizontalScrollbar() const { return nullptr; } |
| 210 virtual Scrollbar* VerticalScrollbar() const { return nullptr; } | 204 virtual Scrollbar* VerticalScrollbar() const { return nullptr; } |
| 211 | 205 |
| 212 virtual PaintLayer* Layer() const { return nullptr; } | 206 virtual PaintLayer* Layer() const { return nullptr; } |
| 213 | 207 |
| 214 // scrollPosition is the location of the top/left of the scroll viewport in | 208 // 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. | 209 // 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 | 210 // 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. | 211 // scrolled all the way to the beginning of its content's flow. |
| 218 // For a more detailed explanation of scrollPosition, scrollOffset, and | 212 // For a more detailed explanation of scrollPosition, scrollOffset, and |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 // vertical-lr / ltr NO NO | 450 // vertical-lr / ltr NO NO |
| 457 // vertical-lr / rtl NO YES | 451 // vertical-lr / rtl NO YES |
| 458 // vertical-rl / ltr YES NO | 452 // vertical-rl / ltr YES NO |
| 459 // vertical-rl / rtl YES YES | 453 // vertical-rl / rtl YES YES |
| 460 IntPoint scroll_origin_; | 454 IntPoint scroll_origin_; |
| 461 }; | 455 }; |
| 462 | 456 |
| 463 } // namespace blink | 457 } // namespace blink |
| 464 | 458 |
| 465 #endif // ScrollableArea_h | 459 #endif // ScrollableArea_h |
| OLD | NEW |