| 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 16 matching lines...) Expand all Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "config.h" | 29 #include "config.h" |
| 30 #include "core/css/CSSDefaultStyleSheets.h" | 30 #include "core/css/CSSDefaultStyleSheets.h" |
| 31 | 31 |
| 32 #include "core/MathMLNames.h" | 32 #include "core/MathMLNames.h" |
| 33 #include "core/UserAgentStyleSheets.h" | 33 #include "core/UserAgentStyleSheets.h" |
| 34 #include "core/css/MediaQueryEvaluator.h" | 34 #include "core/css/MediaQueryEvaluator.h" |
| 35 #include "core/css/RuleSet.h" | 35 #include "core/css/RuleSet.h" |
| 36 #include "core/css/StyleSheetContents.h" | 36 #include "core/css/StyleSheetContents.h" |
| 37 #include "core/dom/FullscreenElementStack.h" | 37 #include "core/dom/Fullscreen.h" |
| 38 #include "core/html/HTMLAnchorElement.h" | 38 #include "core/html/HTMLAnchorElement.h" |
| 39 #include "core/html/HTMLHtmlElement.h" | 39 #include "core/html/HTMLHtmlElement.h" |
| 40 #include "core/rendering/RenderTheme.h" | 40 #include "core/rendering/RenderTheme.h" |
| 41 #include "wtf/LeakAnnotations.h" | 41 #include "wtf/LeakAnnotations.h" |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 using namespace HTMLNames; | 45 using namespace HTMLNames; |
| 46 | 46 |
| 47 CSSDefaultStyleSheets& CSSDefaultStyleSheets::instance() | 47 CSSDefaultStyleSheets& CSSDefaultStyleSheets::instance() |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 if (!m_mediaControlsStyleSheet && (isHTMLVideoElement(*element) || isHTMLAud
ioElement(*element))) { | 173 if (!m_mediaControlsStyleSheet && (isHTMLVideoElement(*element) || isHTMLAud
ioElement(*element))) { |
| 174 String mediaRules = String(mediaControlsCss, sizeof(mediaControlsCss)) +
RenderTheme::theme().extraMediaControlsStyleSheet(); | 174 String mediaRules = String(mediaControlsCss, sizeof(mediaControlsCss)) +
RenderTheme::theme().extraMediaControlsStyleSheet(); |
| 175 m_mediaControlsStyleSheet = parseUASheet(mediaRules); | 175 m_mediaControlsStyleSheet = parseUASheet(mediaRules); |
| 176 m_defaultStyle->addRulesFromSheet(mediaControlsStyleSheet(), screenEval(
)); | 176 m_defaultStyle->addRulesFromSheet(mediaControlsStyleSheet(), screenEval(
)); |
| 177 m_defaultPrintStyle->addRulesFromSheet(mediaControlsStyleSheet(), printE
val()); | 177 m_defaultPrintStyle->addRulesFromSheet(mediaControlsStyleSheet(), printE
val()); |
| 178 changedDefaultStyle = true; | 178 changedDefaultStyle = true; |
| 179 } | 179 } |
| 180 | 180 |
| 181 // FIXME: This only works because we Force recalc the entire document so the
new sheet | 181 // FIXME: This only works because we Force recalc the entire document so the
new sheet |
| 182 // is loaded for <html> and the correct styles apply to everyone. | 182 // is loaded for <html> and the correct styles apply to everyone. |
| 183 if (!m_fullscreenStyleSheet && FullscreenElementStack::isFullScreen(element-
>document())) { | 183 if (!m_fullscreenStyleSheet && Fullscreen::isFullScreen(element->document())
) { |
| 184 String fullscreenRules = String(fullscreenCss, sizeof(fullscreenCss)) +
RenderTheme::theme().extraFullScreenStyleSheet(); | 184 String fullscreenRules = String(fullscreenCss, sizeof(fullscreenCss)) +
RenderTheme::theme().extraFullScreenStyleSheet(); |
| 185 m_fullscreenStyleSheet = parseUASheet(fullscreenRules); | 185 m_fullscreenStyleSheet = parseUASheet(fullscreenRules); |
| 186 m_defaultStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEval()); | 186 m_defaultStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEval()); |
| 187 m_defaultQuirksStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEv
al()); | 187 m_defaultQuirksStyle->addRulesFromSheet(fullscreenStyleSheet(), screenEv
al()); |
| 188 changedDefaultStyle = true; | 188 changedDefaultStyle = true; |
| 189 } | 189 } |
| 190 | 190 |
| 191 ASSERT(!m_defaultStyle->features().hasIdsInSelectors()); | 191 ASSERT(!m_defaultStyle->features().hasIdsInSelectors()); |
| 192 ASSERT(m_defaultStyle->features().siblingRules.isEmpty()); | 192 ASSERT(m_defaultStyle->features().siblingRules.isEmpty()); |
| 193 } | 193 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 204 visitor->trace(m_defaultStyleSheet); | 204 visitor->trace(m_defaultStyleSheet); |
| 205 visitor->trace(m_viewportStyleSheet); | 205 visitor->trace(m_viewportStyleSheet); |
| 206 visitor->trace(m_quirksStyleSheet); | 206 visitor->trace(m_quirksStyleSheet); |
| 207 visitor->trace(m_svgStyleSheet); | 207 visitor->trace(m_svgStyleSheet); |
| 208 visitor->trace(m_mathmlStyleSheet); | 208 visitor->trace(m_mathmlStyleSheet); |
| 209 visitor->trace(m_mediaControlsStyleSheet); | 209 visitor->trace(m_mediaControlsStyleSheet); |
| 210 visitor->trace(m_fullscreenStyleSheet); | 210 visitor->trace(m_fullscreenStyleSheet); |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace blink | 213 } // namespace blink |
| OLD | NEW |