Commit 0326038
RPP: fix lcp image request <> navigation relation
The below bug was reported where the LCP Insight was using the wrong
image request for the LCP event. This was because the
LargestImagePaintHandler tied events to the current navigation, but if
the page being loaded has multiple frames, the "current navigation"
isn't that helpful and instead we need to track "current navigation per
frame" in order to not have data from frame A get mixed up with data
from frame B.
The bug below is caused by the "current navigation" becoming the loading
of an iframe, which happens before the actual LCP image is loaded. That
means we mistakenly relate the actual LCP image to an entirely different
and unrelated navigation.
The fix here is to track the current navigation per frame. Then when we
look up and relate the LCP Image request to the navigation, we aren't
mistakenly mixing requests across different frames.
I also landed an example in the stories repo
ChromeDevTools/performance-stories#38 to give us
a test case for this and used it in the unit test.
Fixed: 384000716
Change-Id: Ica187428545ec1d783ea3a050d0e837ad6f3f729
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6091385
Commit-Queue: Andres Olivares <[email protected]>
Auto-Submit: Jack Franklin <[email protected]>
Commit-Queue: Jack Franklin <[email protected]>
Reviewed-by: Andres Olivares <[email protected]>1 parent 5f4411c commit 0326038
File tree
5 files changed
+49
-7
lines changed- front_end
- models/trace/handlers
- panels/timeline/fixtures/traces
5 files changed
+49
-7
lines changedLines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
27 | 45 | | |
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
42 | | - | |
43 | | - | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
| |||
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
Binary file not shown.
0 commit comments