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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py

Issue 1896243002: Fix repaint overlay in layout test results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py
index 01a413f158f85b9a87d95931851c110224074299..d6fd1c294219938f41d28e53851f3ef4ff5b5a7a 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py
@@ -7,7 +7,7 @@ import re
def result_contains_repaint_rects(text):
return isinstance(text, str) and (
- re.search('"repaintRects": \[$', text, re.MULTILINE) != None or
+ re.search('"paintInvalidations": \[$', text, re.MULTILINE) is not None or
text.find('Minimum repaint:') != -1)
@@ -139,12 +139,12 @@ function draw_layer_rects(context, result) {
context.transform(t[0][0], t[0][1], t[1][0], t[1][1], t[3][0], t[3][1]);
context.translate(-origin[0], -origin[1]);
}
- if (result.repaintRects) {
- draw_rects(context, result.repaintRects);
- } else if (result.paintInvalidations) {
+ if (result.paintInvalidations) {
var rects = [];
- for (var i = 0; i < result.paintInvalidations.length; ++i)
- rects.push(result.paintInvalidations[i].rect);
+ for (var i = 0; i < result.paintInvalidations.length; ++i) {
+ if (result.paintInvalidations[i].rect)
+ rects.push(result.paintInvalidations[i].rect);
+ }
draw_rects(context, rects);
}
if (result.children) {
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698