| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 254 } |
| 255 | 255 |
| 256 int ScrollbarThemeComposite::trackLength(ScrollbarThemeClient* scrollbar) | 256 int ScrollbarThemeComposite::trackLength(ScrollbarThemeClient* scrollbar) |
| 257 { | 257 { |
| 258 IntRect constrainedTrackRect = constrainTrackRectToTrackPieces(scrollbar, tr
ackRect(scrollbar)); | 258 IntRect constrainedTrackRect = constrainTrackRectToTrackPieces(scrollbar, tr
ackRect(scrollbar)); |
| 259 return (scrollbar->orientation() == HorizontalScrollbar) ? constrainedTrackR
ect.width() : constrainedTrackRect.height(); | 259 return (scrollbar->orientation() == HorizontalScrollbar) ? constrainedTrackR
ect.width() : constrainedTrackRect.height(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 void ScrollbarThemeComposite::paintScrollCorner(ScrollView*, GraphicsContext* co
ntext, const IntRect& cornerRect) | 262 void ScrollbarThemeComposite::paintScrollCorner(ScrollView*, GraphicsContext* co
ntext, const IntRect& cornerRect) |
| 263 { | 263 { |
| 264 context->fillRect(cornerRect, Color::white, ColorSpaceDeviceRGB); | 264 context->fillRect(cornerRect, Color::white); |
| 265 } | 265 } |
| 266 | 266 |
| 267 IntRect ScrollbarThemeComposite::thumbRect(ScrollbarThemeClient* scrollbar) | 267 IntRect ScrollbarThemeComposite::thumbRect(ScrollbarThemeClient* scrollbar) |
| 268 { | 268 { |
| 269 if (!hasThumb(scrollbar)) | 269 if (!hasThumb(scrollbar)) |
| 270 return IntRect(); | 270 return IntRect(); |
| 271 | 271 |
| 272 IntRect track = trackRect(scrollbar); | 272 IntRect track = trackRect(scrollbar); |
| 273 IntRect startTrackRect; | 273 IntRect startTrackRect; |
| 274 IntRect thumbRect; | 274 IntRect thumbRect; |
| 275 IntRect endTrackRect; | 275 IntRect endTrackRect; |
| 276 splitTrack(scrollbar, track, startTrackRect, thumbRect, endTrackRect); | 276 splitTrack(scrollbar, track, startTrackRect, thumbRect, endTrackRect); |
| 277 | 277 |
| 278 return thumbRect; | 278 return thumbRect; |
| 279 } | 279 } |
| 280 | 280 |
| 281 void ScrollbarThemeComposite::paintOverhangAreas(ScrollView*, GraphicsContext* c
ontext, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRe
ct, const IntRect& dirtyRect) | 281 void ScrollbarThemeComposite::paintOverhangAreas(ScrollView*, GraphicsContext* c
ontext, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRe
ct, const IntRect& dirtyRect) |
| 282 { | 282 { |
| 283 context->setFillColor(Color::white, ColorSpaceDeviceRGB); | 283 context->setFillColor(Color::white); |
| 284 if (!horizontalOverhangRect.isEmpty()) | 284 if (!horizontalOverhangRect.isEmpty()) |
| 285 context->fillRect(intersection(horizontalOverhangRect, dirtyRect)); | 285 context->fillRect(intersection(horizontalOverhangRect, dirtyRect)); |
| 286 | |
| 287 context->setFillColor(Color::white, ColorSpaceDeviceRGB); | |
| 288 if (!verticalOverhangRect.isEmpty()) | 286 if (!verticalOverhangRect.isEmpty()) |
| 289 context->fillRect(intersection(verticalOverhangRect, dirtyRect)); | 287 context->fillRect(intersection(verticalOverhangRect, dirtyRect)); |
| 290 } | 288 } |
| 291 | 289 |
| 292 } | 290 } |
| OLD | NEW |