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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 bool MediaControlsPainter::paintMediaOverflowMenu(const LayoutObject& object, co
nst PaintInfo& paintInfo, const IntRect& rect) | 607 bool MediaControlsPainter::paintMediaOverflowMenu(const LayoutObject& object, co
nst PaintInfo& paintInfo, const IntRect& rect) |
608 { | 608 { |
609 const HTMLMediaElement* mediaElement = toParentMediaElement(object); | 609 const HTMLMediaElement* mediaElement = toParentMediaElement(object); |
610 if (!mediaElement) | 610 if (!mediaElement) |
611 return false; | 611 return false; |
612 | 612 |
613 static Image* mediaOverflowButton = platformResource("mediaplayerOverflowMen
u"); | 613 static Image* mediaOverflowButton = platformResource("mediaplayerOverflowMen
u"); |
614 return paintMediaButton(paintInfo.context, rect, mediaOverflowButton); | 614 return paintMediaButton(paintInfo.context, rect, mediaOverflowButton); |
615 } | 615 } |
616 | 616 |
| 617 bool MediaControlsPainter::paintMediaDownloadIcon(const LayoutObject& object, co
nst PaintInfo& paintInfo, const IntRect& rect) |
| 618 { |
| 619 const HTMLMediaElement* mediaElement = toParentMediaElement(object); |
| 620 if (!mediaElement) |
| 621 return false; |
| 622 |
| 623 static Image* mediaDownloadIcon = platformResource("mediaplayerDownloadIcon"
); |
| 624 return paintMediaButton(paintInfo.context, rect, mediaDownloadIcon); |
| 625 } |
| 626 |
617 void MediaControlsPainter::adjustMediaSliderThumbSize(ComputedStyle& style) | 627 void MediaControlsPainter::adjustMediaSliderThumbSize(ComputedStyle& style) |
618 { | 628 { |
619 static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb", | 629 static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb", |
620 "mediaplayerSliderThumbNew"); | 630 "mediaplayerSliderThumbNew"); |
621 static Image* mediaVolumeSliderThumb = platformResource( | 631 static Image* mediaVolumeSliderThumb = platformResource( |
622 "mediaplayerVolumeSliderThumb", | 632 "mediaplayerVolumeSliderThumb", |
623 "mediaplayerVolumeSliderThumbNew"); | 633 "mediaplayerVolumeSliderThumbNew"); |
624 int width = 0; | 634 int width = 0; |
625 int height = 0; | 635 int height = 0; |
626 | 636 |
(...skipping 15 matching lines...) Expand all Loading... |
642 } | 652 } |
643 | 653 |
644 float zoomLevel = style.effectiveZoom(); | 654 float zoomLevel = style.effectiveZoom(); |
645 if (thumbImage) { | 655 if (thumbImage) { |
646 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); | 656 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); |
647 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); | 657 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); |
648 } | 658 } |
649 } | 659 } |
650 | 660 |
651 } // namespace blink | 661 } // namespace blink |
OLD | NEW |