Bug 14536 - Unnecessary layout done when mousing down in text field
Summary: Unnecessary layout done when mousing down in text field
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-05 17:13 PDT by Adele Peterson
Modified: 2007-07-06 19:36 PDT (History)
4 users (show)

See Also:


Attachments
shark sample (690.66 KB, application/octet-stream)
2007-07-05 17:18 PDT, Adam Roben (:aroben)
no flags Details
testcase (1.22 KB, text/html)
2007-07-05 17:21 PDT, 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 PDT, mitz
no flags Details | Formatted Diff | Diff
Avoid spurious layout due to mutating inner renderer's styles (4.28 KB, patch)
2007-07-06 05:40 PDT, mitz
bdakin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adele Peterson 2007-07-05 17:13:56 PDT
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 Adam Roben (:aroben) 2007-07-05 17:18:59 PDT
Created attachment 15408 [details]
shark sample

Here's a sample from clicking in a text field with many characters in it.
Comment 2 Adam Roben (:aroben) 2007-07-05 17:21:16 PDT
Created attachment 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 mitz 2007-07-06 01:47:19 PDT
Created attachment 15414 [details]
Avoid spurious layout due to mutating inner renderer's styles
Comment 4 mitz 2007-07-06 01:59:54 PDT
Comment on attachment 15414 [details]
Avoid spurious layout due to mutating inner renderer's styles

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 mitz 2007-07-06 05:40:57 PDT
Created attachment 15417 [details]
Avoid spurious layout due to mutating inner renderer's styles
Comment 6 Beth Dakin 2007-07-06 09:37:05 PDT
Comment on attachment 15417 [details]
Avoid spurious layout due to mutating inner renderer's styles

Looks good!
Comment 7 Mark Rowe (bdash) 2007-07-06 19:36:39 PDT
Landed in r24083.