Commit 40acbaa8 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Remove paint invalidation tracking from devtools

Paint invalidation tracking was a good feature. It shows paint
invalidation events in timeline and indicates the reasons (not generic
reasons like "style", "layout", but specific reasons that can link to
the javascript code etc.) However it has a problem that we often fail
to match paint invalidation events to other invalidation events by
node ids to find the reasons, and discard these events. This is
because the paint invalidation caused by style or layout change on
one node may not happen on that node, but on other nodes. This problem
makes the feature incorrect in many cases, and it's hard to fix.
We could show paint invalidation events without specific reasons,
but I doubt how much value that would provide to web developers.

So I'm removing the feature to avoid the maintenance burden.

Change-Id: I2de2135dbb69041683bac49242b5e9bb6484ee02
Bug: 410701
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1661690Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670239}
parent b00478d5
...@@ -3324,6 +3324,10 @@ void LocalFrameView::SetTracksPaintInvalidations( ...@@ -3324,6 +3324,10 @@ void LocalFrameView::SetTracksPaintInvalidations(
void LocalFrameView::TrackObjectPaintInvalidation( void LocalFrameView::TrackObjectPaintInvalidation(
const DisplayItemClient& client, const DisplayItemClient& client,
PaintInvalidationReason reason) { PaintInvalidationReason reason) {
TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"),
"InvalidateDisplayItemClient", TRACE_EVENT_SCOPE_GLOBAL,
"client", client.DebugName().Utf8(), "reason",
PaintInvalidationReasonToString(reason));
if (!tracked_object_paint_invalidations_) if (!tracked_object_paint_invalidations_)
return; return;
......
...@@ -717,19 +717,6 @@ std::unique_ptr<TracedValue> inspector_layout_invalidation_tracking_event::Data( ...@@ -717,19 +717,6 @@ std::unique_ptr<TracedValue> inspector_layout_invalidation_tracking_event::Data(
return value; return value;
} }
std::unique_ptr<TracedValue> inspector_paint_invalidation_tracking_event::Data(
const LayoutObject& layout_object) {
auto value = std::make_unique<TracedValue>();
value->SetString("frame",
IdentifiersFactory::FrameId(layout_object.GetFrame()));
const auto* paint_container =
layout_object.IsRooted() ? &layout_object.ContainerForPaintInvalidation()
: nullptr;
SetGeneratingNodeInfo(value.get(), paint_container, "paintId");
SetGeneratingNodeInfo(value.get(), &layout_object, "nodeId", "nodeName");
return value;
}
std::unique_ptr<TracedValue> inspector_change_resource_priority_event::Data( std::unique_ptr<TracedValue> inspector_change_resource_priority_event::Data(
DocumentLoader* loader, DocumentLoader* loader,
uint64_t identifier, uint64_t identifier,
...@@ -1009,35 +996,6 @@ static void LocalToPageQuad(const LayoutObject& layout_object, ...@@ -1009,35 +996,6 @@ static void LocalToPageQuad(const LayoutObject& layout_object,
quad->SetP4(LocalCoordToFloatPoint(view, absolute.P4())); quad->SetP4(LocalCoordToFloatPoint(view, absolute.P4()));
} }
const char inspector_layer_invalidation_tracking_event::
kSquashingLayerGeometryWasUpdated[] =
"Squashing layer geometry was updated";
const char
inspector_layer_invalidation_tracking_event::kAddedToSquashingLayer[] =
"The layer may have been added to an already-existing squashing layer";
const char
inspector_layer_invalidation_tracking_event::kRemovedFromSquashingLayer[] =
"Removed the layer from a squashing layer";
const char
inspector_layer_invalidation_tracking_event::kReflectionLayerChanged[] =
"Reflection layer change";
const char inspector_layer_invalidation_tracking_event::kNewCompositedLayer[] =
"Assigned a new composited layer";
std::unique_ptr<TracedValue> inspector_layer_invalidation_tracking_event::Data(
const PaintLayer* layer,
const char* reason) {
const LayoutObject& paint_invalidation_container =
layer->GetLayoutObject().ContainerForPaintInvalidation();
auto value = std::make_unique<TracedValue>();
value->SetString("frame", IdentifiersFactory::FrameId(
paint_invalidation_container.GetFrame()));
SetGeneratingNodeInfo(value.get(), &paint_invalidation_container, "paintId");
value->SetString("reason", reason);
return value;
}
std::unique_ptr<TracedValue> inspector_paint_event::Data( std::unique_ptr<TracedValue> inspector_paint_event::Data(
LayoutObject* layout_object, LayoutObject* layout_object,
const PhysicalRect& clip_rect, const PhysicalRect& clip_rect,
......
...@@ -60,7 +60,6 @@ class LayoutObject; ...@@ -60,7 +60,6 @@ class LayoutObject;
class LocalFrame; class LocalFrame;
class LocalFrameView; class LocalFrameView;
class Node; class Node;
class PaintLayer;
struct PhysicalRect; struct PhysicalRect;
class QualifiedName; class QualifiedName;
class Resource; class Resource;
...@@ -261,10 +260,6 @@ std::unique_ptr<TracedValue> CORE_EXPORT ...@@ -261,10 +260,6 @@ std::unique_ptr<TracedValue> CORE_EXPORT
Data(const LayoutObject*, LayoutInvalidationReasonForTracing); Data(const LayoutObject*, LayoutInvalidationReasonForTracing);
} }
namespace inspector_paint_invalidation_tracking_event {
std::unique_ptr<TracedValue> Data(const LayoutObject&);
}
namespace inspector_change_resource_priority_event { namespace inspector_change_resource_priority_event {
std::unique_ptr<TracedValue> Data(DocumentLoader*, std::unique_ptr<TracedValue> Data(DocumentLoader*,
uint64_t identifier, uint64_t identifier,
...@@ -355,22 +350,6 @@ namespace inspector_xhr_load_event { ...@@ -355,22 +350,6 @@ namespace inspector_xhr_load_event {
std::unique_ptr<TracedValue> Data(ExecutionContext*, XMLHttpRequest*); std::unique_ptr<TracedValue> Data(ExecutionContext*, XMLHttpRequest*);
} }
namespace inspector_layer_invalidation_tracking_event {
extern const char kSquashingLayerGeometryWasUpdated[];
extern const char kAddedToSquashingLayer[];
extern const char kRemovedFromSquashingLayer[];
extern const char kReflectionLayerChanged[];
extern const char kNewCompositedLayer[];
std::unique_ptr<TracedValue> Data(const PaintLayer*, const char* reason);
} // namespace inspector_layer_invalidation_tracking_event
#define TRACE_LAYER_INVALIDATION(LAYER, REASON) \
TRACE_EVENT_INSTANT1( \
TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), \
"LayerInvalidationTracking", TRACE_EVENT_SCOPE_THREAD, "data", \
inspector_layer_invalidation_tracking_event::Data((LAYER), (REASON)));
namespace inspector_paint_event { namespace inspector_paint_event {
std::unique_ptr<TracedValue> Data(LayoutObject*, std::unique_ptr<TracedValue> Data(LayoutObject*,
const PhysicalRect& clip_rect, const PhysicalRect& clip_rect,
......
...@@ -1118,10 +1118,6 @@ void CompositedLayerMapping::UpdateSquashingLayerGeometry( ...@@ -1118,10 +1118,6 @@ void CompositedLayerMapping::UpdateSquashingLayerGeometry(
layers[i].offset_from_layout_object != new_offset_from_layout_object) { layers[i].offset_from_layout_object != new_offset_from_layout_object) {
ObjectPaintInvalidator(layers[i].paint_layer->GetLayoutObject()) ObjectPaintInvalidator(layers[i].paint_layer->GetLayoutObject())
.InvalidatePaintIncludingNonCompositingDescendants(); .InvalidatePaintIncludingNonCompositingDescendants();
TRACE_LAYER_INVALIDATION(layers[i].paint_layer,
inspector_layer_invalidation_tracking_event::
kSquashingLayerGeometryWasUpdated);
layers_needing_paint_invalidation.push_back(layers[i].paint_layer); layers_needing_paint_invalidation.push_back(layers[i].paint_layer);
} }
layers[i].offset_from_layout_object = new_offset_from_layout_object; layers[i].offset_from_layout_object = new_offset_from_layout_object;
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "third_party/blink/renderer/core/animation/scroll_timeline.h" #include "third_party/blink/renderer/core/animation/scroll_timeline.h"
#include "third_party/blink/renderer/core/animation/worklet_animation_controller.h" #include "third_party/blink/renderer/core/animation/worklet_animation_controller.h"
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
#include "third_party/blink/renderer/core/layout/layout_view.h" #include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/page/page.h" #include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.h" #include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.h"
...@@ -252,9 +251,6 @@ void CompositingLayerAssigner::UpdateSquashingAssignment( ...@@ -252,9 +251,6 @@ void CompositingLayerAssigner::UpdateSquashingAssignment(
// Issue a paint invalidation, since |layer| may have been added to an // Issue a paint invalidation, since |layer| may have been added to an
// already-existing squashing layer. // already-existing squashing layer.
TRACE_LAYER_INVALIDATION(
layer,
inspector_layer_invalidation_tracking_event::kAddedToSquashingLayer);
layers_needing_paint_invalidation.push_back(layer); layers_needing_paint_invalidation.push_back(layer);
layers_changed_ = true; layers_changed_ = true;
} else if (composited_layer_update == kRemoveFromSquashingLayer) { } else if (composited_layer_update == kRemoveFromSquashingLayer) {
...@@ -270,9 +266,6 @@ void CompositingLayerAssigner::UpdateSquashingAssignment( ...@@ -270,9 +266,6 @@ void CompositingLayerAssigner::UpdateSquashingAssignment(
// If we need to issue paint invalidations, do so now that we've removed it // If we need to issue paint invalidations, do so now that we've removed it
// from a squashed layer. // from a squashed layer.
TRACE_LAYER_INVALIDATION(layer,
inspector_layer_invalidation_tracking_event::
kRemovedFromSquashingLayer);
layers_needing_paint_invalidation.push_back(layer); layers_needing_paint_invalidation.push_back(layer);
layers_changed_ = true; layers_changed_ = true;
...@@ -303,9 +296,6 @@ void CompositingLayerAssigner::AssignLayersToBackingsInternal( ...@@ -303,9 +296,6 @@ void CompositingLayerAssigner::AssignLayersToBackingsInternal(
if (compositor_->AllocateOrClearCompositedLayerMapping( if (compositor_->AllocateOrClearCompositedLayerMapping(
layer, composited_layer_update)) { layer, composited_layer_update)) {
TRACE_LAYER_INVALIDATION(
layer,
inspector_layer_invalidation_tracking_event::kNewCompositedLayer);
layers_needing_paint_invalidation.push_back(layer); layers_needing_paint_invalidation.push_back(layer);
layers_changed_ = true; layers_changed_ = true;
if (ScrollingCoordinator* scrolling_coordinator = if (ScrollingCoordinator* scrolling_coordinator =
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "third_party/blink/renderer/core/paint/compositing/graphics_layer_updater.h" #include "third_party/blink/renderer/core/paint/compositing/graphics_layer_updater.h"
#include "third_party/blink/renderer/core/html/media/html_media_element.h" #include "third_party/blink/renderer/core/html/media/html_media_element.h"
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
#include "third_party/blink/renderer/core/layout/layout_block.h" #include "third_party/blink/renderer/core/layout/layout_block.h"
#include "third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.h" #include "third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.h"
#include "third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h" #include "third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h"
......
...@@ -172,18 +172,6 @@ void ObjectPaintInvalidator:: ...@@ -172,18 +172,6 @@ void ObjectPaintInvalidator::
Helper::Traverse(object_); Helper::Traverse(object_);
} }
namespace {
bool IsClientNGPaintFragmentForObject(const DisplayItemClient& client,
const LayoutObject& object) {
if (!RuntimeEnabledFeatures::LayoutNGEnabled())
return false;
// TODO(crbug.com/880519): This hack only makes current invalidation tracking
// web tests pass with LayoutNG. More work is needed if we want to launch
// the invalidation tracking feature.
return &client == object.PaintFragment();
}
} // namespace
void ObjectPaintInvalidator::InvalidateDisplayItemClient( void ObjectPaintInvalidator::InvalidateDisplayItemClient(
const DisplayItemClient& client, const DisplayItemClient& client,
PaintInvalidationReason reason) { PaintInvalidationReason reason) {
...@@ -193,14 +181,6 @@ void ObjectPaintInvalidator::InvalidateDisplayItemClient( ...@@ -193,14 +181,6 @@ void ObjectPaintInvalidator::InvalidateDisplayItemClient(
// reduce the cost. // reduce the cost.
DCHECK(!object_.PaintingLayer() || object_.PaintingLayer()->NeedsRepaint()); DCHECK(!object_.PaintingLayer() || object_.PaintingLayer()->NeedsRepaint());
if (&client == &object_ ||
IsClientNGPaintFragmentForObject(client, object_)) {
TRACE_EVENT_INSTANT1(
TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"),
"PaintInvalidationTracking", TRACE_EVENT_SCOPE_THREAD, "data",
inspector_paint_invalidation_tracking_event::Data(object_));
}
client.Invalidate(reason); client.Invalidate(reason);
if (LocalFrameView* frame_view = object_.GetFrameView()) if (LocalFrameView* frame_view = object_.GetFrameView())
......
...@@ -726,8 +726,6 @@ TimelineModel.TimelineModel = class { ...@@ -726,8 +726,6 @@ TimelineModel.TimelineModel = class {
case recordTypes.StyleRecalcInvalidationTracking: case recordTypes.StyleRecalcInvalidationTracking:
case recordTypes.StyleInvalidatorInvalidationTracking: case recordTypes.StyleInvalidatorInvalidationTracking:
case recordTypes.LayoutInvalidationTracking: case recordTypes.LayoutInvalidationTracking:
case recordTypes.LayerInvalidationTracking:
case recordTypes.PaintInvalidationTracking:
this._invalidationTracker.addInvalidation(new TimelineModel.InvalidationTrackingEvent(event)); this._invalidationTracker.addInvalidation(new TimelineModel.InvalidationTrackingEvent(event));
break; break;
...@@ -1210,8 +1208,6 @@ TimelineModel.TimelineModel.RecordType = { ...@@ -1210,8 +1208,6 @@ TimelineModel.TimelineModel.RecordType = {
StyleRecalcInvalidationTracking: 'StyleRecalcInvalidationTracking', StyleRecalcInvalidationTracking: 'StyleRecalcInvalidationTracking',
StyleInvalidatorInvalidationTracking: 'StyleInvalidatorInvalidationTracking', StyleInvalidatorInvalidationTracking: 'StyleInvalidatorInvalidationTracking',
LayoutInvalidationTracking: 'LayoutInvalidationTracking', LayoutInvalidationTracking: 'LayoutInvalidationTracking',
LayerInvalidationTracking: 'LayerInvalidationTracking',
PaintInvalidationTracking: 'PaintInvalidationTracking',
ParseHTML: 'ParseHTML', ParseHTML: 'ParseHTML',
ParseAuthorStyleSheet: 'ParseAuthorStyleSheet', ParseAuthorStyleSheet: 'ParseAuthorStyleSheet',
...@@ -1593,8 +1589,6 @@ TimelineModel.InvalidationTrackingEvent = class { ...@@ -1593,8 +1589,6 @@ TimelineModel.InvalidationTrackingEvent = class {
/** @type {?string} */ /** @type {?string} */
this.nodeName = eventData['nodeName']; this.nodeName = eventData['nodeName'];
/** @type {?number} */ /** @type {?number} */
this.paintId = eventData['paintId'];
/** @type {?number} */
this.invalidationSet = eventData['invalidationSet']; this.invalidationSet = eventData['invalidationSet'];
/** @type {?string} */ /** @type {?string} */
this.invalidatedSelectorId = eventData['invalidatedSelectorId']; this.invalidatedSelectorId = eventData['invalidatedSelectorId'];
...@@ -1649,24 +1643,13 @@ TimelineModel.InvalidationTracker = class { ...@@ -1649,24 +1643,13 @@ TimelineModel.InvalidationTracker = class {
addInvalidation(invalidation) { addInvalidation(invalidation) {
this._startNewFrameIfNeeded(); this._startNewFrameIfNeeded();
if (!invalidation.nodeId && !invalidation.paintId) { if (!invalidation.nodeId) {
console.error('Invalidation lacks node information.'); console.error('Invalidation lacks node information.');
console.error(invalidation); console.error(invalidation);
return; return;
} }
// PaintInvalidationTracking events provide a paintId and a nodeId which
// we can use to update the paintId for all other invalidation tracking
// events.
const recordTypes = TimelineModel.TimelineModel.RecordType; const recordTypes = TimelineModel.TimelineModel.RecordType;
if (invalidation.type === recordTypes.PaintInvalidationTracking && invalidation.nodeId) {
const invalidations = this._invalidationsByNodeId[invalidation.nodeId] || [];
for (let i = 0; i < invalidations.length; ++i)
invalidations[i].paintId = invalidation.paintId;
// PaintInvalidationTracking is only used for updating paintIds.
return;
}
// Suppress StyleInvalidator StyleRecalcInvalidationTracking invalidations because they // Suppress StyleInvalidator StyleRecalcInvalidationTracking invalidations because they
// will be handled by StyleInvalidatorInvalidationTracking. // will be handled by StyleInvalidatorInvalidationTracking.
...@@ -1812,28 +1795,6 @@ TimelineModel.InvalidationTracker = class { ...@@ -1812,28 +1795,6 @@ TimelineModel.InvalidationTracker = class {
*/ */
didPaint(paintEvent) { didPaint(paintEvent) {
this._didPaint = true; this._didPaint = true;
// If a paint doesn't have a corresponding graphics layer id, it paints
// into its parent so add an effectivePaintId to these events.
const layerId = paintEvent.args['data']['layerId'];
if (layerId)
this._lastPaintWithLayer = paintEvent;
// Quietly discard top-level paints without layerId, as these are likely
// to come from overlay.
if (!this._lastPaintWithLayer)
return;
const effectivePaintId = this._lastPaintWithLayer.args['data']['nodeId'];
const paintFrameId = paintEvent.args['data']['frame'];
const types = [
TimelineModel.TimelineModel.RecordType.StyleRecalcInvalidationTracking,
TimelineModel.TimelineModel.RecordType.LayoutInvalidationTracking,
TimelineModel.TimelineModel.RecordType.PaintInvalidationTracking
];
for (const invalidation of this._invalidationsOfTypes(types)) {
if (invalidation.paintId === effectivePaintId)
this._addInvalidationToEvent(paintEvent, paintFrameId, invalidation);
}
} }
/** /**
......
...@@ -94,9 +94,6 @@ crbug.com/934144 [ Linux ] http/tests/devtools/tracing/timeline-misc/timeline-fl ...@@ -94,9 +94,6 @@ crbug.com/934144 [ Linux ] http/tests/devtools/tracing/timeline-misc/timeline-fl
#Sheriff 2019-04-10 #Sheriff 2019-04-10
crbug.com/951453 [ Linux ] external/wpt/html/user-activation/activation-transfer-cross-origin-with-click.sub.tentative.html [ Pass Leak ] crbug.com/951453 [ Linux ] external/wpt/html/user-activation/activation-transfer-cross-origin-with-click.sub.tentative.html [ Pass Leak ]
#Sheriff 2019-05-16
crbug.com/963749 [ Linux ] virtual/threaded/http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations.js [ Pass Timeout ]
########################################################################### ###########################################################################
# WARNING: Memory leaks must be fixed asap. Sheriff is expected to revert # # WARNING: Memory leaks must be fixed asap. Sheriff is expected to revert #
# culprit CLs instead of suppressing the leaks. If you have any question, # # culprit CLs instead of suppressing the leaks. If you have any question, #
......
...@@ -74,12 +74,9 @@ crbug.com/729136 [ Linux ] webaudio/mixing.html [ Timeout ] ...@@ -74,12 +74,9 @@ crbug.com/729136 [ Linux ] webaudio/mixing.html [ Timeout ]
# Tests timing out on WebKit Linux Trusty MSAN # Tests timing out on WebKit Linux Trusty MSAN
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-layout/timeline-layout-with-invalidations.js [ Pass Timeout ] crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-layout/timeline-layout-with-invalidations.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-with-invalidations.js [ Pass Timeout ] crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-with-invalidations.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-with-invalidator-invalidations.js [ Pass Timeout ] crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-style/timeline-style-recalc-with-invalidator-invalidations.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Pass Timeout ] crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-misc/timeline-event-causes.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-time/timeline-usertiming.js [ Pass Timeout ] crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-time/timeline-usertiming.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint.js [ Pass Timeout ] crbug.com/760543 [ Linux ] http/tests/devtools/tracing/timeline-paint/timeline-paint.js [ Pass Timeout ]
crbug.com/760543 [ Linux ] http/tests/devtools/oopif/oopif-performance-cpu-profiles.js [ Pass Timeout ] crbug.com/760543 [ Linux ] http/tests/devtools/oopif/oopif-performance-cpu-profiles.js [ Pass Timeout ]
......
...@@ -331,7 +331,6 @@ crbug.com/869662 [ Mac10.13 ] virtual/threaded/fast/scrolling/overflow-scrollabi ...@@ -331,7 +331,6 @@ crbug.com/869662 [ Mac10.13 ] virtual/threaded/fast/scrolling/overflow-scrollabi
# Tests with slowest_run >= 10s on flakiness dashboard for site_per_process_webkit_layout_tests # Tests with slowest_run >= 10s on flakiness dashboard for site_per_process_webkit_layout_tests
crbug.com/874695 http/tests/devtools/sources/debugger-breakpoints/breakpoints-ui-shifted-breakpoint.js [ Slow ] crbug.com/874695 http/tests/devtools/sources/debugger-breakpoints/breakpoints-ui-shifted-breakpoint.js [ Slow ]
crbug.com/874695 http/tests/devtools/sources/sourcemap-hot-reload.js [ Slow ] crbug.com/874695 http/tests/devtools/sources/sourcemap-hot-reload.js [ Slow ]
crbug.com/874695 http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.js [ Slow ]
# Tests where |3s <= slowest_run < 10s| on flakiness dashboard for site_per_process_webkit_layout_tests # Tests where |3s <= slowest_run < 10s| on flakiness dashboard for site_per_process_webkit_layout_tests
crbug.com/874695 accessibility/is-ignored-change-sends-notification.html [ Slow ] crbug.com/874695 accessibility/is-ignored-change-sends-notification.html [ Slow ]
......
...@@ -2268,13 +2268,10 @@ crbug.com/891427 fast/canvas/canvas-drawImage-live-video.html [ Pass Failure Tim ...@@ -2268,13 +2268,10 @@ crbug.com/891427 fast/canvas/canvas-drawImage-live-video.html [ Pass Failure Tim
# Next 1 here: https://ci.chromium.org/buildbot/tryserver.blink/win7-blink-rel/1180 # Next 1 here: https://ci.chromium.org/buildbot/tryserver.blink/win7-blink-rel/1180
# Next 2 here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-blink-rel/1541 # Next 2 here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-blink-rel/1541
crbug.com/891427 virtual/android/rootscroller/gesture-scroll-document-not-root-scroller.html [ Pass Failure Timeout Crash ] crbug.com/891427 virtual/android/rootscroller/gesture-scroll-document-not-root-scroller.html [ Pass Failure Timeout Crash ]
crbug.com/891427 virtual/threaded/http/tests/devtools/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.js [ Pass Failure Timeout Crash ]
# Next 1 here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-blink-rel/1547 # Next 1 here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-blink-rel/1547
crbug.com/891427 virtual/threaded/external/wpt/css/css-scroll-snap/snap-at-user-scroll-end-manual.html [ Pass Failure Timeout Crash ] crbug.com/891427 virtual/threaded/external/wpt/css/css-scroll-snap/snap-at-user-scroll-end-manual.html [ Pass Failure Timeout Crash ]
# Next 1 here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win7-blink-rel/1504 # Next 1 here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win7-blink-rel/1504
crbug.com/891427 tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_tbody.html [ Pass Failure Timeout Crash ] crbug.com/891427 tables/mozilla_expected_failures/marvin/table_overflow_dirty_reflow_tbody.html [ Pass Failure Timeout Crash ]
# Next 1 here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win10-blink-rel/1510
crbug.com/891427 virtual/threaded/http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations-on-deleted-node.js [ Pass Failure Timeout Crash ]
# The following fail only on Mac. # The following fail only on Mac.
crbug.com/891427 [ Mac ] fast/events/touch/gesture/touch-gesture-scroll-listbox.html [ Pass Failure Timeout Crash ] crbug.com/891427 [ Mac ] fast/events/touch/gesture/touch-gesture-scroll-listbox.html [ Pass Failure Timeout Crash ]
...@@ -5658,7 +5655,6 @@ crbug.com/898378 [ Mac10.13 ] virtual/scroll_customization/fast/scroll-behavior/ ...@@ -5658,7 +5655,6 @@ crbug.com/898378 [ Mac10.13 ] virtual/scroll_customization/fast/scroll-behavior/
# Sheriff 2018-10-29 # Sheriff 2018-10-29
crbug.com/899710 [ Win ] virtual/threaded/http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations.js [ Failure Pass Timeout ]
crbug.com/766357 [ Win ] virtual/threaded/fast/scrolling/wheel-and-touch-scroll-use-count.html [ Failure Pass ] crbug.com/766357 [ Win ] virtual/threaded/fast/scrolling/wheel-and-touch-scroll-use-count.html [ Failure Pass ]
# Sheriff 2018-10-30 # Sheriff 2018-10-30
...@@ -6159,7 +6155,6 @@ crbug.com/959693 external/wpt/trusted-types/WorkerGlobalScope-importScripts.http ...@@ -6159,7 +6155,6 @@ crbug.com/959693 external/wpt/trusted-types/WorkerGlobalScope-importScripts.http
# Sheriff 2019-05-20 # Sheriff 2019-05-20
crbug.com/963739 [ Fuchsia ] synthetic_gestures/smooth-scroll-tiny-delta.html [ Pass Timeout ] crbug.com/963739 [ Fuchsia ] synthetic_gestures/smooth-scroll-tiny-delta.html [ Pass Timeout ]
crbug.com/964158 [ Linux ] external/wpt/payment-handler/change-payment-method.https.html [ Pass Crash ] crbug.com/964158 [ Linux ] external/wpt/payment-handler/change-payment-method.https.html [ Pass Crash ]
crbug.com/899710 [ Linux ] virtual/threaded/http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations.js [ Pass Timeout ]
crbug.com/964239 external/wpt/css/css-scroll-snap/scroll-margin.html [ Pass Failure ] crbug.com/964239 external/wpt/css/css-scroll-snap/scroll-margin.html [ Pass Failure ]
crbug.com/965389 [ Mac ] media/track/track-cue-rendering-position-auto.html [ Pass Failure ] crbug.com/965389 [ Mac ] media/track/track-cue-rendering-position-auto.html [ Pass Failure ]
......
Tests the Timeline API instrumentation of paint events with layout invalidations.
Running: testLocalFrame
paint invalidations[
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:17}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "BODY"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:18}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV id='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Style changed, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:19}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV id='testElement'"
selectorPart : undefined
type : "LayoutInvalidationTracking"
}
]
Running: testSubframe
second paint invalidations[
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:25}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Style changed, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:26}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV"
selectorPart : undefined
type : "LayoutInvalidationTracking"
}
{
cause : {reason: Scrollbar changed, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:26}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "#document"
selectorPart : undefined
type : "LayoutInvalidationTracking"
}
]
Tests grouped invalidations on the timeline.
paint invalidations[
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-grouped-invalidations.js:22}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV class='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-grouped-invalidations.js:23}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV class='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-grouped-invalidations.js:22}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV class='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-grouped-invalidations.js:23}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV class='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-grouped-invalidations.js:22}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV class='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-grouped-invalidations.js:23}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV class='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-grouped-invalidations.js:22}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV class='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-grouped-invalidations.js:23}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV class='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
]
PASS - record contained Inline CSS style declaration was mutated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous) @ timeline-grouped-invalidations.js:22
PASS - record contained Inline CSS style declaration was mutated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous) @ timeline-grouped-invalidations.js:23
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Tests grouped invalidations on the timeline.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.showPanel('timeline');
await TestRunner.loadHTML(`
<!DOCTYPE HTML>
<div class="testElement">P</div><div class="testElement">A</div>
<div class="testElement">S</div><div class="testElement">S</div>
`);
await TestRunner.addScriptTag('../../../resources/run-after-layout-and-paint.js');
await TestRunner.evaluateInPagePromise(`
function display()
{
return new Promise(resolve => {
requestAnimationFrame(function() {
var testElements = document.body.getElementsByClassName("testElement");
for (var i = 0; i < testElements.length; i++) {
testElements[i].style.color = "red";
testElements[i].style.backgroundColor = "blue";
}
runAfterLayoutAndPaint(resolve);
});
});
}
`);
Runtime.experiments.enableForTest('timelineInvalidationTracking');
await PerformanceTestRunner.invokeAsyncWithTimeline('display');
var event = PerformanceTestRunner.findTimelineEvent(TimelineModel.TimelineModel.RecordType.Paint);
TestRunner.addArray(
TimelineModel.InvalidationTracker.invalidationEventsFor(event), PerformanceTestRunner.InvalidationFormatters,
'', 'paint invalidations');
var linkifier = new Components.Linkifier();
var target = PerformanceTestRunner.timelineModel().targetByEvent(event);
var contentHelper = new Timeline.TimelineDetailsContentHelper(target, linkifier, true);
Timeline.TimelineUIUtils._generateCauses(event, target, null, contentHelper);
var invalidationsTree = contentHelper.element.getElementsByClassName('invalidations-tree')[0];
var invalidations = invalidationsTree.shadowRoot.textContent;
checkStringContains(
invalidations,
`Inline CSS style declaration was mutated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous) @ timeline-grouped-invalidations.js:22`);
checkStringContains(
invalidations,
`Inline CSS style declaration was mutated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous) @ timeline-grouped-invalidations.js:23`);
TestRunner.completeTest();
function checkStringContains(string, contains) {
var doesContain = string.indexOf(contains) >= 0;
TestRunner.check(doesContain, contains + ' should be present in ' + string);
TestRunner.addResult('PASS - record contained ' + contains);
}
})();
Tests the Timeline API instrumentation of multiple style recalc invalidations and ensures they are all collected on the paint event.
first style recalc[
{
cause : {reason: Element has pending invalidation list, stackTrace: test://evaluations/0/timeline-paint-and-multiple-style-invalidations.js:29}
changedAttribute : undefined
changedClass : "red"
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV id='testElementOne' class='red'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
]
second style recalc[
{
cause : {reason: Element has pending invalidation list, stackTrace: test://evaluations/0/timeline-paint-and-multiple-style-invalidations.js:31}
changedAttribute : undefined
changedClass : "snow"
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV id='testElementOne' class='snow'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Element has pending invalidation list, stackTrace: test://evaluations/0/timeline-paint-and-multiple-style-invalidations.js:31}
changedAttribute : undefined
changedClass : "red"
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV id='testElementOne' class='snow'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
]
first paint[
{
cause : {reason: Element has pending invalidation list, stackTrace: test://evaluations/0/timeline-paint-and-multiple-style-invalidations.js:29}
changedAttribute : undefined
changedClass : "red"
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV id='testElementOne' class='red'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Element has pending invalidation list, stackTrace: test://evaluations/0/timeline-paint-and-multiple-style-invalidations.js:31}
changedAttribute : undefined
changedClass : "snow"
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV id='testElementOne' class='snow'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Element has pending invalidation list, stackTrace: test://evaluations/0/timeline-paint-and-multiple-style-invalidations.js:31}
changedAttribute : undefined
changedClass : "red"
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV id='testElementOne' class='snow'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(
`Tests the Timeline API instrumentation of multiple style recalc invalidations and ensures they are all collected on the paint event.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.showPanel('timeline');
await TestRunner.loadHTML(`
<!DOCTYPE HTML>
<style>
.testHolder > .red { background-color: red; }
.testHolder > .green { background-color: green; }
.testHolder > .blue { background-color: blue; }
.testHolder > .snow { background-color: snow; }
.testHolder > .red .dummy { }
.testHolder > .green .dummy { }
.testHolder > .blue .dummy { }
.testHolder > .snow .dummy { }
</style>
<div class="testHolder">
<div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="testElementThree">PASS</div>
</div>
`);
await TestRunner.evaluateInPagePromise(`
function multipleStyleRecalcsAndDisplay()
{
document.getElementById("testElementOne").className = "red";
var forceStyleRecalc1 = document.body.offsetTop;
document.getElementById("testElementOne").className = "snow";
var forceStyleRecalc2 = document.body.offsetTop;
return waitForFrame();
}
`);
Runtime.experiments.enableForTest('timelineInvalidationTracking');
await PerformanceTestRunner.invokeAsyncWithTimeline('multipleStyleRecalcsAndDisplay');
PerformanceTestRunner.dumpInvalidations(
TimelineModel.TimelineModel.RecordType.UpdateLayoutTree, 0, 'first style recalc');
PerformanceTestRunner.dumpInvalidations(
TimelineModel.TimelineModel.RecordType.UpdateLayoutTree, 1, 'second style recalc');
PerformanceTestRunner.dumpInvalidations(TimelineModel.TimelineModel.RecordType.Paint, 0, 'first paint');
var thirdRecalc =
PerformanceTestRunner.findTimelineEvent(TimelineModel.TimelineModel.RecordType.UpdateLayoutTree, 2);
TestRunner.assertTrue(thirdRecalc === undefined, 'There should be no additional style recalc records.');
var secondPaint = PerformanceTestRunner.findTimelineEvent(TimelineModel.TimelineModel.RecordType.Paint, 1);
TestRunner.assertTrue(secondPaint === undefined, 'There should be no additional paint records.');
TestRunner.completeTest();
})();
Tests the Timeline API instrumentation of paint events with layout invalidations.
Running: testLocalFrame
paint invalidations[
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:17}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "BODY"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:18}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV id='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Style changed, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:19}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV id='testElement'"
selectorPart : undefined
type : "LayoutInvalidationTracking"
}
]
Running: testSubframe
second paint invalidations[
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:25}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Style changed, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:26}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "DIV"
selectorPart : undefined
type : "LayoutInvalidationTracking"
}
{
cause : {reason: Scrollbar changed, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations.js:26}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : undefined
nodeName : "#document"
selectorPart : undefined
type : "LayoutInvalidationTracking"
}
]
Tests the Timeline API instrumentation of layout invalidations on a deleted node.
Running: testLocalFrame
paint invalidations[
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-layout-invalidations-on-deleted-node.js:17}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "BODY"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
]
Running: testSubframe
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Tests the Timeline API instrumentation of layout invalidations on a deleted node.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.showPanel('timeline');
await TestRunner.loadHTML(`
<!DOCTYPE HTML>
<div id="testElement">FAIL - this should not be present when the test finishes.</div>
<iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe>
`);
await TestRunner.evaluateInPagePromise(`
function display()
{
document.body.style.backgroundColor = "blue";
var element = document.getElementById("testElement");
element.style.width = "100px";
var forceLayout = document.body.offsetTop;
element.parentElement.removeChild(element);
return waitForFrame();
}
function updateSubframeAndDisplay()
{
var element = frames[0].document.body.children[0];
element.style.width = "200px";
var forceLayout = frames[0].document.body.offsetTop;
element.parentElement.removeChild(element);
return waitForFrame();
}
`);
Runtime.experiments.enableForTest('timelineInvalidationTracking');
TestRunner.runTestSuite([
async function testLocalFrame(next) {
await PerformanceTestRunner.invokeAsyncWithTimeline('display');
PerformanceTestRunner.dumpInvalidations(TimelineModel.TimelineModel.RecordType.Paint, 0, 'paint invalidations');
next();
},
async function testSubframe(next) {
await PerformanceTestRunner.invokeAsyncWithTimeline('updateSubframeAndDisplay');
// The first paint corresponds to the local frame and should have no invalidations.
var firstPaintEvent = PerformanceTestRunner.findTimelineEvent(TimelineModel.TimelineModel.RecordType.Paint);
var firstInvalidations = TimelineModel.InvalidationTracker.invalidationEventsFor(firstPaintEvent);
TestRunner.assertEquals(firstInvalidations, null);
// We don't invalidate paint of deleted elements which doesn't affect other elements.
var secondPaintEvent = PerformanceTestRunner.findTimelineEvent(TimelineModel.TimelineModel.RecordType.Paint);
var secondInvalidations = TimelineModel.InvalidationTracker.invalidationEventsFor(secondPaintEvent);
TestRunner.assertEquals(secondInvalidations, null);
next();
}
]);
})();
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Tests the Timeline API instrumentation of paint events with layout invalidations.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.showPanel('timeline');
await TestRunner.loadHTML(`
<!DOCTYPE HTML>
<div id="testElement">PASS</div>
<iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe>
`);
await TestRunner.evaluateInPagePromise(`
function display()
{
document.body.style.backgroundColor = "blue";
document.getElementById("testElement").style.width = "100px";
var forceLayout = document.body.offsetTop;
return waitForFrame();
}
function updateSubframeAndDisplay()
{
frames[0].document.body.children[0].style.width = "200px";
var forceLayout = frames[0].document.body.offsetTop;
return waitForFrame();
}
`);
Runtime.experiments.enableForTest('timelineInvalidationTracking');
TestRunner.runTestSuite([
async function testLocalFrame(next) {
await PerformanceTestRunner.invokeAsyncWithTimeline('display');
PerformanceTestRunner.dumpInvalidations(TimelineModel.TimelineModel.RecordType.Paint, 0, 'paint invalidations');
next();
},
async function testSubframe(next) {
await PerformanceTestRunner.invokeAsyncWithTimeline('updateSubframeAndDisplay');
// The first paint corresponds to the local frame and should have no invalidations.
var firstPaintEvent = PerformanceTestRunner.findTimelineEvent(TimelineModel.TimelineModel.RecordType.Paint);
var firstInvalidations = TimelineModel.InvalidationTracker.invalidationEventsFor(firstPaintEvent);
TestRunner.assertEquals(firstInvalidations, null);
// The second paint corresponds to the subframe and should have our layout/style invalidations.
PerformanceTestRunner.dumpInvalidations(
TimelineModel.TimelineModel.RecordType.Paint, 1, 'second paint invalidations');
next();
}
]);
})();
Tests the Timeline API instrumentation of paint events with style recalc invalidations.
Running: testLocalFrame
first paint invalidations[
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-style-recalc-invalidations.js:17}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "BODY"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-style-recalc-invalidations.js:18}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV id='testElement'"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
]
Running: testSubframe
second paint invalidations[
{
cause : {reason: Inline CSS style declaration was mutated, stackTrace: test://evaluations/0/timeline-paint-with-style-recalc-invalidations.js:24}
changedAttribute : undefined
changedClass : undefined
changedId : undefined
changedPseudo : undefined
extraData : ""
nodeName : "DIV"
selectorPart : undefined
type : "StyleRecalcInvalidationTracking"
}
]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Tests the Timeline API instrumentation of paint events with style recalc invalidations.\n`);
await TestRunner.loadModule('performance_test_runner');
await TestRunner.showPanel('timeline');
await TestRunner.loadHTML(`
<!DOCTYPE HTML>
<div id="testElement">PASS</div>
<iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe>
`);
await TestRunner.evaluateInPagePromise(`
function display()
{
document.body.style.backgroundColor = "blue";
document.getElementById("testElement").style.backgroundColor = "salmon";
return waitForFrame();
}
function updateSubframeAndDisplay()
{
frames[0].document.body.children[0].style.backgroundColor = "green";
return waitForFrame();
}
`);
Runtime.experiments.enableForTest('timelineInvalidationTracking');
TestRunner.runTestSuite([
async function testLocalFrame(next) {
await PerformanceTestRunner.invokeAsyncWithTimeline('display');
PerformanceTestRunner.dumpInvalidations(
TimelineModel.TimelineModel.RecordType.Paint, 0, 'first paint invalidations');
next();
},
async function testSubframe(next) {
await PerformanceTestRunner.invokeAsyncWithTimeline('updateSubframeAndDisplay');
// The first paint corresponds to the local frame and should have no invalidations.
var firstPaintEvent = PerformanceTestRunner.findTimelineEvent(TimelineModel.TimelineModel.RecordType.Paint);
var firstInvalidations = TimelineModel.InvalidationTracker.invalidationEventsFor(firstPaintEvent);
TestRunner.assertEquals(firstInvalidations, null);
// The second paint corresponds to the subframe and should have our style invalidations.
PerformanceTestRunner.dumpInvalidations(
TimelineModel.TimelineModel.RecordType.Paint, 1, 'second paint invalidations');
next();
}
]);
})();
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