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

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

Issue 1373423003: Remove MediaController (already diabled by REF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update web-platform-tests expectations Created 5 years, 2 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
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 Image * image = !object.node()->isMediaControlElement() || mediaControlEleme ntType(object.node()) == MediaPlayButton ? mediaPlay : mediaPause; 156 Image * image = !object.node()->isMediaControlElement() || mediaControlEleme ntType(object.node()) == MediaPlayButton ? mediaPlay : mediaPause;
157 return paintMediaButton(paintInfo.context, rect, image); 157 return paintMediaButton(paintInfo.context, rect, image);
158 } 158 }
159 159
160 bool MediaControlsPainter::paintMediaOverlayPlayButton(const LayoutObject& objec t, const PaintInfo& paintInfo, const IntRect& rect) 160 bool MediaControlsPainter::paintMediaOverlayPlayButton(const LayoutObject& objec t, const PaintInfo& paintInfo, const IntRect& rect)
161 { 161 {
162 const HTMLMediaElement* mediaElement = toParentMediaElement(object); 162 const HTMLMediaElement* mediaElement = toParentMediaElement(object);
163 if (!mediaElement) 163 if (!mediaElement)
164 return false; 164 return false;
165 165
166 if (!hasSource(mediaElement) || !mediaElement->togglePlayStateWillPlay()) 166 if (!hasSource(mediaElement) || !mediaElement->paused())
167 return false; 167 return false;
168 168
169 static Image* mediaOverlayPlay = platformResource("mediaplayerOverlayPlay", 169 static Image* mediaOverlayPlay = platformResource("mediaplayerOverlayPlay",
170 "mediaplayerOverlayPlayNew"); 170 "mediaplayerOverlayPlayNew");
171 171
172 IntRect buttonRect(rect); 172 IntRect buttonRect(rect);
173 if (RuntimeEnabledFeatures::newMediaPlaybackUiEnabled()) { 173 if (RuntimeEnabledFeatures::newMediaPlaybackUiEnabled()) {
174 // Overlay play button covers the entire player, so center and draw a 174 // Overlay play button covers the entire player, so center and draw a
175 // smaller button. Center in the entire element. 175 // smaller button. Center in the entire element.
176 const LayoutBox* box = mediaElement->layoutObject()->enclosingBox(); 176 const LayoutBox* box = mediaElement->layoutObject()->enclosingBox();
(...skipping 393 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

Powered by Google App Engine
This is Rietveld 408576698