Closed
Bug 664968
Opened 14 years ago
Closed 11 years ago
Create a frame stub for <input type=number>
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
DUPLICATE
of bug 635240
People
(Reporter: mounir, Assigned: jwatt)
References
Details
Attachments
(1 file)
(deleted),
patch
|
dbaron
:
review-
|
Details | Diff | Splinter Review |
The idea behind this bug is only to have a frame for <input type=number>, not to have something working. The frame will only contain a text field and the value owning logic between the frame and the content will not work.
Reporter | ||
Comment 1•14 years ago
|
||
This is patch creates nsNumberControlFrame.{h,cpp}, remove all code from previous patch that were here because <input type='number'> was using the text field layout. In addition, all current tests should pass. Though, with this patch applied (with the rest of the queue), you can't change the value of a number control by typing in it. Next patch will fix that.
Reporter | ||
Updated•14 years ago
|
Attachment #540552 -
Flags: review?(dbaron)
Reporter | ||
Updated•14 years ago
|
Whiteboard: [needs review]
Comment 2•13 years ago
|
||
Comment on attachment 540552 [details] [diff] [review]
Patch v1
>+void
>+nsNumberControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
>+{
>+ NS_ASSERTION(!GetPrevContinuation(),
>+ "nsNumberControlFrame should not have continuations; if it does we "
>+ "need to call RegUnregAccessKey only for the first.");
>+ nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), PR_FALSE);
Given that you're using nsBlockFrame::Reflow, you can't guarantee this.
(It's not clear to me why you're deriving from block frame, though. But if you are... why isn't it display:inline-block by default?)
Otherwise, this looks ok to me, though I'm not sure where you're going yet.
Comment 3•13 years ago
|
||
So I'm inclined to suggest that this shouldn't derive from nsBlockFrame -- but instead perhaps just directly from nsFrame -- since I don't think it needs splittability, multiple lines, etc. But I'm curious what roc and bz think.
I agree.
Comment 5•13 years ago
|
||
Well, it'd need to be a container frame. But in general, yeah...
I wish we had a container class that had a sane default reflow method.
Comment 6•13 years ago
|
||
Comment on attachment 540552 [details] [diff] [review]
Patch v1
ok, marking review- because I think it shouldn't be based on nsBlockFrame
Attachment #540552 -
Flags: review?(dbaron) → review-
Updated•11 years ago
|
Whiteboard: [needs review]
Comment 8•11 years ago
|
||
jwatt ended up adding a frame for this over in bug 635240, so I think we can just dupe this over to that bug. (Clearly that bug does not depend on this bug anymore.)
You need to log in
before you can comment on or make changes to this bug.
Description
•