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

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

Issue 804873003: Clear matched properties cache for theme color changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/page/Page.h » ('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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 void StyleEngine::fontsNeedUpdate(CSSFontSelector*) 666 void StyleEngine::fontsNeedUpdate(CSSFontSelector*)
667 { 667 {
668 if (!document().isActive()) 668 if (!document().isActive())
669 return; 669 return;
670 670
671 if (m_resolver) 671 if (m_resolver)
672 m_resolver->invalidateMatchedPropertiesCache(); 672 m_resolver->invalidateMatchedPropertiesCache();
673 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci ng::create(StyleChangeReason::Fonts)); 673 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci ng::create(StyleChangeReason::Fonts));
674 } 674 }
675 675
676 void StyleEngine::platformColorsChanged()
677 {
678 if (m_resolver)
679 m_resolver->invalidateMatchedPropertiesCache();
680 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci ng::create(StyleChangeReason::PlatformColorChange));
681 }
682
676 void StyleEngine::trace(Visitor* visitor) 683 void StyleEngine::trace(Visitor* visitor)
677 { 684 {
678 #if ENABLE(OILPAN) 685 #if ENABLE(OILPAN)
679 visitor->trace(m_document); 686 visitor->trace(m_document);
680 visitor->trace(m_injectedAuthorStyleSheets); 687 visitor->trace(m_injectedAuthorStyleSheets);
681 visitor->trace(m_authorStyleSheets); 688 visitor->trace(m_authorStyleSheets);
682 visitor->trace(m_documentStyleSheetCollection); 689 visitor->trace(m_documentStyleSheetCollection);
683 visitor->trace(m_styleSheetCollectionMap); 690 visitor->trace(m_styleSheetCollectionMap);
684 visitor->trace(m_resolver); 691 visitor->trace(m_resolver);
685 visitor->trace(m_fontSelector); 692 visitor->trace(m_fontSelector);
686 visitor->trace(m_textToSheetCache); 693 visitor->trace(m_textToSheetCache);
687 visitor->trace(m_sheetToTextCache); 694 visitor->trace(m_sheetToTextCache);
688 #endif 695 #endif
689 CSSFontSelectorClient::trace(visitor); 696 CSSFontSelectorClient::trace(visitor);
690 } 697 }
691 698
692 } 699 }
OLDNEW
« no previous file with comments | « Source/core/dom/StyleEngine.h ('k') | Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698