Bug 21903 - input property placeholder should be part of the DOM
Summary: input property placeholder should be part of the DOM
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Enhancement
Assignee: Erik Arvidsson
Depends on:
Blocks: HTML5Forms
  Show dependency treegraph
Reported: 2008-10-27 15:10 PDT by Michael Croft
Modified: 2009-05-12 22:37 PDT (History)
3 users (show)

See Also:

Path adding the DOM bindings. (8.27 KB, patch)
2009-05-11 19:54 PDT, Erik Arvidsson
eric: review+
Details | Formatted Diff | Diff
Style nits fixed (8.25 KB, patch)
2009-05-11 22:21 PDT, Erik Arvidsson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Croft 2008-10-27 15:10:43 PDT
I would like to read and write the placeholder property of input fields (assuming this property becomes part of HTML5, etc...)
Comment 1 Sam Sneddon [:gsnedders] 2009-03-06 11:35:52 PST
This is now part of HTML 5…
Comment 2 Erik Arvidsson 2009-04-23 17:17:04 PDT
Confirmed :-)
Comment 3 Erik Arvidsson 2009-05-07 18:28:51 PDT
I'm working on this.
Comment 4 Erik Arvidsson 2009-05-11 19:54:16 PDT
Created attachment 30215 [details]
Path adding the DOM bindings.
Comment 5 Eric Seidel (no email) 2009-05-11 20:50:41 PDT
Comment on attachment 30215 [details]
Path adding the DOM bindings.

Missing your email address in your second ChangeLog.

Tab here:
+	virtual void setPlaceholder(const String&);
which will make the commit fail (pre-commit hook which checks for Tabs in files).

The test case could have been writen using our js testing framework instead, but it's fine as is.

I can land this for you and make the tiny fixes when I do.
Comment 6 Erik Arvidsson 2009-05-11 22:21:33 PDT
Created attachment 30218 [details]
Style nits fixed
Comment 7 Eric Seidel (no email) 2009-05-12 20:38:53 PDT
I changed your test to be a fast/js style test when landing.

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	A	LayoutTests/fast/forms/placeholder-dom-property-expected.txt
	A	LayoutTests/fast/forms/placeholder-dom-property.html
	A	LayoutTests/fast/forms/resources/placeholder-dom-property.js
	M	WebCore/ChangeLog
	M	WebCore/dom/InputElement.cpp
	M	WebCore/dom/InputElement.h
	M	WebCore/html/HTMLInputElement.cpp
	M	WebCore/html/HTMLInputElement.h
	M	WebCore/html/HTMLInputElement.idl
	M	WebCore/rendering/RenderTextControlSingleLine.cpp
	M	WebCore/wml/WMLInputElement.h
Committed r43605

If you'd like to see how I changed it, see:
Comment 8 Eric Seidel (no email) 2009-05-12 20:40:11 PDT
The changed test:

You'll see that I removed the "can the HTML parser correctly parse an attribute value" part of the test, as it's covered by other cases.
Comment 9 Erik Arvidsson 2009-05-12 22:37:04 PDT
Thanks Eric. Much cleaner. Next time I'll use the webkit js testing framework.