OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 Scrollbar* WebScrollbarImpl::horizontalScrollbar() const | 307 Scrollbar* WebScrollbarImpl::horizontalScrollbar() const |
308 { | 308 { |
309 return m_scrollbar->orientation() == HorizontalScrollbar ? m_scrollbar.get()
: 0; | 309 return m_scrollbar->orientation() == HorizontalScrollbar ? m_scrollbar.get()
: 0; |
310 } | 310 } |
311 | 311 |
312 Scrollbar* WebScrollbarImpl::verticalScrollbar() const | 312 Scrollbar* WebScrollbarImpl::verticalScrollbar() const |
313 { | 313 { |
314 return m_scrollbar->orientation() == VerticalScrollbar ? m_scrollbar.get() :
0; | 314 return m_scrollbar->orientation() == VerticalScrollbar ? m_scrollbar.get() :
0; |
315 } | 315 } |
316 | 316 |
| 317 int WebScrollbarImpl::visibleHeight() const |
| 318 { |
| 319 return m_scrollbar->height(); |
| 320 } |
| 321 |
| 322 int WebScrollbarImpl::visibleWidth() const |
| 323 { |
| 324 return m_scrollbar->width(); |
| 325 } |
| 326 |
| 327 IntSize WebScrollbarImpl::contentsSize() const |
| 328 { |
| 329 // This isn't technically correct, since we don't have the contentSize. Howe
ver it's good enough |
| 330 // to make the ScrollAnimator code happy. |
| 331 int thickness = defaultThickness(); |
| 332 int length = m_scrollbar->totalSize(); |
| 333 return m_scrollbar->orientation() == VerticalScrollbar ? IntSize(thickness,
length) : IntSize(length, thickness); |
| 334 } |
| 335 |
| 336 IntSize WebScrollbarImpl::overhangAmount() const |
| 337 { |
| 338 return IntSize(); |
| 339 } |
| 340 |
317 } // namespace WebKit | 341 } // namespace WebKit |
OLD | NEW |