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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2361733004: Adding @keyframes rules only affects TreeScope plus host. (Closed)
Patch Set: Moved scope check to CSSAnimations Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 10 matching lines...) Expand all
21 * 21 *
22 * You should have received a copy of the GNU Library General Public License 22 * You should have received a copy of the GNU Library General Public License
23 * along with this library; see the file COPYING.LIB. If not, write to 23 * along with this library; see the file COPYING.LIB. If not, write to
24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 * Boston, MA 02110-1301, USA. 25 * Boston, MA 02110-1301, USA.
26 */ 26 */
27 27
28 #include "core/dom/StyleEngine.h" 28 #include "core/dom/StyleEngine.h"
29 29
30 #include "core/HTMLNames.h" 30 #include "core/HTMLNames.h"
31 #include "core/animation/DocumentTimeline.h"
32 #include "core/css/CSSDefaultStyleSheets.h" 31 #include "core/css/CSSDefaultStyleSheets.h"
33 #include "core/css/CSSFontSelector.h" 32 #include "core/css/CSSFontSelector.h"
34 #include "core/css/CSSStyleSheet.h" 33 #include "core/css/CSSStyleSheet.h"
35 #include "core/css/FontFaceCache.h" 34 #include "core/css/FontFaceCache.h"
36 #include "core/css/StyleSheetContents.h" 35 #include "core/css/StyleSheetContents.h"
37 #include "core/css/invalidation/InvalidationSet.h" 36 #include "core/css/invalidation/InvalidationSet.h"
38 #include "core/css/resolver/ScopedStyleResolver.h" 37 #include "core/css/resolver/ScopedStyleResolver.h"
39 #include "core/dom/DocumentStyleSheetCollector.h" 38 #include "core/dom/DocumentStyleSheetCollector.h"
40 #include "core/dom/Element.h" 39 #include "core/dom/Element.h"
41 #include "core/dom/ElementTraversal.h" 40 #include "core/dom/ElementTraversal.h"
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 871
873 void StyleEngine::ensureFullscreenUAStyle() 872 void StyleEngine::ensureFullscreenUAStyle()
874 { 873 {
875 CSSDefaultStyleSheets::instance().ensureDefaultStyleSheetForFullscreen(); 874 CSSDefaultStyleSheets::instance().ensureDefaultStyleSheetForFullscreen();
876 if (!m_resolver) 875 if (!m_resolver)
877 return; 876 return;
878 if (!m_resolver->hasFullscreenUAStyle()) 877 if (!m_resolver->hasFullscreenUAStyle())
879 m_resolver->resetRuleFeatures(); 878 m_resolver->resetRuleFeatures();
880 } 879 }
881 880
882 void StyleEngine::keyframesRulesAdded()
883 {
884 if (m_hasUnresolvedKeyframesRule) {
885 m_hasUnresolvedKeyframesRule = false;
886 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForT racing::create(StyleChangeReason::StyleSheetChange));
887 return;
888 }
889
890 document().timeline().invalidateKeyframeEffects();
891 }
892
893 DEFINE_TRACE(StyleEngine) 881 DEFINE_TRACE(StyleEngine)
894 { 882 {
895 visitor->trace(m_document); 883 visitor->trace(m_document);
896 visitor->trace(m_injectedAuthorStyleSheets); 884 visitor->trace(m_injectedAuthorStyleSheets);
897 visitor->trace(m_inspectorStyleSheet); 885 visitor->trace(m_inspectorStyleSheet);
898 visitor->trace(m_documentStyleSheetCollection); 886 visitor->trace(m_documentStyleSheetCollection);
899 visitor->trace(m_styleSheetCollectionMap); 887 visitor->trace(m_styleSheetCollectionMap);
900 visitor->trace(m_resolver); 888 visitor->trace(m_resolver);
901 visitor->trace(m_styleInvalidator); 889 visitor->trace(m_styleInvalidator);
902 visitor->trace(m_dirtyTreeScopes); 890 visitor->trace(m_dirtyTreeScopes);
903 visitor->trace(m_activeTreeScopes); 891 visitor->trace(m_activeTreeScopes);
904 visitor->trace(m_fontSelector); 892 visitor->trace(m_fontSelector);
905 visitor->trace(m_textToSheetCache); 893 visitor->trace(m_textToSheetCache);
906 visitor->trace(m_sheetToTextCache); 894 visitor->trace(m_sheetToTextCache);
907 CSSFontSelectorClient::trace(visitor); 895 CSSFontSelectorClient::trace(visitor);
908 } 896 }
909 897
910 DEFINE_TRACE_WRAPPERS(StyleEngine) 898 DEFINE_TRACE_WRAPPERS(StyleEngine)
911 { 899 {
912 for (auto sheet : m_injectedAuthorStyleSheets) { 900 for (auto sheet : m_injectedAuthorStyleSheets) {
913 visitor->traceWrappers(sheet); 901 visitor->traceWrappers(sheet);
914 } 902 }
915 visitor->traceWrappers(m_documentStyleSheetCollection); 903 visitor->traceWrappers(m_documentStyleSheetCollection);
916 } 904 }
917 905
918 } // namespace blink 906 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698