[webkit-reviews] review denied: [Bug 70586] [Forms] Setting defaultValue should hide an input placeholder. : [Attachment 112150] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 23 22:42:06 PDT 2011


Darin Adler <darin at apple.com> has denied yosin at chromium.org's request for
review:
Bug 70586: [Forms] Setting defaultValue should hide an input placeholder.
https://bugs.webkit.org/show_bug.cgi?id=70586

Attachment 112150: Patch
https://bugs.webkit.org/attachment.cgi?id=112150&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=112150&action=review


Thanks for tackling this.

> Source/WebCore/html/HTMLInputElement.cpp:1303
> +    updatePlaceholderVisibility(false);

This is the wrong way to do it. You also want the placeholder to go away if the
value attribute is set directly. For example, if your test said this:

    document.getElementById("c1").setAttribute("value", "Default");

We need to test both cases, and we need code that works in both cases.

The way to do that is to put the code into parseMappedAttribute, in the case
for valueAttr. In fact, it should go inside the !hasDirtyValue if statement,
since it only needs to run if the default value hasn’t been overwritten.


More information about the webkit-reviews mailing list