Closed Bug 664968 Opened 13 years ago Closed 11 years ago

Create a frame stub for <input type=number>

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 635240

People

(Reporter: mounir, Assigned: jwatt)

References

Details

Attachments

(1 file)

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.
Depends on: 665612
Attached patch Patch v1Splinter Review
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.
No longer depends on: 665612
Depends on: 665655
Attachment #540552 - Flags: review?(dbaron)
Whiteboard: [needs review]
Blocks: 665884
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.
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.
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 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-
jwatt is going to take this.
Assignee: mounir → jwatt
Whiteboard: [needs review]
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.)
No longer blocks: 635240
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: