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

Unified Diff: Source/core/css/invalidation/StyleInvalidator.cpp

Issue 624133003: Revert of [Invalidation Tracking] Trace StyleInvalidator setNeedsStyleRecalc (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
Index: Source/core/css/invalidation/StyleInvalidator.cpp
diff --git a/Source/core/css/invalidation/StyleInvalidator.cpp b/Source/core/css/invalidation/StyleInvalidator.cpp
index 9343d14e46f38c76573db3c000f068fb1b8b2ede..cefc3d7b17650398f523f56d1e6adc0d4ec46b8d 100644
--- a/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -13,7 +13,6 @@
#include "core/dom/ElementTraversal.h"
#include "core/dom/shadow/ElementShadow.h"
#include "core/dom/shadow/ShadowRoot.h"
-#include "core/inspector/InspectorTraceEvents.h"
#include "core/rendering/RenderObject.h"
namespace blink {
@@ -87,10 +86,8 @@
{
ASSERT(!m_wholeSubtreeInvalid);
- if (m_invalidateCustomPseudo && element.shadowPseudoId() != nullAtom) {
- TRACE_STYLE_INVALIDATOR_INVALIDATION(element, InvalidateCustomPseudo);
+ if (m_invalidateCustomPseudo && element.shadowPseudoId() != nullAtom)
return true;
- }
for (InvalidationSets::iterator it = m_invalidationSets.begin(); it != m_invalidationSets.end(); ++it) {
if ((*it)->invalidatesElement(element))
@@ -111,13 +108,9 @@
for (InvalidationList::const_iterator it = invalidationList->begin(); it != invalidationList->end(); ++it)
recursionData.pushInvalidationSet(**it);
// FIXME: It's really only necessary to clone the render style for this element, not full style recalc.
- TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"),
- "StyleInvalidatorInvalidationTracking",
- "data", InspectorStyleInvalidatorInvalidateEvent::invalidationList(element, *invalidationList));
return true;
}
}
-
return recursionData.matchesCurrentInvalidationSets(element);
}
@@ -155,12 +148,10 @@
element.setNeedsStyleRecalc(recursionData.wholeSubtreeInvalid() ? SubtreeStyleChange : LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator));
} else if (recursionData.hasInvalidationSets() && someChildrenNeedStyleRecalc) {
// Clone the RenderStyle in order to preserve correct style sharing, if possible. Otherwise recalc style.
- if (RenderObject* renderer = element.renderer()) {
+ if (RenderObject* renderer = element.renderer())
renderer->setStyleInternal(RenderStyle::clone(renderer->style()));
- } else {
- TRACE_STYLE_INVALIDATOR_INVALIDATION(element, PreventStyleSharingForParent);
+ else
element.setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator));
- }
}
element.clearChildNeedsStyleInvalidation();
« no previous file with comments | « Source/core/css/invalidation/DescendantInvalidationSet.cpp ('k') | Source/core/inspector/InspectorTraceEvents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698