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

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

Issue 1159833003: New SELECT Popup: Recalc style when a web font is loaded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 5 years, 6 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 | Annotate | Revision Log
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 if (!document().isActive()) 671 if (!document().isActive())
672 return; 672 return;
673 673
674 if (m_resolver) 674 if (m_resolver)
675 m_resolver->invalidateMatchedPropertiesCache(); 675 m_resolver->invalidateMatchedPropertiesCache();
676 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci ng::create(StyleChangeReason::Fonts)); 676 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci ng::create(StyleChangeReason::Fonts));
677 } 677 }
678 678
679 void StyleEngine::setFontSelector(PassRefPtrWillBeRawPtr<CSSFontSelector> fontSe lector) 679 void StyleEngine::setFontSelector(PassRefPtrWillBeRawPtr<CSSFontSelector> fontSe lector)
680 { 680 {
681 #if !ENABLE(OILPAN)
682 if (m_fontSelector)
683 m_fontSelector->unregisterForInvalidationCallbacks(this);
684 #endif
681 m_fontSelector = fontSelector; 685 m_fontSelector = fontSelector;
686 if (m_fontSelector)
687 m_fontSelector->registerForInvalidationCallbacks(this);
682 } 688 }
683 689
684 void StyleEngine::platformColorsChanged() 690 void StyleEngine::platformColorsChanged()
685 { 691 {
686 if (m_resolver) 692 if (m_resolver)
687 m_resolver->invalidateMatchedPropertiesCache(); 693 m_resolver->invalidateMatchedPropertiesCache();
688 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci ng::create(StyleChangeReason::PlatformColorChange)); 694 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci ng::create(StyleChangeReason::PlatformColorChange));
689 } 695 }
690 696
691 void StyleEngine::classChangedForElement(const SpaceSplitString& changedClasses, Element& element) 697 void StyleEngine::classChangedForElement(const SpaceSplitString& changedClasses, Element& element)
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 visitor->trace(m_dirtyTreeScopes); 792 visitor->trace(m_dirtyTreeScopes);
787 visitor->trace(m_activeTreeScopes); 793 visitor->trace(m_activeTreeScopes);
788 visitor->trace(m_fontSelector); 794 visitor->trace(m_fontSelector);
789 visitor->trace(m_textToSheetCache); 795 visitor->trace(m_textToSheetCache);
790 visitor->trace(m_sheetToTextCache); 796 visitor->trace(m_sheetToTextCache);
791 #endif 797 #endif
792 CSSFontSelectorClient::trace(visitor); 798 CSSFontSelectorClient::trace(visitor);
793 } 799 }
794 800
795 } 801 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698