@@ -307,11 +307,16 @@ interface ViewInput {
307307 serverTimings : SDK . ServerTiming . ServerTiming [ ] ;
308308 fetchDetails ?: UI . TreeOutline . TreeOutlineInShadow ;
309309 routerDetails ?: UI . TreeOutline . TreeOutlineInShadow ;
310- wasThrottled ?: SDK . NetworkManager . Conditions ;
310+ wasThrottled ?: SDK . NetworkManager . AppliedNetworkConditions ;
311311}
312312
313313type View = ( input : ViewInput , output : object , target : HTMLElement ) => void ;
314314export const DEFAULT_VIEW : View = ( input , output , target ) => {
315+ const revealThrottled = ( ) : void => {
316+ if ( input . wasThrottled ) {
317+ void Common . Revealer . reveal ( input . wasThrottled ) ;
318+ }
319+ } ;
315320 const scale = 100 / ( input . endTime - input . startTime ) ;
316321 const isClickable = ( range : NetworkTimeCalculator . RequestTimeRange ) : boolean =>
317322 range . name === 'serviceworker-respondwith' || range . name === 'serviceworker-routerevaluation' ;
@@ -376,11 +381,11 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
376381 }
377382 } ;
378383
379- const throttledRequestTitle = input . wasThrottled ?
380- i18nString (
381- UIStrings . wasThrottled ,
382- { PH1 : typeof input . wasThrottled . title === 'string' ? input . wasThrottled . title : input . wasThrottled . title ( ) } ) :
383- undefined ;
384+ const throttledRequestTitle = input . wasThrottled ? i18nString ( UIStrings . wasThrottled , {
385+ PH1 : typeof input . wasThrottled . conditions . title === 'string' ? input . wasThrottled . conditions . title :
386+ input . wasThrottled . conditions . title ( )
387+ } ) :
388+ undefined ;
384389
385390 const classes = classMap ( {
386391 [ 'network-timing-table' ] : true ,
@@ -503,7 +508,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
503508 </ x-link >
504509 < td > </ td >
505510 < td class =${ input . wasThrottled ? 'throttled' : '' } title =${ ifDefined ( throttledRequestTitle ) } >
506- ${ input . wasThrottled ? html ` < devtools-icon name =watch > </ devtools-icon > ` : nothing }
511+ ${ input . wasThrottled ? html ` < devtools-icon name =watch @click = ${ revealThrottled } > </ devtools-icon > ` : nothing }
507512 ${ i18n . TimeUtilities . secondsToString ( input . totalDuration , true ) }
508513 </ td >
509514 </ tr >
@@ -578,7 +583,7 @@ export class RequestTimingView extends UI.Widget.VBox {
578583 requestUnfinished : false ,
579584 fetchDetails : this . #fetchDetailsTree( ) ,
580585 routerDetails : this . #routerDetailsTree( ) ,
581- wasThrottled : conditions ?. urlPattern ? conditions . conditions : undefined ,
586+ wasThrottled : conditions ?. urlPattern ? conditions : undefined ,
582587 timeRanges,
583588 } ;
584589 this . #view( input , { } , this . contentElement ) ;
0 commit comments