OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 352 |
353 return thumbRect; | 353 return thumbRect; |
354 } | 354 } |
355 | 355 |
356 int ScrollbarTheme::thumbThickness(const ScrollbarThemeClient& scrollbar) { | 356 int ScrollbarTheme::thumbThickness(const ScrollbarThemeClient& scrollbar) { |
357 IntRect track = trackRect(scrollbar); | 357 IntRect track = trackRect(scrollbar); |
358 return scrollbar.orientation() == HorizontalScrollbar ? track.height() | 358 return scrollbar.orientation() == HorizontalScrollbar ? track.height() |
359 : track.width(); | 359 : track.width(); |
360 } | 360 } |
361 | 361 |
362 int ScrollbarTheme::minimumThumbLength(const ScrollbarThemeClient& scrollbar) { | |
363 return scrollbarThickness(scrollbar.controlSize()); | |
364 } | |
365 | |
366 void ScrollbarTheme::splitTrack(const ScrollbarThemeClient& scrollbar, | 362 void ScrollbarTheme::splitTrack(const ScrollbarThemeClient& scrollbar, |
367 const IntRect& unconstrainedTrackRect, | 363 const IntRect& unconstrainedTrackRect, |
368 IntRect& beforeThumbRect, | 364 IntRect& beforeThumbRect, |
369 IntRect& thumbRect, | 365 IntRect& thumbRect, |
370 IntRect& afterThumbRect) { | 366 IntRect& afterThumbRect) { |
371 // This function won't even get called unless we're big enough to have some | 367 // This function won't even get called unless we're big enough to have some |
372 // combination of these three rects where at least one of them is non-empty. | 368 // combination of these three rects where at least one of them is non-empty. |
373 IntRect trackRect = | 369 IntRect trackRect = |
374 constrainTrackRectToTrackPieces(scrollbar, unconstrainedTrackRect); | 370 constrainTrackRectToTrackPieces(scrollbar, unconstrainedTrackRect); |
375 int thumbPos = thumbPosition(scrollbar); | 371 int thumbPos = thumbPosition(scrollbar); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 return DisplayItem::kScrollbarBackTrack; | 434 return DisplayItem::kScrollbarBackTrack; |
439 case ForwardTrackPart: | 435 case ForwardTrackPart: |
440 return DisplayItem::kScrollbarForwardTrack; | 436 return DisplayItem::kScrollbarForwardTrack; |
441 default: | 437 default: |
442 ASSERT_NOT_REACHED(); | 438 ASSERT_NOT_REACHED(); |
443 return DisplayItem::kScrollbarBackTrack; | 439 return DisplayItem::kScrollbarBackTrack; |
444 } | 440 } |
445 } | 441 } |
446 | 442 |
447 } // namespace blink | 443 } // namespace blink |
OLD | NEW |