[webkit-reviews] review denied: [Bug 54476] HTMLInputElement has two similarly named methods: "checked" and "isChecked" : [Attachment 100081] Updated Patch v2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 11 09:40:32 PDT 2011


Darin Fisher (:fishd, Google) <fishd at chromium.org> has denied SravanKumar
<sravan.ken at gmail.com>'s request for review:
Bug 54476: HTMLInputElement has two similarly named methods: "checked" and
"isChecked"
https://bugs.webkit.org/show_bug.cgi?id=54476

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

------- Additional Comments from Darin Fisher (:fishd, Google)
<fishd at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=100081&action=review


> Source/WebCore/html/HTMLInputElement.h:129
> +    virtual bool isInputTypeChecked() const;

this name doesn't seem to improve things.  if i told you that an input element
has
two properties, checked and input-type-checked, would you have any idea what
the
difference is?

it seems like there are really two properties here: a checked property and a
can-render-as-checked property.  the problem here is that checked() returns the

first, and isChecked() returns the AND of both.

one solution is to expose both methods, and then fix callsites to check both
properties.  another idea is to come up with a good name for the AND case.

an uncreative approach:

  isCheckedAndCanRenderAsChecked

maybe a shorter name would be:

  shouldRenderAsChecked or even renderAsChecked

my vote is to go with renderAsChecked.


More information about the webkit-reviews mailing list