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.
Created attachment 15408 [details] shark sample Here's a sample from clicking in a text field with many characters in it.
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.
Created attachment 15414 [details] Avoid spurious layout due to mutating inner renderer's styles
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).
Created attachment 15417 [details] Avoid spurious layout due to mutating inner renderer's styles
Comment on attachment 15417 [details] Avoid spurious layout due to mutating inner renderer's styles Looks good!
Landed in r24083.