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

Side by Side Diff: Source/core/css/CSSDefaultStyleSheets.cpp

Issue 1156993013: New media playback UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: minor decrufting. Created 5 years, 5 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (element.namespaceURI() == MathMLNames::mathmlNamespaceURI 149 if (element.namespaceURI() == MathMLNames::mathmlNamespaceURI
150 && !m_mathmlStyleSheet) { 150 && !m_mathmlStyleSheet) {
151 m_mathmlStyleSheet = parseUASheet(loadResourceAsASCIIString("mathml.css" )); 151 m_mathmlStyleSheet = parseUASheet(loadResourceAsASCIIString("mathml.css" ));
152 m_defaultStyle->addRulesFromSheet(mathmlStyleSheet(), screenEval()); 152 m_defaultStyle->addRulesFromSheet(mathmlStyleSheet(), screenEval());
153 m_defaultPrintStyle->addRulesFromSheet(mathmlStyleSheet(), printEval()); 153 m_defaultPrintStyle->addRulesFromSheet(mathmlStyleSheet(), printEval());
154 changedDefaultStyle = true; 154 changedDefaultStyle = true;
155 } 155 }
156 156
157 // FIXME: We should assert that this sheet only contains rules for <video> a nd <audio>. 157 // FIXME: We should assert that this sheet only contains rules for <video> a nd <audio>.
158 if (!m_mediaControlsStyleSheet && (isHTMLVideoElement(element) || isHTMLAudi oElement(element))) { 158 if (!m_mediaControlsStyleSheet && (isHTMLVideoElement(element) || isHTMLAudi oElement(element))) {
159 String mediaRules = loadResourceAsASCIIString("mediaControls.css") + Lay outTheme::theme().extraMediaControlsStyleSheet(); 159 String mediaRules = loadResourceAsASCIIString(
160 RuntimeEnabledFeatures::newMediaPlaybackUiEnabled() ?
161 "mediaControlsNew.css" : "mediaControls.css") +
162 LayoutTheme::theme().extraMediaControlsStyleSheet();
160 m_mediaControlsStyleSheet = parseUASheet(mediaRules); 163 m_mediaControlsStyleSheet = parseUASheet(mediaRules);
161 m_defaultStyle->addRulesFromSheet(mediaControlsStyleSheet(), screenEval( )); 164 m_defaultStyle->addRulesFromSheet(mediaControlsStyleSheet(), screenEval( ));
162 m_defaultPrintStyle->addRulesFromSheet(mediaControlsStyleSheet(), printE val()); 165 m_defaultPrintStyle->addRulesFromSheet(mediaControlsStyleSheet(), printE val());
163 changedDefaultStyle = true; 166 changedDefaultStyle = true;
164 } 167 }
165 168
166 // FIXME: This only works because we Force recalc the entire document so the new sheet 169 // FIXME: This only works because we Force recalc the entire document so the new sheet
167 // is loaded for <html> and the correct styles apply to everyone. 170 // is loaded for <html> and the correct styles apply to everyone.
168 if (!m_fullscreenStyleSheet && Fullscreen::isFullScreen(element.document())) { 171 if (!m_fullscreenStyleSheet && Fullscreen::isFullScreen(element.document())) {
169 String fullscreenRules = loadResourceAsASCIIString("fullscreen.css") + L ayoutTheme::theme().extraFullScreenStyleSheet(); 172 String fullscreenRules = loadResourceAsASCIIString("fullscreen.css") + L ayoutTheme::theme().extraFullScreenStyleSheet();
(...skipping 18 matching lines...) Expand all
188 visitor->trace(m_defaultStyleSheet); 191 visitor->trace(m_defaultStyleSheet);
189 visitor->trace(m_mobileViewportStyleSheet); 192 visitor->trace(m_mobileViewportStyleSheet);
190 visitor->trace(m_quirksStyleSheet); 193 visitor->trace(m_quirksStyleSheet);
191 visitor->trace(m_svgStyleSheet); 194 visitor->trace(m_svgStyleSheet);
192 visitor->trace(m_mathmlStyleSheet); 195 visitor->trace(m_mathmlStyleSheet);
193 visitor->trace(m_mediaControlsStyleSheet); 196 visitor->trace(m_mediaControlsStyleSheet);
194 visitor->trace(m_fullscreenStyleSheet); 197 visitor->trace(m_fullscreenStyleSheet);
195 } 198 }
196 199
197 } // namespace blink 200 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698