[webkit-reviews] review denied: [Bug 18703] changing the 'size' property on a text input does not affect its length : [Attachment 22923] Improved possible fix for bug 18703

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 21 17:41:18 PDT 2008


Darin Adler <darin at apple.com> has denied Glenn Wilson <wilsong at gmail.com>'s
request for review:
Bug 18703: changing the 'size' property on a text input does not affect its
length
https://bugs.webkit.org/show_bug.cgi?id=18703

Attachment 22923: Improved possible fix for bug 18703
https://bugs.webkit.org/attachment.cgi?id=22923&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
This is the wrong place to make a change. The setSize function is a helper
function that calls setAttribute, but the same bug can happen if you call
setAttribute directly; you can do that from JavaScript. Just change the line in
your test from:

    document.getElementById('success').size=30;

to:

    document.getElementById('success').setAttribute("size", 30);

The code that always runs when sizeAttr is changed is in
HTMLInputElement::parseMappedAttribute, so if we need to do more work, it would
be there.

I think a direct call to setNeedsLayoutAndPrefWidthsRecalc on the renderer is
not correct. It may be as simple as calling setChanged. We should look at other
attributes that don't work via CSS but can affect the layout to find the right
pattern. I wasn't able to think of one right away -- maybe Hyatt can.


More information about the webkit-reviews mailing list