| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 if (Image* image = Image::LoadPlatformResource(name).LeakRef()) { | 67 if (Image* image = Image::LoadPlatformResource(name).LeakRef()) { |
| 68 g_media_control_image_map->Set(name, image); | 68 g_media_control_image_map->Set(name, image); |
| 69 return image; | 69 return image; |
| 70 } | 70 } |
| 71 NOTREACHED(); | 71 NOTREACHED(); |
| 72 return 0; | 72 return 0; |
| 73 } | 73 } |
| 74 | 74 |
| 75 static bool HasSource(const HTMLMediaElement* media_element) { | 75 static bool HasSource(const HTMLMediaElement* media_element) { |
| 76 return media_element->getNetworkState() != HTMLMediaElement::kNetworkEmpty && | 76 return media_element->getNetworkState() != HTMLMediaElement::kNetworkEmpty && |
| 77 media_element->getNetworkState() != HTMLMediaElement::kNetworkNoSource; | 77 media_element->getNetworkState() != |
| 78 HTMLMediaElement::kNetworkNoSource && |
| 79 media_element->getNetworkState() != HTMLMediaElement::kNetworkIdle; |
| 78 } | 80 } |
| 79 | 81 |
| 80 static FloatRect AdjustRectForPadding(IntRect rect, | 82 static FloatRect AdjustRectForPadding(IntRect rect, |
| 81 const LayoutObject* object) { | 83 const LayoutObject* object) { |
| 82 FloatRect adjusted_rect(rect); | 84 FloatRect adjusted_rect(rect); |
| 83 | 85 |
| 84 if (!object) | 86 if (!object) |
| 85 return adjusted_rect; | 87 return adjusted_rect; |
| 86 | 88 |
| 87 // TODO(liberato): make this more elegant, crbug.com/598861 . | 89 // TODO(liberato): make this more elegant, crbug.com/598861 . |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 void MediaControlsPainter::AdjustMediaSliderThumbSize(ComputedStyle& style) { | 625 void MediaControlsPainter::AdjustMediaSliderThumbSize(ComputedStyle& style) { |
| 624 const float zoom_level = style.EffectiveZoom(); | 626 const float zoom_level = style.EffectiveZoom(); |
| 625 | 627 |
| 626 style.SetWidth(Length( | 628 style.SetWidth(Length( |
| 627 static_cast<int>(kMediaSliderThumbTouchWidth * zoom_level), kFixed)); | 629 static_cast<int>(kMediaSliderThumbTouchWidth * zoom_level), kFixed)); |
| 628 style.SetHeight(Length( | 630 style.SetHeight(Length( |
| 629 static_cast<int>(kMediaSliderThumbTouchHeight * zoom_level), kFixed)); | 631 static_cast<int>(kMediaSliderThumbTouchHeight * zoom_level), kFixed)); |
| 630 } | 632 } |
| 631 | 633 |
| 632 } // namespace blink | 634 } // namespace blink |
| OLD | NEW |