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

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

Issue 2314403004: MediaControls Accessibility: update sliders grey color to a darker shade. (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/platform/mac-mac10.9/media/video-zoom-controls-expected.png ('k') | 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 369
370 if (currentPosition > startPosition) 370 if (currentPosition > startPosition)
371 paintSliderRangeHighlight(rect, style, context, startPosition, curre ntPosition, startColor, endColor); 371 paintSliderRangeHighlight(rect, style, context, startPosition, curre ntPosition, startColor, endColor);
372 372
373 // Draw grey-ish highlight after current time. 373 // Draw grey-ish highlight after current time.
374 if (!useNewUi) { 374 if (!useNewUi) {
375 startColor = Color(60, 60, 60); 375 startColor = Color(60, 60, 60);
376 endColor = Color(76, 76, 76); 376 endColor = Color(76, 76, 76);
377 } else { 377 } else {
378 startColor = endColor = Color(0x9f, 0x9f, 0x9f); // light grey. 378 startColor = endColor = Color(0x5a, 0x5a, 0x5a); // dark grey
379 } 379 }
380 380
381 if (endPosition > currentPosition) 381 if (endPosition > currentPosition)
382 paintSliderRangeHighlight(rect, style, context, currentPosition, end Position, startColor, endColor); 382 paintSliderRangeHighlight(rect, style, context, currentPosition, end Position, startColor, endColor);
383 383
384 return; 384 return;
385 } 385 }
386 } 386 }
387 387
388 void MediaControlsPainter::adjustMediaSliderThumbPaintSize(const IntRect& rect, const ComputedStyle& style, IntRect& rectOut) 388 void MediaControlsPainter::adjustMediaSliderThumbPaintSize(const IntRect& rect, const ComputedStyle& style, IntRect& rectOut)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 return false; 434 return false;
435 435
436 GraphicsContext& context = paintInfo.context; 436 GraphicsContext& context = paintInfo.context;
437 const ComputedStyle& style = object.styleRef(); 437 const ComputedStyle& style = object.styleRef();
438 438
439 // Paint the slider bar. 439 // Paint the slider bar.
440 Color sliderBackgroundColor; 440 Color sliderBackgroundColor;
441 if (!RuntimeEnabledFeatures::newMediaPlaybackUiEnabled()) 441 if (!RuntimeEnabledFeatures::newMediaPlaybackUiEnabled())
442 sliderBackgroundColor = Color(11, 11, 11); 442 sliderBackgroundColor = Color(11, 11, 11);
443 else 443 else
444 sliderBackgroundColor = Color(0x9f, 0x9f, 0x9f); 444 sliderBackgroundColor = Color(0x5a, 0x5a, 0x5a); // dark grey
445 paintRoundedSliderBackground(rect, style, context, sliderBackgroundColor); 445 paintRoundedSliderBackground(rect, style, context, sliderBackgroundColor);
446 446
447 // Calculate volume position for white background rectangle. 447 // Calculate volume position for white background rectangle.
448 float volume = mediaElement->volume(); 448 float volume = mediaElement->volume();
449 if (std::isnan(volume) || volume < 0) 449 if (std::isnan(volume) || volume < 0)
450 return true; 450 return true;
451 if (volume > 1) 451 if (volume > 1)
452 volume = 1; 452 volume = 1;
453 if (!hasSource(mediaElement) || !mediaElement->hasAudio() || mediaElement->m uted()) 453 if (!hasSource(mediaElement) || !mediaElement->hasAudio() || mediaElement->m uted())
454 volume = 0; 454 volume = 0;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 } 632 }
633 633
634 float zoomLevel = style.effectiveZoom(); 634 float zoomLevel = style.effectiveZoom();
635 if (thumbImage) { 635 if (thumbImage) {
636 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); 636 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed));
637 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); 637 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed));
638 } 638 }
639 } 639 }
640 640
641 } // namespace blink 641 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/mac-mac10.9/media/video-zoom-controls-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698