| 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 |
| 362 void ScrollbarTheme::splitTrack(const ScrollbarThemeClient& scrollbar, | 366 void ScrollbarTheme::splitTrack(const ScrollbarThemeClient& scrollbar, |
| 363 const IntRect& unconstrainedTrackRect, | 367 const IntRect& unconstrainedTrackRect, |
| 364 IntRect& beforeThumbRect, | 368 IntRect& beforeThumbRect, |
| 365 IntRect& thumbRect, | 369 IntRect& thumbRect, |
| 366 IntRect& afterThumbRect) { | 370 IntRect& afterThumbRect) { |
| 367 // This function won't even get called unless we're big enough to have some | 371 // This function won't even get called unless we're big enough to have some |
| 368 // combination of these three rects where at least one of them is non-empty. | 372 // combination of these three rects where at least one of them is non-empty. |
| 369 IntRect trackRect = | 373 IntRect trackRect = |
| 370 constrainTrackRectToTrackPieces(scrollbar, unconstrainedTrackRect); | 374 constrainTrackRectToTrackPieces(scrollbar, unconstrainedTrackRect); |
| 371 int thumbPos = thumbPosition(scrollbar); | 375 int thumbPos = thumbPosition(scrollbar); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 return DisplayItem::kScrollbarBackTrack; | 438 return DisplayItem::kScrollbarBackTrack; |
| 435 case ForwardTrackPart: | 439 case ForwardTrackPart: |
| 436 return DisplayItem::kScrollbarForwardTrack; | 440 return DisplayItem::kScrollbarForwardTrack; |
| 437 default: | 441 default: |
| 438 ASSERT_NOT_REACHED(); | 442 ASSERT_NOT_REACHED(); |
| 439 return DisplayItem::kScrollbarBackTrack; | 443 return DisplayItem::kScrollbarBackTrack; |
| 440 } | 444 } |
| 441 } | 445 } |
| 442 | 446 |
| 443 } // namespace blink | 447 } // namespace blink |
| OLD | NEW |