Index: Source/core/css/CSSDefaultStyleSheets.cpp |
diff --git a/Source/core/css/CSSDefaultStyleSheets.cpp b/Source/core/css/CSSDefaultStyleSheets.cpp |
index 1a7a5653924e54395c4eafd8d9db4cae2c67bfbc..4b4f5aa698f294175ebb0a3f0c5905ade43e89f9 100644 |
--- a/Source/core/css/CSSDefaultStyleSheets.cpp |
+++ b/Source/core/css/CSSDefaultStyleSheets.cpp |
@@ -135,10 +135,10 @@ RuleSet* CSSDefaultStyleSheets::defaultMobileViewportStyle() |
return m_defaultMobileViewportStyle.get(); |
} |
-void CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement(Element* element, bool& changedDefaultStyle) |
+void CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement(const Element& element, bool& changedDefaultStyle) |
{ |
// FIXME: We should assert that the sheet only styles SVG elements. |
- if (element->isSVGElement() && !m_svgStyleSheet) { |
+ if (element.isSVGElement() && !m_svgStyleSheet) { |
m_svgStyleSheet = parseUASheet(loadResourceAsASCIIString("svg.css")); |
m_defaultStyle->addRulesFromSheet(svgStyleSheet(), screenEval()); |
m_defaultPrintStyle->addRulesFromSheet(svgStyleSheet(), printEval()); |
@@ -146,7 +146,7 @@ void CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement(Element* element, |
} |
// FIXME: We should assert that the sheet only styles MathML elements. |
- if (element->namespaceURI() == MathMLNames::mathmlNamespaceURI |
+ if (element.namespaceURI() == MathMLNames::mathmlNamespaceURI |
&& !m_mathmlStyleSheet) { |
m_mathmlStyleSheet = parseUASheet(loadResourceAsASCIIString("mathml.css")); |
m_defaultStyle->addRulesFromSheet(mathmlStyleSheet(), screenEval()); |
@@ -155,7 +155,7 @@ void CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement(Element* element, |
} |
// FIXME: We should assert that this sheet only contains rules for <video> and <audio>. |
- if (!m_mediaControlsStyleSheet && (isHTMLVideoElement(*element) || isHTMLAudioElement(*element))) { |
+ if (!m_mediaControlsStyleSheet && (isHTMLVideoElement(element) || isHTMLAudioElement(element))) { |
String mediaRules = loadResourceAsASCIIString("mediaControls.css") + LayoutTheme::theme().extraMediaControlsStyleSheet(); |
m_mediaControlsStyleSheet = parseUASheet(mediaRules); |
m_defaultStyle->addRulesFromSheet(mediaControlsStyleSheet(), screenEval()); |
@@ -165,7 +165,7 @@ void CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement(Element* element, |
// FIXME: This only works because we Force recalc the entire document so the new sheet |
// is loaded for <html> and the correct styles apply to everyone. |
- if (!m_fullscreenStyleSheet && Fullscreen::isFullScreen(element->document())) { |
+ if (!m_fullscreenStyleSheet && Fullscreen::isFullScreen(element.document())) { |
String fullscreenRules = loadResourceAsASCIIString("fullscreen.css") + LayoutTheme::theme().extraFullScreenStyleSheet(); |
m_fullscreenStyleSheet = parseUASheet(fullscreenRules); |
m_defaultStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEval()); |