Chromium Code Reviews| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 const LayoutObject& object, | 174 const LayoutObject& object, |
| 175 const PaintInfo& paint_info, | 175 const PaintInfo& paint_info, |
| 176 const IntRect& rect) { | 176 const IntRect& rect) { |
| 177 const HTMLMediaElement* media_element = ToParentMediaElement(object); | 177 const HTMLMediaElement* media_element = ToParentMediaElement(object); |
| 178 if (!media_element) | 178 if (!media_element) |
| 179 return false; | 179 return false; |
| 180 | 180 |
| 181 if (!HasSource(media_element) || !media_element->paused()) | 181 if (!HasSource(media_element) || !media_element->paused()) |
| 182 return false; | 182 return false; |
| 183 | 183 |
| 184 MediaControlPanelElement* panel_element = nullptr; | 184 // TODO(mlamouri): it might be possible to use the PanelLayoutOjbect() call |
|
chrishtr
2017/04/13 22:52:04
Nit: spelling
| |
| 185 // instead. | |
| 186 HTMLDivElement* panel_element = nullptr; | |
| 185 if (media_element->GetMediaControls()) | 187 if (media_element->GetMediaControls()) |
| 186 panel_element = media_element->GetMediaControls()->PanelElement(); | 188 panel_element = media_element->GetMediaControls()->PanelElement(); |
| 187 | 189 |
| 188 static Image* media_overlay_play = PlatformResource("mediaplayerOverlayPlay"); | 190 static Image* media_overlay_play = PlatformResource("mediaplayerOverlayPlay"); |
| 189 | 191 |
| 190 IntRect button_rect(rect); | 192 IntRect button_rect(rect); |
| 191 | 193 |
| 192 // Overlay play button covers the entire player, so center and draw a | 194 // Overlay play button covers the entire player, so center and draw a |
| 193 // smaller button. Center in the entire element. | 195 // smaller button. Center in the entire element. |
| 194 // TODO(liberato): object.enclosingBox()? | 196 // TODO(liberato): object.enclosingBox()? |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 610 void MediaControlsPainter::AdjustMediaSliderThumbSize(ComputedStyle& style) { | 612 void MediaControlsPainter::AdjustMediaSliderThumbSize(ComputedStyle& style) { |
| 611 const float zoom_level = style.EffectiveZoom(); | 613 const float zoom_level = style.EffectiveZoom(); |
| 612 | 614 |
| 613 style.SetWidth(Length( | 615 style.SetWidth(Length( |
| 614 static_cast<int>(kMediaSliderThumbTouchWidth * zoom_level), kFixed)); | 616 static_cast<int>(kMediaSliderThumbTouchWidth * zoom_level), kFixed)); |
| 615 style.SetHeight(Length( | 617 style.SetHeight(Length( |
| 616 static_cast<int>(kMediaSliderThumbTouchHeight * zoom_level), kFixed)); | 618 static_cast<int>(kMediaSliderThumbTouchHeight * zoom_level), kFixed)); |
| 617 } | 619 } |
| 618 | 620 |
| 619 } // namespace blink | 621 } // namespace blink |
| OLD | NEW |