Bug 14536 - Unnecessary layout done when mousing down in text field
: Unnecessary layout done when mousing down in text field
Status: RESOLVED FIXED
: WebKit
Layout and Rendering
: 523.x (Safari 3)
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-07-05 17:13 PST by
Modified: 2007-07-06 19:36 PST (History)


Attachments
shark sample (690.66 KB, application/octet-stream)
2007-07-05 17:18 PST, Adam Roben (:aroben)
no flags Details
testcase (1.22 KB, text/html)
2007-07-05 17:21 PST, Adam Roben (:aroben)
no flags Details
Avoid spurious layout due to mutating inner renderer's styles (2.20 KB, patch)
2007-07-06 01:47 PST, mitz@webkit.org
no flags Review Patch | Details | Formatted Diff | Diff
Avoid spurious layout due to mutating inner renderer's styles (4.28 KB, patch)
2007-07-06 05:40 PST, mitz@webkit.org
bdakin: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-07-05 17:13:56 PST
Unnecessary layout done when mousing down in text field.

Adam and I were testing a text field with 500,000 characters, and we noticed some sluggishness clicking in and out of the text field.

We profiled it with Shark, and saw that the slowness is coming from laying out the large run of text.  But it seems unnecessary to have to relayout just for clicking in the field.
------- Comment #1 From 2007-07-05 17:18:59 PST -------
Created an attachment (id=15408) [details]
shark sample

Here's a sample from clicking in a text field with many characters in it.
------- Comment #2 From 2007-07-05 17:21:16 PST -------
Created an attachment (id=15409) [details]
testcase

Enter "500000" in the second text field and press "Test Length". That will fill the first text field with 500000 characters.
------- Comment #3 From 2007-07-06 01:47:19 PST -------
Created an attachment (id=15414) [details]
Avoid spurious layout due to mutating inner renderer's styles
------- Comment #4 From 2007-07-06 01:59:54 PST -------
(From update of attachment 15414 [details])
I think I actually need to preserve the current values, not reset them, in case layout doesn't get called again (which is the entire point of this exercise).
------- Comment #5 From 2007-07-06 05:40:57 PST -------
Created an attachment (id=15417) [details]
Avoid spurious layout due to mutating inner renderer's styles
------- Comment #6 From 2007-07-06 09:37:05 PST -------
(From update of attachment 15417 [details])
Looks good!
------- Comment #7 From 2007-07-06 19:36:39 PST -------
Landed in r24083.