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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp

Issue 2431583004: Media Controls: don't activate buttons when tapping on hidden controls. (Closed)
Patch Set: review comments Created 4 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) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 setIsWanted(false); 167 setIsWanted(false);
168 168
169 stopTimer(); 169 stopTimer();
170 } 170 }
171 171
172 void MediaControlPanelElement::didBecomeVisible() { 172 void MediaControlPanelElement::didBecomeVisible() {
173 DCHECK(m_isDisplayed && m_opaque); 173 DCHECK(m_isDisplayed && m_opaque);
174 mediaElement().mediaControlsDidBecomeVisible(); 174 mediaElement().mediaControlsDidBecomeVisible();
175 } 175 }
176 176
177 bool MediaControlPanelElement::isOpaque() const {
178 return m_opaque;
179 }
180
177 void MediaControlPanelElement::makeOpaque() { 181 void MediaControlPanelElement::makeOpaque() {
178 if (m_opaque) 182 if (m_opaque)
179 return; 183 return;
180 184
181 setInlineStyleProperty(CSSPropertyOpacity, 1.0, 185 setInlineStyleProperty(CSSPropertyOpacity, 1.0,
182 CSSPrimitiveValue::UnitType::Number); 186 CSSPrimitiveValue::UnitType::Number);
183 m_opaque = true; 187 m_opaque = true;
184 188
185 if (m_isDisplayed) { 189 if (m_isDisplayed) {
186 setIsWanted(true); 190 setIsWanted(true);
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 MediaControlCurrentTimeDisplayElement* 1032 MediaControlCurrentTimeDisplayElement*
1029 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) { 1033 MediaControlCurrentTimeDisplayElement::create(MediaControls& mediaControls) {
1030 MediaControlCurrentTimeDisplayElement* element = 1034 MediaControlCurrentTimeDisplayElement* element =
1031 new MediaControlCurrentTimeDisplayElement(mediaControls); 1035 new MediaControlCurrentTimeDisplayElement(mediaControls);
1032 element->setShadowPseudoId( 1036 element->setShadowPseudoId(
1033 AtomicString("-webkit-media-controls-current-time-display")); 1037 AtomicString("-webkit-media-controls-current-time-display"));
1034 return element; 1038 return element;
1035 } 1039 }
1036 1040
1037 } // namespace blink 1041 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698