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

Unified Diff: tracing/tracing/importer/find_input_expectations.html

Issue 2778993004: Fix a bug where video animations were being merged into other animations (Closed)
Patch Set: Checkpoint. Created 3 years, 9 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 | « no previous file | tracing/tracing/importer/user_model_builder_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/importer/find_input_expectations.html
diff --git a/tracing/tracing/importer/find_input_expectations.html b/tracing/tracing/importer/find_input_expectations.html
index 24deb7e0b3048b0da85f0c399f609203c9a00730..77e5a381a596655096c07dbdcc6428494cc30a14 100644
--- a/tracing/tracing/importer/find_input_expectations.html
+++ b/tracing/tracing/importer/find_input_expectations.html
@@ -1042,17 +1042,19 @@ tr.exportTo('tr.importer', function() {
// Only consider Animations for now.
if (pe.type !== ProtoExpectation.ANIMATION_TYPE) continue;
- var isCSS = pe.containsSliceTitle(CSS_ANIMATION_TITLE);
+ var isCSS = pe.initiatorType === INITIATOR_TYPE.CSS;
var isFling = pe.containsTypeNames([INPUT_TYPE.FLING_START]);
- var isVideo = pe.containsTypeNames([INITIATOR_TYPE.VIDEO]);
+ var isVideo = pe.initiatorType === INITIATOR_TYPE.VIDEO;
for (var i = 0; i < protoExpectations.length; ++i) {
var otherPE = protoExpectations[i];
if (otherPE.type !== pe.type) continue;
- // Don't merge CSS Animations with any other types.
- if (isCSS !== otherPE.containsSliceTitle(CSS_ANIMATION_TITLE)) {
+ // Don't merge some animation types with others.
+ if ((isCSS && otherPE.initiatorType !== INITIATOR_TYPE.CSS) ||
+ isFling !== otherPE.containsTypeNames([INPUT_TYPE.FLING_START]) ||
+ isVideo && otherPE.initiatorType !== INITIATOR_TYPE.VIDEO) {
continue;
}
@@ -1064,16 +1066,6 @@ tr.exportTo('tr.importer', function() {
continue;
}
- // Don't merge Fling Animations with any other types.
- if (isFling !== otherPE.containsTypeNames([INPUT_TYPE.FLING_START])) {
- continue;
- }
-
- // Don't merge Video Animations with any other types.
- if (isVideo !== otherPE.containsTypeNames([INITIATOR_TYPE.VIDEO])) {
- continue;
- }
-
pe.merge(otherPE);
protoExpectations.splice(i, 1);
// Don't skip the next otherPE!
@@ -1282,7 +1274,7 @@ tr.exportTo('tr.importer', function() {
findInputExpectations,
compareEvents,
CSS_ANIMATION_TITLE,
- INITIATOR_TYPE,
+ INITIATOR_TYPE
};
});
</script>
« no previous file with comments | « no previous file | tracing/tracing/importer/user_model_builder_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698