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

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

Issue 861553003: Invalidate CustomScrollbars on having window-inactive selector. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 5 years, 11 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 | « Source/core/dom/StyleEngine.h ('k') | Source/core/frame/FrameView.cpp » ('j') | 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 StyleEngine::StyleEngine(Document& document) 55 StyleEngine::StyleEngine(Document& document)
56 : m_document(&document) 56 : m_document(&document)
57 , m_isMaster(!document.importsController() || document.importsController()-> master() == &document) 57 , m_isMaster(!document.importsController() || document.importsController()-> master() == &document)
58 , m_pendingStylesheets(0) 58 , m_pendingStylesheets(0)
59 , m_injectedStyleSheetCacheValid(false) 59 , m_injectedStyleSheetCacheValid(false)
60 , m_documentStyleSheetCollection(DocumentStyleSheetCollection::create(docume nt)) 60 , m_documentStyleSheetCollection(DocumentStyleSheetCollection::create(docume nt))
61 , m_documentScopeDirty(true) 61 , m_documentScopeDirty(true)
62 , m_usesSiblingRules(false) 62 , m_usesSiblingRules(false)
63 , m_usesFirstLineRules(false) 63 , m_usesFirstLineRules(false)
64 , m_usesWindowInactiveSelector(false)
64 , m_usesFirstLetterRules(false) 65 , m_usesFirstLetterRules(false)
65 , m_usesRemUnits(false) 66 , m_usesRemUnits(false)
66 , m_maxDirectAdjacentSelectors(0) 67 , m_maxDirectAdjacentSelectors(0)
67 , m_ignorePendingStylesheets(false) 68 , m_ignorePendingStylesheets(false)
68 , m_didCalculateResolver(false) 69 , m_didCalculateResolver(false)
69 // We don't need to create CSSFontSelector for imported document or 70 // We don't need to create CSSFontSelector for imported document or
70 // HTMLTemplateElement's document, because those documents have no frame. 71 // HTMLTemplateElement's document, because those documents have no frame.
71 , m_fontSelector(document.frame() ? CSSFontSelector::create(&document) : nul lptr) 72 , m_fontSelector(document.frame() ? CSSFontSelector::create(&document) : nul lptr)
72 { 73 {
73 if (m_fontSelector) 74 if (m_fontSelector)
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& StyleEngine::activeA uthorStyleSheets() const 211 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& StyleEngine::activeA uthorStyleSheets() const
211 { 212 {
212 return documentStyleSheetCollection()->activeAuthorStyleSheets(); 213 return documentStyleSheetCollection()->activeAuthorStyleSheets();
213 } 214 }
214 215
215 void StyleEngine::combineCSSFeatureFlags(const RuleFeatureSet& features) 216 void StyleEngine::combineCSSFeatureFlags(const RuleFeatureSet& features)
216 { 217 {
217 // Delay resetting the flags until after next style recalc since unapplying the style may not work without these set (this is true at least with before/afte r). 218 // Delay resetting the flags until after next style recalc since unapplying the style may not work without these set (this is true at least with before/afte r).
218 m_usesSiblingRules = m_usesSiblingRules || features.usesSiblingRules(); 219 m_usesSiblingRules = m_usesSiblingRules || features.usesSiblingRules();
219 m_usesFirstLineRules = m_usesFirstLineRules || features.usesFirstLineRules() ; 220 m_usesFirstLineRules = m_usesFirstLineRules || features.usesFirstLineRules() ;
221 m_usesWindowInactiveSelector = m_usesWindowInactiveSelector || features.uses WindowInactiveSelector();
220 m_maxDirectAdjacentSelectors = max(m_maxDirectAdjacentSelectors, features.ma xDirectAdjacentSelectors()); 222 m_maxDirectAdjacentSelectors = max(m_maxDirectAdjacentSelectors, features.ma xDirectAdjacentSelectors());
221 } 223 }
222 224
223 void StyleEngine::resetCSSFeatureFlags(const RuleFeatureSet& features) 225 void StyleEngine::resetCSSFeatureFlags(const RuleFeatureSet& features)
224 { 226 {
225 m_usesSiblingRules = features.usesSiblingRules(); 227 m_usesSiblingRules = features.usesSiblingRules();
226 m_usesFirstLineRules = features.usesFirstLineRules(); 228 m_usesFirstLineRules = features.usesFirstLineRules();
229 m_usesWindowInactiveSelector = features.usesWindowInactiveSelector();
227 m_maxDirectAdjacentSelectors = features.maxDirectAdjacentSelectors(); 230 m_maxDirectAdjacentSelectors = features.maxDirectAdjacentSelectors();
228 } 231 }
229 232
230 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& StyleEngine::injecte dAuthorStyleSheets() const 233 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& StyleEngine::injecte dAuthorStyleSheets() const
231 { 234 {
232 updateInjectedStyleSheetCache(); 235 updateInjectedStyleSheetCache();
233 return m_injectedAuthorStyleSheets; 236 return m_injectedAuthorStyleSheets;
234 } 237 }
235 238
236 void StyleEngine::updateInjectedStyleSheetCache() const 239 void StyleEngine::updateInjectedStyleSheetCache() const
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 visitor->trace(m_dirtyTreeScopes); 741 visitor->trace(m_dirtyTreeScopes);
739 visitor->trace(m_activeTreeScopes); 742 visitor->trace(m_activeTreeScopes);
740 visitor->trace(m_fontSelector); 743 visitor->trace(m_fontSelector);
741 visitor->trace(m_textToSheetCache); 744 visitor->trace(m_textToSheetCache);
742 visitor->trace(m_sheetToTextCache); 745 visitor->trace(m_sheetToTextCache);
743 #endif 746 #endif
744 CSSFontSelectorClient::trace(visitor); 747 CSSFontSelectorClient::trace(visitor);
745 } 748 }
746 749
747 } 750 }
OLDNEW
« no previous file with comments | « Source/core/dom/StyleEngine.h ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698