Closed
Bug 167762
Opened 24 years ago
Closed 23 years ago
Make nsIFormControl::GetType() return int instead of nsresult
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: john, Assigned: john)
Details
Attachments
(1 file, 1 obsolete file)
|
37.47 KB,
patch
|
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
nsIFormControl::GetType() requires an out parameter instead of returning an int.
It *always* returns a value and *never* returns any nsresult other than NS_OK.
It should be changed to NS_IMETHOD_(PRInt32). Not only would it make callers
simpler, it would make things less confusing--"do I have to check the return
value or not?"
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•23 years ago
|
||
This also makes nsIFormControlFrame::GetType() do the same thing.
| Assignee | ||
Updated•23 years ago
|
Attachment #109640 -
Flags: review?(peterl)
Comment 2•23 years ago
|
||
Comment on attachment 109640 [details] [diff] [review]
Patch
Looks good, r=peterl, but did these two sections accidentally slip in?
>Index: layout/html/style/src/nsCSSFrameConstructor.cpp
>===================================================================
>@@ -4934,7 +4932,6 @@
> if (!aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames
> ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems);
> }
>- isReplaced = PR_TRUE;
>
> PRBool allowSubframes = PR_TRUE;
> if (aPresContext) {
>@@ -7327,6 +7324,9 @@
> {
>+ if (aTag == nsHTMLAtoms::noframes) {
>+ printf("noframes\n");
>+ }
> // The following code allows the user to specify the base tag
> // of an element using XBL. XUL and HTML objects (like boxes, menus, etc.)
> // can then be extended arbitrarily.
Attachment #109640 -
Flags: review?(peterl) → review+
| Assignee | ||
Comment 3•23 years ago
|
||
Excellent catch!
| Assignee | ||
Updated•23 years ago
|
Attachment #109640 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•23 years ago
|
||
Comment on attachment 109686 [details] [diff] [review]
Patch v1.1
Peter has already reviewed this.
Attachment #109686 -
Flags: superreview?(kin)
Comment 5•23 years ago
|
||
Comment on attachment 109686 [details] [diff] [review]
Patch v1.1
>+ * @return the type to be returned [OUT]
You want to remove the [OUT] no? And maybe clarify that a tad? "Return the
type to be returned" sounds a bit flaky. What about:
@return the type of the form control.
Comment on attachment 109686 [details] [diff] [review]
Patch v1.1
sr=kin@netscape.com
Just address caillon's issue and check if the following change needs the type
to mType treatment:
@@ -2022,8 +1996,7 @@
Attachment #109686 -
Flags: superreview?(kin) → superreview+
| Assignee | ||
Comment 7•23 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•