Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp

Issue 2982573002: A video tag should not highlight the play button and slider thumb when preload is disabled and not …
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698