| 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 case MediaCastOffButton: | 534 case MediaCastOffButton: |
| 535 return paintMediaButton(paintInfo.context, rect, mediaCastOff, isEnabled
); | 535 return paintMediaButton(paintInfo.context, rect, mediaCastOff, isEnabled
); |
| 536 case MediaOverlayCastOffButton: | 536 case MediaOverlayCastOffButton: |
| 537 return paintMediaButton(paintInfo.context, rect, mediaOverlayCastOff); | 537 return paintMediaButton(paintInfo.context, rect, mediaOverlayCastOff); |
| 538 default: | 538 default: |
| 539 ASSERT_NOT_REACHED(); | 539 ASSERT_NOT_REACHED(); |
| 540 return false; | 540 return false; |
| 541 } | 541 } |
| 542 } | 542 } |
| 543 | 543 |
| 544 bool MediaControlsPainter::paintMediaTrackSelectionCheckmark(const LayoutObject&
object, const PaintInfo& paintInfo, const IntRect& rect) |
| 545 { |
| 546 const HTMLMediaElement* mediaElement = toParentMediaElement(object); |
| 547 if (!mediaElement) |
| 548 return false; |
| 549 |
| 550 static Image* mediaTrackSelectionCheckmark = platformResource("mediaplayerTr
ackSelectionCheckmark", |
| 551 "mediaplayerTrackSelectionCheckmarkNew"); |
| 552 return paintMediaButton(paintInfo.context, rect, mediaTrackSelectionCheckmar
k); |
| 553 } |
| 554 |
| 555 bool MediaControlsPainter::paintMediaClosedCaptionsIcon(const LayoutObject& obje
ct, const PaintInfo& paintInfo, const IntRect& rect) |
| 556 { |
| 557 const HTMLMediaElement* mediaElement = toParentMediaElement(object); |
| 558 if (!mediaElement) |
| 559 return false; |
| 560 |
| 561 static Image* mediaClosedCaptionsIcon = platformResource("mediaplayerClosedC
aptionsIcon", |
| 562 "mediaplayerClosedCaptionsIconNew"); |
| 563 return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionsIcon); |
| 564 } |
| 565 |
| 566 bool MediaControlsPainter::paintMediaSubtitlesIcon(const LayoutObject& object, c
onst PaintInfo& paintInfo, const IntRect& rect) |
| 567 { |
| 568 const HTMLMediaElement* mediaElement = toParentMediaElement(object); |
| 569 if (!mediaElement) |
| 570 return false; |
| 571 |
| 572 static Image* mediaSubtitlesIcon = platformResource("mediaplayerSubtitlesIco
n", |
| 573 "mediaplayerSubtitlesIconNew"); |
| 574 return paintMediaButton(paintInfo.context, rect, mediaSubtitlesIcon); |
| 575 } |
| 576 |
| 544 void MediaControlsPainter::adjustMediaSliderThumbSize(ComputedStyle& style) | 577 void MediaControlsPainter::adjustMediaSliderThumbSize(ComputedStyle& style) |
| 545 { | 578 { |
| 546 static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb", | 579 static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb", |
| 547 "mediaplayerSliderThumbNew"); | 580 "mediaplayerSliderThumbNew"); |
| 548 static Image* mediaVolumeSliderThumb = platformResource( | 581 static Image* mediaVolumeSliderThumb = platformResource( |
| 549 "mediaplayerVolumeSliderThumb", | 582 "mediaplayerVolumeSliderThumb", |
| 550 "mediaplayerVolumeSliderThumbNew"); | 583 "mediaplayerVolumeSliderThumbNew"); |
| 551 int width = 0; | 584 int width = 0; |
| 552 int height = 0; | 585 int height = 0; |
| 553 | 586 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 569 } | 602 } |
| 570 | 603 |
| 571 float zoomLevel = style.effectiveZoom(); | 604 float zoomLevel = style.effectiveZoom(); |
| 572 if (thumbImage) { | 605 if (thumbImage) { |
| 573 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); | 606 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); |
| 574 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); | 607 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); |
| 575 } | 608 } |
| 576 } | 609 } |
| 577 | 610 |
| 578 } // namespace blink | 611 } // namespace blink |
| OLD | NEW |