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

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

Issue 1334703002: NOT FOR LANDING Pass URL to Image::draw (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « Source/core/paint/ListMarkerPainter.cpp ('k') | Source/core/paint/NinePieceImagePainter.cpp » ('j') | 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 static bool paintMediaButton(GraphicsContext* context, const IntRect& rect, Imag e* image, bool isEnabled = true) 92 static bool paintMediaButton(GraphicsContext* context, const IntRect& rect, Imag e* image, bool isEnabled = true)
93 { 93 {
94 if (!RuntimeEnabledFeatures::newMediaPlaybackUiEnabled()) 94 if (!RuntimeEnabledFeatures::newMediaPlaybackUiEnabled())
95 isEnabled = true; // New UI only. 95 isEnabled = true; // New UI only.
96 96
97 if (!isEnabled) 97 if (!isEnabled)
98 context->beginLayer(kDisabledAlpha); 98 context->beginLayer(kDisabledAlpha);
99 99
100 context->drawImage(image, rect); 100 context->drawImage(image, rect, KURL()); // TODO(davve): empty url
101 101
102 if (!isEnabled) 102 if (!isEnabled)
103 context->endLayer(); 103 context->endLayer();
104 104
105 return true; 105 return true;
106 } 106 }
107 107
108 bool MediaControlsPainter::paintMediaMuteButton(LayoutObject* object, const Pain tInfo& paintInfo, const IntRect& rect) 108 bool MediaControlsPainter::paintMediaMuteButton(LayoutObject* object, const Pain tInfo& paintInfo, const IntRect& rect)
109 { 109 {
110 HTMLMediaElement* mediaElement = toParentMediaElement(object); 110 HTMLMediaElement* mediaElement = toParentMediaElement(object);
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 } 570 }
571 571
572 float zoomLevel = style.effectiveZoom(); 572 float zoomLevel = style.effectiveZoom();
573 if (thumbImage) { 573 if (thumbImage) {
574 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed)); 574 style.setWidth(Length(static_cast<int>(width * zoomLevel), Fixed));
575 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed)); 575 style.setHeight(Length(static_cast<int>(height * zoomLevel), Fixed));
576 } 576 }
577 } 577 }
578 578
579 } // namespace blink 579 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ListMarkerPainter.cpp ('k') | Source/core/paint/NinePieceImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698