| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Google, Inc. | 3 * Copyright (C) 2008, 2009 Google, Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 trackInfo.bounds = IntRect(IntPoint(), inflatedRect.size()); | 217 trackInfo.bounds = IntRect(IntPoint(), inflatedRect.size()); |
| 218 trackInfo.min = 0; | 218 trackInfo.min = 0; |
| 219 trackInfo.max = std::numeric_limits<SInt32>::max(); | 219 trackInfo.max = std::numeric_limits<SInt32>::max(); |
| 220 trackInfo.value = lround(layoutProgress.position() * nextafter(trackInfo.max
, 0)); | 220 trackInfo.value = lround(layoutProgress.position() * nextafter(trackInfo.max
, 0)); |
| 221 trackInfo.trackInfo.progress.phase = lround(layoutProgress.animationProgress
() * nextafter(LayoutThemeMac::progressAnimationNumFrames, 0)); | 221 trackInfo.trackInfo.progress.phase = lround(layoutProgress.animationProgress
() * nextafter(LayoutThemeMac::progressAnimationNumFrames, 0)); |
| 222 trackInfo.attributes = kThemeTrackHorizontal; | 222 trackInfo.attributes = kThemeTrackHorizontal; |
| 223 trackInfo.enableState = LayoutTheme::isActive(layoutObject) ? kThemeTrackAct
ive : kThemeTrackInactive; | 223 trackInfo.enableState = LayoutTheme::isActive(layoutObject) ? kThemeTrackAct
ive : kThemeTrackInactive; |
| 224 trackInfo.reserved = 0; | 224 trackInfo.reserved = 0; |
| 225 trackInfo.filler1 = 0; | 225 trackInfo.filler1 = 0; |
| 226 | 226 |
| 227 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(inflatedRect.size()); | 227 std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::create(inflatedRect.
size()); |
| 228 if (!imageBuffer) | 228 if (!imageBuffer) |
| 229 return true; | 229 return true; |
| 230 | 230 |
| 231 IntRect clipRect = IntRect(IntPoint(), inflatedRect.size()); | 231 IntRect clipRect = IntRect(IntPoint(), inflatedRect.size()); |
| 232 LocalCurrentGraphicsContext localContext(imageBuffer->canvas(), 1, clipRect)
; | 232 LocalCurrentGraphicsContext localContext(imageBuffer->canvas(), 1, clipRect)
; |
| 233 CGContextRef cgContext = localContext.cgContext(); | 233 CGContextRef cgContext = localContext.cgContext(); |
| 234 HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal); | 234 HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal); |
| 235 | 235 |
| 236 GraphicsContextStateSaver stateSaver(paintInfo.context); | 236 GraphicsContextStateSaver stateSaver(paintInfo.context); |
| 237 | 237 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 paintInfo.context.rotate(deg2rad(-45.0)); | 541 paintInfo.context.rotate(deg2rad(-45.0)); |
| 542 paintInfo.context.translate(-centerX, -centerY); | 542 paintInfo.context.translate(-centerX, -centerY); |
| 543 | 543 |
| 544 paintInfo.context.setFillColor(fillColor); | 544 paintInfo.context.setFillColor(fillColor); |
| 545 paintInfo.context.fillEllipse(unzoomedRect); | 545 paintInfo.context.fillEllipse(unzoomedRect); |
| 546 | 546 |
| 547 return false; | 547 return false; |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace blink | 550 } // namespace blink |
| OLD | NEW |