| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // The ends are rounded and the thumb doesn't go there. | 141 // The ends are rounded and the thumb doesn't go there. |
| 142 tickmarkTrackRect.inflateY(-tickmarkTrackRect.width()); | 142 tickmarkTrackRect.inflateY(-tickmarkTrackRect.width()); |
| 143 // Inset a bit. | 143 // Inset a bit. |
| 144 tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2); | 144 tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2); |
| 145 tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5); | 145 tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5); |
| 146 paintGivenTickmarks(drawingCanvas, scrollbar, tickmarkTrackRect, tickmarks); | 146 paintGivenTickmarks(drawingCanvas, scrollbar, tickmarkTrackRect, tickmarks); |
| 147 | 147 |
| 148 if (!canDrawDirectly) { | 148 if (!canDrawDirectly) { |
| 149 ASSERT(imageBuffer); | 149 ASSERT(imageBuffer); |
| 150 if (!context.contextDisabled()) { | 150 if (!context.contextDisabled()) { |
| 151 imageBuffer->draw(&context, FloatRect(scrollbar.frameRect().location
(), FloatSize(imageBuffer->size())), | 151 imageBuffer->draw(context, FloatRect(scrollbar.frameRect().location(
), FloatSize(imageBuffer->size())), |
| 152 nullptr, SkXfermode::kSrcOver_Mode); | 152 nullptr, SkXfermode::kSrcOver_Mode); |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 | 155 |
| 156 return true; | 156 return true; |
| 157 } | 157 } |
| 158 | 158 |
| 159 int ScrollbarThemeMacNonOverlayAPI::scrollbarThickness(ScrollbarControlSize cont
rolSize) | 159 int ScrollbarThemeMacNonOverlayAPI::scrollbarThickness(ScrollbarControlSize cont
rolSize) |
| 160 { | 160 { |
| 161 return cScrollbarThickness[controlSize]; | 161 return cScrollbarThickness[controlSize]; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 return IntRect(scrollbar.x() + startWidth, scrollbar.y(), scrollbar.widt
h() - totalWidth, thickness); | 310 return IntRect(scrollbar.x() + startWidth, scrollbar.y(), scrollbar.widt
h() - totalWidth, thickness); |
| 311 return IntRect(scrollbar.x(), scrollbar.y() + startWidth, thickness, scrollb
ar.height() - totalWidth); | 311 return IntRect(scrollbar.x(), scrollbar.y() + startWidth, thickness, scrollb
ar.height() - totalWidth); |
| 312 } | 312 } |
| 313 | 313 |
| 314 int ScrollbarThemeMacNonOverlayAPI::minimumThumbLength(const ScrollbarThemeClien
t& scrollbar) | 314 int ScrollbarThemeMacNonOverlayAPI::minimumThumbLength(const ScrollbarThemeClien
t& scrollbar) |
| 315 { | 315 { |
| 316 return cThumbMinLength[scrollbar.controlSize()]; | 316 return cThumbMinLength[scrollbar.controlSize()]; |
| 317 } | 317 } |
| 318 | 318 |
| 319 } | 319 } |
| OLD | NEW |