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

Unified Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 208933003: Remove SiblingRuleHelper (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tighten types to ContainerNode Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.h ('k') | Source/core/dom/shadow/ShadowRootRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
-}
-
}
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.h ('k') | Source/core/dom/shadow/ShadowRootRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698