Index: Source/core/dom/shadow/ShadowRoot.cpp |
diff --git a/Source/core/dom/shadow/ShadowRoot.cpp b/Source/core/dom/shadow/ShadowRoot.cpp |
index 736858e7c689cee2c4cfe56999fce030dd6d6e2f..bbe536bd8dcbc74cd20f13ad4dcdf25841459d18 100644 |
--- a/Source/core/dom/shadow/ShadowRoot.cpp |
+++ b/Source/core/dom/shadow/ShadowRoot.cpp |
@@ -31,7 +31,6 @@ |
#include "core/css/StyleSheetList.h" |
#include "core/css/resolver/StyleResolver.h" |
#include "core/dom/ElementTraversal.h" |
-#include "core/dom/SiblingRuleHelper.h" |
#include "core/dom/StyleEngine.h" |
#include "core/dom/Text.h" |
#include "core/dom/shadow/ElementShadow.h" |
@@ -147,8 +146,8 @@ void ShadowRoot::recalcStyle(StyleRecalcChange change) |
if (styleChangeType() >= SubtreeStyleChange) |
change = Force; |
- if (change < Force && childNeedsStyleRecalc()) |
- SiblingRuleHelper(this).checkForChildrenAdjacentRuleChanges(); |
+ if (change < Force && hasRareData() && childNeedsStyleRecalc()) |
+ checkForChildrenAdjacentRuleChanges(); |
// There's no style to update so just calling recalcStyle means we're updated. |
clearNeedsStyleRecalc(); |
@@ -383,81 +382,4 @@ StyleSheetList* ShadowRoot::styleSheets() |
return m_shadowRootRareData->styleSheets(); |
} |
-bool ShadowRoot::childrenSupportStyleSharing() const |
-{ |
- if (!m_shadowRootRareData) |
- return false; |
- return !m_shadowRootRareData->childrenAffectedByFirstChildRules() |
- && !m_shadowRootRareData->childrenAffectedByLastChildRules() |
- && !m_shadowRootRareData->childrenAffectedByDirectAdjacentRules() |
- && !m_shadowRootRareData->childrenAffectedByIndirectAdjacentRules() |
- && !m_shadowRootRareData->childrenAffectedByForwardPositionalRules() |
- && !m_shadowRootRareData->childrenAffectedByBackwardPositionalRules(); |
-} |
- |
-bool ShadowRoot::childrenAffectedByPositionalRules() const |
-{ |
- return m_shadowRootRareData && (m_shadowRootRareData->childrenAffectedByForwardPositionalRules() || m_shadowRootRareData->childrenAffectedByBackwardPositionalRules()); |
-} |
- |
-bool ShadowRoot::childrenAffectedByFirstChildRules() const |
-{ |
- return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByFirstChildRules(); |
-} |
- |
-bool ShadowRoot::childrenAffectedByLastChildRules() const |
-{ |
- return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByLastChildRules(); |
-} |
- |
-bool ShadowRoot::childrenAffectedByDirectAdjacentRules() const |
-{ |
- return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByDirectAdjacentRules(); |
-} |
- |
-bool ShadowRoot::childrenAffectedByIndirectAdjacentRules() const |
-{ |
- return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByIndirectAdjacentRules(); |
-} |
- |
-bool ShadowRoot::childrenAffectedByForwardPositionalRules() const |
-{ |
- return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByForwardPositionalRules(); |
-} |
- |
-bool ShadowRoot::childrenAffectedByBackwardPositionalRules() const |
-{ |
- return m_shadowRootRareData && m_shadowRootRareData->childrenAffectedByBackwardPositionalRules(); |
-} |
- |
-void ShadowRoot::setChildrenAffectedByForwardPositionalRules() |
-{ |
- ensureShadowRootRareData()->setChildrenAffectedByForwardPositionalRules(true); |
-} |
- |
-void ShadowRoot::setChildrenAffectedByDirectAdjacentRules() |
-{ |
- ensureShadowRootRareData()->setChildrenAffectedByDirectAdjacentRules(true); |
-} |
- |
-void ShadowRoot::setChildrenAffectedByIndirectAdjacentRules() |
-{ |
- ensureShadowRootRareData()->setChildrenAffectedByIndirectAdjacentRules(true); |
-} |
- |
-void ShadowRoot::setChildrenAffectedByBackwardPositionalRules() |
-{ |
- ensureShadowRootRareData()->setChildrenAffectedByBackwardPositionalRules(true); |
-} |
- |
-void ShadowRoot::setChildrenAffectedByFirstChildRules() |
-{ |
- ensureShadowRootRareData()->setChildrenAffectedByFirstChildRules(true); |
-} |
- |
-void ShadowRoot::setChildrenAffectedByLastChildRules() |
-{ |
- ensureShadowRootRareData()->setChildrenAffectedByLastChildRules(true); |
-} |
- |
} |