RESOLVED FIXED 6665
Implement NSView-less version of <input type="text">
https://bugs.webkit.org/show_bug.cgi?id=6665
Summary Implement NSView-less version of <input type="text">
Adele Peterson
Reported 2006-01-18 22:50:20 PST
Attachments
initial implementation (22.79 KB, patch)
2006-01-18 22:52 PST, Adele Peterson
hyatt: review-
latest patch (22.52 KB, patch)
2006-01-19 00:26 PST, Adele Peterson
no flags
a few minor tweaks (22.41 KB, patch)
2006-01-19 00:35 PST, Adele Peterson
darin: review+
Adele Peterson
Comment 1 2006-01-18 22:51:21 PST
The initial implementation can be turned on with -khtml-appearance: textfield . We'll use this until the basic functionality and style is finished.
Adele Peterson
Comment 2 2006-01-18 22:52:04 PST
Created attachment 5774 [details] initial implementation
Dave Hyatt
Comment 3 2006-01-18 23:15:04 PST
Comment on attachment 5774 [details] initial implementation (1) Make a note about focusability. By making the shadow div focusable, the input field won't have the focus (and so onfocus/blur won't work). You will have to do something similar to XBL, making both the div and the input element focused together (changes in focus that remain inside shadow content don't affect the focus on the outer element). (2) Make a note about mouse events as well. Shadow content cannot be exposed to the user/author by default, so the engine should internally know when it's over shadow content but will have to retarget DOM events when it crosses shadow scope boundaries. (3) In places where you rely on falling through to a subsequent case statement, it might be nice to have a "// Fall through" comment to make that clear. (4) For destroyLeftoverChildren, I'd add a comment along the lines of: "Destroy any anonymous children remaining in the render tree, as well as implicit (shadow) DOM elements like those used in the engine-based textfields." (5) You don't need "using namespace DOM in RenderTextField.cpp, since DOM = khtml = WebCore now. Also go ahead and put the header and implementation files in namespace WebCore rather than khtml, since we're switching to that. (6) I would actually add a comment to the RenderTextField destructor that the renderer m_div has already been destroyed by destroyLeftoverChildren. (7) You do not need to override addChild and removeChild. An input field doesn't have child content from the DOM. I assume you copied that from button, but you shouldn't need it. (8) I would change your "getDivStyle" method to be "createDivStyle", since it always makes a new one. (9) Single line ifs should not have braces (as in RenderTextField::setStyle). (10) I'm not sure why button-bevel has been added to cssvalues.in. I assume that's a typo. Looks great! It's awesome that it's pretty functional without a huge amount of code!
Adele Peterson
Comment 4 2006-01-18 23:48:19 PST
For reference, adding link hyatt sent me about events in xbl: http://www.mozilla.org/projects/xbl/ xbl2.html#event2
Adele Peterson
Comment 5 2006-01-19 00:26:57 PST
Created attachment 5777 [details] latest patch Uploading new patch to address hyatt's comments. Also, we discussed the button-bevel fix- which is to match the enum in RenderStyle.
Adele Peterson
Comment 6 2006-01-19 00:27:39 PST
also, layout tests pass
Adele Peterson
Comment 7 2006-01-19 00:35:00 PST
Created attachment 5779 [details] a few minor tweaks
Note You need to log in before you can comment on or make changes to this bug.