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

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

Issue 1757503002: Re-collect rule features for watched selectors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 { 239 {
240 if (!node->inDocument()) 240 if (!node->inDocument())
241 return; 241 return;
242 242
243 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume nt; 243 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume nt;
244 ASSERT(isStyleElement(*node) || treeScope == m_document); 244 ASSERT(isStyleElement(*node) || treeScope == m_document);
245 markTreeScopeDirty(treeScope); 245 markTreeScopeDirty(treeScope);
246 resolverChanged(FullStyleUpdate); 246 resolverChanged(FullStyleUpdate);
247 } 247 }
248 248
249 void StyleEngine::watchedSelectorsChanged()
250 {
251 if (m_resolver) {
252 m_resolver->initWatchedSelectorRules();
253 m_resolver->resetRuleFeatures();
254 }
255 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci ng::create(StyleChangeReason::DeclarativeContent));
256 }
257
249 bool StyleEngine::shouldUpdateDocumentStyleSheetCollection(StyleResolverUpdateMo de updateMode) const 258 bool StyleEngine::shouldUpdateDocumentStyleSheetCollection(StyleResolverUpdateMo de updateMode) const
250 { 259 {
251 return m_documentScopeDirty || updateMode == FullStyleUpdate; 260 return m_documentScopeDirty || updateMode == FullStyleUpdate;
252 } 261 }
253 262
254 bool StyleEngine::shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdate Mode updateMode) const 263 bool StyleEngine::shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdate Mode updateMode) const
255 { 264 {
256 return !m_dirtyTreeScopes.isEmpty() || updateMode == FullStyleUpdate; 265 return !m_dirtyTreeScopes.isEmpty() || updateMode == FullStyleUpdate;
257 } 266 }
258 267
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 visitor->trace(m_dirtyTreeScopes); 744 visitor->trace(m_dirtyTreeScopes);
736 visitor->trace(m_activeTreeScopes); 745 visitor->trace(m_activeTreeScopes);
737 visitor->trace(m_fontSelector); 746 visitor->trace(m_fontSelector);
738 visitor->trace(m_textToSheetCache); 747 visitor->trace(m_textToSheetCache);
739 visitor->trace(m_sheetToTextCache); 748 visitor->trace(m_sheetToTextCache);
740 #endif 749 #endif
741 CSSFontSelectorClient::trace(visitor); 750 CSSFontSelectorClient::trace(visitor);
742 } 751 }
743 752
744 } // namespace blink 753 } // 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