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

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

Issue 1869773004: Move shadowCascadeOrder to Document from StyleEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ASSERT and insert DCHECK_NE Created 4 years, 8 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 if (!enabled) { 726 if (!enabled) {
727 m_styleResolverStats = nullptr; 727 m_styleResolverStats = nullptr;
728 return; 728 return;
729 } 729 }
730 if (!m_styleResolverStats) 730 if (!m_styleResolverStats)
731 m_styleResolverStats = StyleResolverStats::create(); 731 m_styleResolverStats = StyleResolverStats::create();
732 else 732 else
733 m_styleResolverStats->reset(); 733 m_styleResolverStats->reset();
734 } 734 }
735 735
736 void StyleEngine::setShadowCascadeOrder(ShadowCascadeOrder order)
737 {
738 DCHECK_NE(order, ShadowCascadeOrder::ShadowCascadeNone);
739
740 if (order == m_shadowCascadeOrder)
741 return;
742
743 if (order == ShadowCascadeOrder::ShadowCascadeV0)
744 m_mayContainV0Shadow = true;
745
746 // For V0 -> V1 upgrade, we need style recalculation for the whole document.
747 if (m_shadowCascadeOrder == ShadowCascadeOrder::ShadowCascadeV0 && order == ShadowCascadeOrder::ShadowCascadeV1)
748 document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForT racing::create(StyleChangeReason::Shadow));
749
750 if (order > m_shadowCascadeOrder)
751 m_shadowCascadeOrder = order;
752 }
753
754 void StyleEngine::setPreferredStylesheetSetNameIfNotSet(const String& name) 736 void StyleEngine::setPreferredStylesheetSetNameIfNotSet(const String& name)
755 { 737 {
756 if (!m_preferredStylesheetSetName.isEmpty()) 738 if (!m_preferredStylesheetSetName.isEmpty())
757 return; 739 return;
758 m_preferredStylesheetSetName = name; 740 m_preferredStylesheetSetName = name;
759 // TODO(rune@opera.com): Setting the selected set here is wrong if the set 741 // TODO(rune@opera.com): Setting the selected set here is wrong if the set
760 // has been previously set by through Document.selectedStylesheetSet. Our 742 // has been previously set by through Document.selectedStylesheetSet. Our
761 // current implementation ignores the effect of Document.selectedStylesheetS et 743 // current implementation ignores the effect of Document.selectedStylesheetS et
762 // and either only collects persistent style, or additionally preferred 744 // and either only collects persistent style, or additionally preferred
763 // style when present. We are currently not marking the document scope dirty 745 // style when present. We are currently not marking the document scope dirty
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 visitor->trace(m_styleInvalidator); 784 visitor->trace(m_styleInvalidator);
803 visitor->trace(m_dirtyTreeScopes); 785 visitor->trace(m_dirtyTreeScopes);
804 visitor->trace(m_activeTreeScopes); 786 visitor->trace(m_activeTreeScopes);
805 visitor->trace(m_fontSelector); 787 visitor->trace(m_fontSelector);
806 visitor->trace(m_textToSheetCache); 788 visitor->trace(m_textToSheetCache);
807 visitor->trace(m_sheetToTextCache); 789 visitor->trace(m_sheetToTextCache);
808 CSSFontSelectorClient::trace(visitor); 790 CSSFontSelectorClient::trace(visitor);
809 } 791 }
810 792
811 } // namespace blink 793 } // 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