[Webkit-unassigned] [Bug 18703] changing the 'size' property on a text input does not affect its length

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 23 13:22:43 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=18703


gwilson at google.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22923|0                           |1
        is obsolete|                            |
  Attachment #24610|                            |review?
               Flag|                            |




------- Comment #8 from gwilson at google.com  2008-10-23 13:22 PDT -------
Created an attachment (id=24610)
 --> (https://bugs.webkit.org/attachment.cgi?id=24610&action=view)
Possible patch to bug 18703

Here is an improved patch for this issue; I think this addresses Darin's
points.

Instead of telling the renderer that the element is dirty in setSize of
HTMLInputElement, instead, this patch adds a small bit of logic to Element's
setAttribute method.  HTMLInputElement's setSize and parseMappedAttributes
functions both invoke Element.setAttribute, so calling either will show the
input resizing.

Additionally, I updated the layout test to verify that setting the size and
setAttribute("size") will update the size.

The other 'invalidation' methods (setChanged and attributeChanged,
specifically) did not seem to incur a later re-layout, so outside of defining a
new method, I had to call setNeedsLayoutAndPrefWidthsRecalc.  I think this
logic is correct: resizing an element that already had a size could have
dramatic effects on how a page is sized and layed out, right?

This logic was added to both setAttribute methods in dom/Element.  I'm not sure
why these two methods are not refactored, since they look strikingly similar,
but I don't know enough about their differences to refactor them here.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list