OLD | NEW |
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 { | 141 { |
142 // FIXME: We should assert that the sheet only styles SVG elements. | 142 // FIXME: We should assert that the sheet only styles SVG elements. |
143 if (element->isSVGElement() && !m_svgStyleSheet) { | 143 if (element->isSVGElement() && !m_svgStyleSheet) { |
144 m_svgStyleSheet = parseUASheet(svgUserAgentStyleSheet, sizeof(svgUserAge
ntStyleSheet)); | 144 m_svgStyleSheet = parseUASheet(svgUserAgentStyleSheet, sizeof(svgUserAge
ntStyleSheet)); |
145 m_defaultStyle->addRulesFromSheet(svgStyleSheet(), screenEval()); | 145 m_defaultStyle->addRulesFromSheet(svgStyleSheet(), screenEval()); |
146 m_defaultPrintStyle->addRulesFromSheet(svgStyleSheet(), printEval()); | 146 m_defaultPrintStyle->addRulesFromSheet(svgStyleSheet(), printEval()); |
147 changedDefaultStyle = true; | 147 changedDefaultStyle = true; |
148 } | 148 } |
149 | 149 |
150 // FIXME: We should assert that this sheet only contains rules for <video> a
nd <audio>. | 150 // FIXME: We should assert that this sheet only contains rules for <video> a
nd <audio>. |
151 if (!m_mediaControlsStyleSheet && (element->hasTagName(videoTag) || element-
>hasTagName(audioTag))) { | 151 if (!m_mediaControlsStyleSheet && (isHTMLVideoElement(*element) || isHTMLAud
ioElement(*element))) { |
152 String mediaRules = String(mediaControlsUserAgentStyleSheet, sizeof(medi
aControlsUserAgentStyleSheet)) + RenderTheme::theme().extraMediaControlsStyleShe
et(); | 152 String mediaRules = String(mediaControlsUserAgentStyleSheet, sizeof(medi
aControlsUserAgentStyleSheet)) + RenderTheme::theme().extraMediaControlsStyleShe
et(); |
153 m_mediaControlsStyleSheet = parseUASheet(mediaRules); | 153 m_mediaControlsStyleSheet = parseUASheet(mediaRules); |
154 m_defaultStyle->addRulesFromSheet(mediaControlsStyleSheet(), screenEval(
)); | 154 m_defaultStyle->addRulesFromSheet(mediaControlsStyleSheet(), screenEval(
)); |
155 m_defaultPrintStyle->addRulesFromSheet(mediaControlsStyleSheet(), printE
val()); | 155 m_defaultPrintStyle->addRulesFromSheet(mediaControlsStyleSheet(), printE
val()); |
156 changedDefaultStyle = true; | 156 changedDefaultStyle = true; |
157 } | 157 } |
158 | 158 |
159 // FIXME: This only works because we Force recalc the entire document so the
new sheet | 159 // FIXME: This only works because we Force recalc the entire document so the
new sheet |
160 // is loaded for <html> and the correct styles apply to everyone. | 160 // is loaded for <html> and the correct styles apply to everyone. |
161 if (!m_fullscreenStyleSheet && FullscreenElementStack::isFullScreen(element-
>document())) { | 161 if (!m_fullscreenStyleSheet && FullscreenElementStack::isFullScreen(element-
>document())) { |
(...skipping 12 matching lines...) Expand all Loading... |
174 { | 174 { |
175 visitor->trace(m_defaultStyleSheet); | 175 visitor->trace(m_defaultStyleSheet); |
176 visitor->trace(m_viewportStyleSheet); | 176 visitor->trace(m_viewportStyleSheet); |
177 visitor->trace(m_quirksStyleSheet); | 177 visitor->trace(m_quirksStyleSheet); |
178 visitor->trace(m_svgStyleSheet); | 178 visitor->trace(m_svgStyleSheet); |
179 visitor->trace(m_mediaControlsStyleSheet); | 179 visitor->trace(m_mediaControlsStyleSheet); |
180 visitor->trace(m_fullscreenStyleSheet); | 180 visitor->trace(m_fullscreenStyleSheet); |
181 } | 181 } |
182 | 182 |
183 } // namespace WebCore | 183 } // namespace WebCore |
OLD | NEW |