| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 523b1b97ef3b9a55f4f309df09e176cb10d260ba..cdcc039ab0e419b9c1d797d49e580f0575fb4748 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -1200,7 +1200,7 @@ void Document::setContentLanguage(const AtomicString& language)
|
| m_contentLanguage = language;
|
|
|
| // Document's style depends on the content language.
|
| - setNeedsStyleRecalc(SubtreeStyleChange);
|
| + setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::Language), SubtreeStyleChange);
|
| }
|
|
|
| void Document::setXMLVersion(const String& version, ExceptionState& exceptionState)
|
| @@ -1710,7 +1710,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(SubtreeStyleChange);
|
| + documentElement()->setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::FontSizeChange), SubtreeStyleChange);
|
| }
|
|
|
| EOverflow overflowX = OAUTO;
|
| @@ -1748,13 +1748,13 @@ void Document::inheritHtmlAndBodyElementStyles(StyleRecalcChange change)
|
| if (body) {
|
| if (RenderStyle* style = body->renderStyle()) {
|
| if (style->direction() != rootDirection || style->writingMode() != rootWritingMode)
|
| - body->setNeedsStyleRecalc(SubtreeStyleChange);
|
| + body->setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange), SubtreeStyleChange);
|
| }
|
| }
|
|
|
| if (RenderStyle* style = documentElement()->renderStyle()) {
|
| if (style->direction() != rootDirection || style->writingMode() != rootWritingMode)
|
| - documentElement()->setNeedsStyleRecalc(SubtreeStyleChange);
|
| + documentElement()->setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange), SubtreeStyleChange);
|
| }
|
| }
|
|
|
| @@ -1937,7 +1937,7 @@ void Document::updateLayout()
|
|
|
| void Document::setNeedsFocusedElementCheck()
|
| {
|
| - setNeedsStyleRecalc(LocalStyleChange);
|
| + setNeedsStyleRecalc(StyleChangeReasonForTracing::createWithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus), LocalStyleChange);
|
| }
|
|
|
| void Document::clearFocusedElementSoon()
|
| @@ -2063,7 +2063,7 @@ bool Document::dirtyElementsForLayerUpdate()
|
| return false;
|
|
|
| for (WillBeHeapHashSet<RawPtrWillBeMember<Element> >::iterator it = m_layerUpdateSVGFilterElements.begin(), end = m_layerUpdateSVGFilterElements.end(); it != end; ++it)
|
| - (*it)->setNeedsStyleRecalc(LocalStyleChange);
|
| + (*it)->setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::SVGFilterLayerUpdate), LocalStyleChange);
|
| m_layerUpdateSVGFilterElements.clear();
|
| return true;
|
| }
|
| @@ -3649,10 +3649,10 @@ SetFocusedElementDone:
|
| void Document::setCSSTarget(Element* newTarget)
|
| {
|
| if (m_cssTarget)
|
| - m_cssTarget->didAffectSelector(AffectedSelectorTarget);
|
| + m_cssTarget->didAffectSelector(StyleChangeReasonForTracing::createWithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Target), AffectedSelectorTarget);
|
| m_cssTarget = newTarget;
|
| if (m_cssTarget)
|
| - m_cssTarget->didAffectSelector(AffectedSelectorTarget);
|
| + m_cssTarget->didAffectSelector(StyleChangeReasonForTracing::createWithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Target), AffectedSelectorTarget);
|
| }
|
|
|
| void Document::registerNodeList(const LiveNodeListBase* list)
|
| @@ -4308,7 +4308,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(SubtreeStyleChange);
|
| + setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::VisuallyOrdered), SubtreeStyleChange);
|
| }
|
| }
|
|
|
| @@ -4470,7 +4470,7 @@ void Document::setDesignMode(InheritedBool value)
|
| continue;
|
| if (!toLocalFrame(frame)->document())
|
| break;
|
| - toLocalFrame(frame)->document()->setNeedsStyleRecalc(SubtreeStyleChange);
|
| + toLocalFrame(frame)->document()->setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReason::DesignMode), SubtreeStyleChange);
|
| }
|
| }
|
|
|
|
|