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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 IntRect ScrollbarThemeMac::ForwardButtonRect( | 383 IntRect ScrollbarThemeMac::ForwardButtonRect( |
384 const ScrollbarThemeClient& scrollbar, | 384 const ScrollbarThemeClient& scrollbar, |
385 ScrollbarPart part, | 385 ScrollbarPart part, |
386 bool painting) { | 386 bool painting) { |
387 ASSERT(ButtonsPlacement() == kWebScrollbarButtonsPlacementNone); | 387 ASSERT(ButtonsPlacement() == kWebScrollbarButtonsPlacementNone); |
388 return IntRect(); | 388 return IntRect(); |
389 } | 389 } |
390 | 390 |
391 IntRect ScrollbarThemeMac::TrackRect(const ScrollbarThemeClient& scrollbar, | 391 IntRect ScrollbarThemeMac::TrackRect(const ScrollbarThemeClient& scrollbar, |
392 bool painting) { | 392 bool painting) { |
393 ASSERT(!HasButtons(scrollbar)); | 393 DCHECK(!HasButtons(scrollbar)); |
394 return scrollbar.FrameRect(); | 394 return scrollbar.FrameRect(); |
395 } | 395 } |
396 | 396 |
397 int ScrollbarThemeMac::MinimumThumbLength( | 397 int ScrollbarThemeMac::MinimumThumbLength( |
398 const ScrollbarThemeClient& scrollbar) { | 398 const ScrollbarThemeClient& scrollbar) { |
399 return [PainterForScrollbar(scrollbar) knobMinLength]; | 399 return [PainterForScrollbar(scrollbar) knobMinLength]; |
400 } | 400 } |
401 | 401 |
402 void ScrollbarThemeMac::UpdateEnabledState( | 402 void ScrollbarThemeMac::UpdateEnabledState( |
403 const ScrollbarThemeClient& scrollbar) { | 403 const ScrollbarThemeClient& scrollbar) { |
404 [PainterForScrollbar(scrollbar) setEnabled:scrollbar.Enabled()]; | 404 [PainterForScrollbar(scrollbar) setEnabled:scrollbar.Enabled()]; |
405 } | 405 } |
406 | 406 |
407 float ScrollbarThemeMac::ThumbOpacity( | 407 float ScrollbarThemeMac::ThumbOpacity( |
408 const ScrollbarThemeClient& scrollbar) const { | 408 const ScrollbarThemeClient& scrollbar) const { |
409 ScrollbarPainter scrollbar_painter = PainterForScrollbar(scrollbar); | 409 ScrollbarPainter scrollbar_painter = PainterForScrollbar(scrollbar); |
410 return [scrollbar_painter knobAlpha]; | 410 return [scrollbar_painter knobAlpha]; |
411 } | 411 } |
412 | 412 |
413 // static | 413 // static |
414 NSScrollerStyle ScrollbarThemeMac::RecommendedScrollerStyle() { | 414 NSScrollerStyle ScrollbarThemeMac::RecommendedScrollerStyle() { |
415 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) | 415 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) |
416 return NSScrollerStyleOverlay; | 416 return NSScrollerStyleOverlay; |
417 return g_preferred_scroller_style; | 417 return g_preferred_scroller_style; |
418 } | 418 } |
419 | 419 |
420 } // namespace blink | 420 } // namespace blink |
OLD | NEW |