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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |