Index: third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp |
diff --git a/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp b/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp |
index 18ba58984796f5d3acb34b5da28ad571275c78ab..24758d9950625ff98168b1b123620e30210467cd 100644 |
--- a/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp |
+++ b/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp |
@@ -165,20 +165,21 @@ void CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement(const Element& el |
changedDefaultStyle = true; |
} |
- // 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())) { |
- String fullscreenRules = loadResourceAsASCIIString("fullscreen.css") + LayoutTheme::theme().extraFullScreenStyleSheet(); |
- m_fullscreenStyleSheet = parseUASheet(fullscreenRules); |
- m_defaultStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEval()); |
- m_defaultQuirksStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEval()); |
- changedDefaultStyle = true; |
- } |
- |
ASSERT(!m_defaultStyle->features().hasIdsInSelectors()); |
ASSERT(m_defaultStyle->features().siblingRules.isEmpty()); |
} |
+void CSSDefaultStyleSheets::ensureDefaultStyleSheetForFullscreen() |
+{ |
+ if (m_fullscreenStyleSheet) |
+ return; |
+ |
+ String fullscreenRules = loadResourceAsASCIIString("fullscreen.css") + LayoutTheme::theme().extraFullScreenStyleSheet(); |
+ m_fullscreenStyleSheet = parseUASheet(fullscreenRules); |
+ m_defaultStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEval()); |
+ m_defaultQuirksStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEval()); |
+} |
+ |
DEFINE_TRACE(CSSDefaultStyleSheets) |
{ |
visitor->trace(m_defaultStyle); |