Commit 2112ff87 authored by sigbjornf@opera.com's avatar sigbjornf@opera.com

Oilpan: fix build after r201058.

TBR=oilpan-reviews
BUG=522860
NOTRY=true

Review URL: https://codereview.chromium.org/1303953005

git-svn-id: svn://svn.chromium.org/blink/trunk@201060 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 741c9ed2
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
namespace blink { namespace blink {
StyleSheetInvalidationAnalysis::StyleSheetInvalidationAnalysis(const TreeScope& treeScope, const WillBeHeapVector<RawPtrWillBeMember<StyleSheetContents>>& sheets) StyleSheetInvalidationAnalysis::StyleSheetInvalidationAnalysis(const TreeScope& treeScope, const WillBeHeapVector<RawPtrWillBeMember<StyleSheetContents>>& sheets)
: m_treeScope(treeScope) : m_treeScope(&treeScope)
{ {
for (unsigned i = 0; i < sheets.size() && !m_dirtiesAllStyle; ++i) for (unsigned i = 0; i < sheets.size() && !m_dirtiesAllStyle; ++i)
analyzeStyleSheet(sheets[i]); analyzeStyleSheet(sheets[i]);
...@@ -139,7 +139,7 @@ void StyleSheetInvalidationAnalysis::analyzeStyleSheet(StyleSheetContents* style ...@@ -139,7 +139,7 @@ void StyleSheetInvalidationAnalysis::analyzeStyleSheet(StyleSheetContents* style
return; return;
} }
if (m_treeScope.rootNode().isShadowRoot()) { if (m_treeScope->rootNode().isShadowRoot()) {
if (hasDistributedRule(styleSheetContents)) if (hasDistributedRule(styleSheetContents))
m_hasDistributedRules = true; m_hasDistributedRules = true;
return; return;
...@@ -189,8 +189,8 @@ void StyleSheetInvalidationAnalysis::invalidateStyle() ...@@ -189,8 +189,8 @@ void StyleSheetInvalidationAnalysis::invalidateStyle()
{ {
ASSERT(!m_dirtiesAllStyle); ASSERT(!m_dirtiesAllStyle);
if (m_treeScope.rootNode().isShadowRoot()) { if (m_treeScope->rootNode().isShadowRoot()) {
ContainerNode* invalidationRoot = &m_treeScope.rootNode(); ContainerNode* invalidationRoot = &m_treeScope->rootNode();
if (m_hasDistributedRules) if (m_hasDistributedRules)
invalidationRoot = outermostShadowHost(*toShadowRoot(invalidationRoot)); invalidationRoot = outermostShadowHost(*toShadowRoot(invalidationRoot));
invalidationRoot->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange)); invalidationRoot->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange));
...@@ -199,7 +199,7 @@ void StyleSheetInvalidationAnalysis::invalidateStyle() ...@@ -199,7 +199,7 @@ void StyleSheetInvalidationAnalysis::invalidateStyle()
if (m_idScopes.isEmpty() && m_classScopes.isEmpty()) if (m_idScopes.isEmpty() && m_classScopes.isEmpty())
return; return;
Element* element = ElementTraversal::firstWithin(m_treeScope.document()); Element* element = ElementTraversal::firstWithin(m_treeScope->document());
while (element) { while (element) {
if (elementMatchesSelectorScopes(element, m_idScopes, m_classScopes)) { if (elementMatchesSelectorScopes(element, m_idScopes, m_classScopes)) {
element->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange)); element->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange));
......
...@@ -50,7 +50,7 @@ private: ...@@ -50,7 +50,7 @@ private:
void analyzeStyleSheet(StyleSheetContents*); void analyzeStyleSheet(StyleSheetContents*);
const TreeScope& m_treeScope; RawPtrWillBeMember<const TreeScope> m_treeScope;
HashSet<StringImpl*> m_idScopes; HashSet<StringImpl*> m_idScopes;
HashSet<StringImpl*> m_classScopes; HashSet<StringImpl*> m_classScopes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment