Bug 153390

Summary: Web Inspector: Reduce unnecessary forced layouts in TimelineRuler
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2016-01-22 21:18:18 PST
* SUMMARY
Reduce unnecessary forced layouts in TimelineRuler

TimelineRuler is potentially forcing a synchronous layout (element.clientWidth) every time it does a layout. This is unnecessary expensive, and in some cases this causes the entire inspector process to hang while it draws/layout/draw/layout repeatedly.

The only reason the TimelineRuler would need its clientWidth is to calculate the width of the element. So this value can be updated only when the ruler is resized.
Comment 1 Radar WebKit Bug Importer 2016-01-22 21:18:32 PST
<rdar://problem/24312241>
Comment 2 Joseph Pecoraro 2016-01-22 21:23:31 PST
Created attachment 269639 [details]
[PATCH] Proposed Fix
Comment 3 WebKit Commit Bot 2016-01-22 22:47:08 PST
Comment on attachment 269639 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 269639

Committed r195504: <http://trac.webkit.org/changeset/195504>
Comment 4 WebKit Commit Bot 2016-01-22 22:47:12 PST
All reviewed patches have been landed.  Closing bug.