| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |