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

Unified Diff: Source/core/dom/Document.cpp

Issue 152623002: Make StyleChange parameter explicit in setNeedsStyleRecalc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/ContainerNode.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index cdd382a7a842fa2779fc69e6526bb5d53bca45f6..7d672b2e68635bcf09cf37269168a31018904262 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1186,7 +1186,7 @@ void Document::setContentLanguage(const AtomicString& language)
m_contentLanguage = language;
// Document's style depends on the content language.
- setNeedsStyleRecalc();
+ setNeedsStyleRecalc(SubtreeStyleChange);
}
void Document::setXMLVersion(const String& version, ExceptionState& exceptionState)
@@ -1682,7 +1682,7 @@ void Document::inheritHtmlAndBodyElementStyles(StyleRecalcChange change)
// rare and just invalidate the cache for now.
if (styleEngine()->usesRemUnits() && (documentElement()->needsAttach() || documentElement()->computedStyle()->fontSize() != documentElementStyle->fontSize())) {
ensureStyleResolver().invalidateMatchedPropertiesCache();
- documentElement()->setNeedsStyleRecalc();
+ documentElement()->setNeedsStyleRecalc(SubtreeStyleChange);
}
RefPtr<RenderStyle> documentStyle = renderView()->style();
@@ -1697,13 +1697,13 @@ void Document::inheritHtmlAndBodyElementStyles(StyleRecalcChange change)
if (body) {
if (RenderStyle* style = body->renderStyle()) {
if (style->direction() != rootDirection || style->writingMode() != rootWritingMode)
- body->setNeedsStyleRecalc();
+ body->setNeedsStyleRecalc(SubtreeStyleChange);
}
}
if (RenderStyle* style = documentElement()->renderStyle()) {
if (style->direction() != rootDirection || style->writingMode() != rootWritingMode)
- documentElement()->setNeedsStyleRecalc();
+ documentElement()->setNeedsStyleRecalc(SubtreeStyleChange);
}
}
@@ -3306,7 +3306,7 @@ void Document::styleResolverChanged(RecalcStyleTime updateTime, StyleResolverUpd
return;
m_evaluateMediaQueriesOnStyleRecalc = true;
- setNeedsStyleRecalc();
+ setNeedsStyleRecalc(SubtreeStyleChange);
if (updateTime == RecalcStyleImmediately)
updateStyleIfNeeded();
@@ -4118,7 +4118,7 @@ void Document::setEncodingData(const DocumentEncodingData& newData)
// FIXME: How is possible to not have a renderer here?
if (renderView())
renderView()->style()->setRTLOrdering(m_visuallyOrdered ? VisualOrder : LogicalOrder);
- setNeedsStyleRecalc();
+ setNeedsStyleRecalc(SubtreeStyleChange);
}
}
@@ -4278,7 +4278,7 @@ void Document::setDesignMode(InheritedBool value)
{
m_designMode = value;
for (Frame* frame = m_frame; frame && frame->document(); frame = frame->tree().traverseNext(m_frame))
- frame->document()->setNeedsStyleRecalc();
+ frame->document()->setNeedsStyleRecalc(SubtreeStyleChange);
}
Document::InheritedBool Document::getDesignMode() const
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698