OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. | 2 * Copyright (C) 2009 Apple Inc. |
3 * Copyright (C) 2009 Google Inc. | 3 * Copyright (C) 2009 Google Inc. |
4 * All rights reserved. | 4 * All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 gradient->addColorStop(0.0, startColor); | 240 gradient->addColorStop(0.0, startColor); |
241 gradient->addColorStop(1.0, endColor); | 241 gradient->addColorStop(1.0, endColor); |
242 | 242 |
243 // Fill highlight rectangle with gradient, potentially rounded if on left or
right edge. | 243 // Fill highlight rectangle with gradient, potentially rounded if on left or
right edge. |
244 context->save(); | 244 context->save(); |
245 context->setFillGradient(gradient); | 245 context->setFillGradient(gradient); |
246 | 246 |
247 if (startOffset < borderRadius && endOffset < borderRadius) | 247 if (startOffset < borderRadius && endOffset < borderRadius) |
248 context->fillRoundedRect(FloatRoundedRect(highlightRect, radii, radii, r
adii, radii), startColor); | 248 context->fillRoundedRect(FloatRoundedRect(highlightRect, radii, radii, r
adii, radii), startColor); |
249 else if (startOffset < borderRadius) | 249 else if (startOffset < borderRadius) |
250 context->fillRoundedRect(FloatRoundedRect(highlightRect, radii, IntSize(
0, 0), radii, IntSize(0, 0)), startColor); | 250 context->fillRoundedRect(FloatRoundedRect(highlightRect, radii, FloatSiz
e(0, 0), radii, FloatSize(0, 0)), startColor); |
251 else if (endOffset < borderRadius) | 251 else if (endOffset < borderRadius) |
252 context->fillRoundedRect(FloatRoundedRect(highlightRect, IntSize(0, 0),
radii, IntSize(0, 0), radii), startColor); | 252 context->fillRoundedRect(FloatRoundedRect(highlightRect, FloatSize(0, 0)
, radii, FloatSize(0, 0), radii), startColor); |
253 else | 253 else |
254 context->fillRect(highlightRect); | 254 context->fillRect(highlightRect); |
255 | 255 |
256 context->restore(); | 256 context->restore(); |
257 } | 257 } |
258 | 258 |
259 bool MediaControlsPainter::paintMediaSlider(const LayoutObject& object, const Pa
intInfo& paintInfo, const IntRect& rect) | 259 bool MediaControlsPainter::paintMediaSlider(const LayoutObject& object, const Pa
intInfo& paintInfo, const IntRect& rect) |
260 { | 260 { |
261 const HTMLMediaElement* mediaElement = toParentMediaElement(object); | 261 const HTMLMediaElement* mediaElement = toParentMediaElement(object); |
262 if (!mediaElement) | 262 if (!mediaElement) |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 } | 570 } |
571 | 571 |
572 float zoomLevel = style.effectiveZoom(); | 572 float zoomLevel = style.effectiveZoom(); |
573 if (thumbImage) { | 573 if (thumbImage) { |
574 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); | 574 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); |
575 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); | 575 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); |
576 } | 576 } |
577 } | 577 } |
578 | 578 |
579 } // namespace blink | 579 } // namespace blink |
OLD | NEW |