Closed
Bug 330469
Opened 20 years ago
Closed 19 years ago
[FIX]Submit button with empty value now has "Submit Query" text
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: martijn.martijn, Assigned: bzbarsky)
References
()
Details
(Keywords: fixed1.8.1, regression, testcase)
Attachments
(2 files, 2 obsolete files)
232 bytes,
text/html
|
Details | |
2.19 KB,
patch
|
sicking
:
review+
sicking
:
superreview+
|
Details | Diff | Splinter Review |
See upcoming testcase, basically this:
<input type="submit" value="">
should not give a "Submit Query" text inside the button.
This used to work in 2005-10-27 build, but not anymore in 2005-10-28 build:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-10-26+21&maxdate=2005-10-28+06&cvsroot=%2Fcvsroot
So my guess is a regression from bug 308270.
Reporter | ||
Comment 1•20 years ago
|
||
![]() |
Assignee | |
Comment 2•20 years ago
|
||
Yeah, this is a regression from the attribute landing... Martijn, for future please also cc the author of the patch that caused the regression, not just the reviewer? ;)
Note that the code has changed some since (to use GetValue()). I'm not too happy combining that with HasAttr, but I don't really see a better way...
Assignee: general → bzbarsky
Status: NEW → ASSIGNED
Attachment #215023 -
Flags: superreview?(peterv)
Attachment #215023 -
Flags: review?(bugmail)
![]() |
Assignee | |
Updated•20 years ago
|
Blocks: 308270
OS: Windows XP → All
Priority: -- → P2
Hardware: PC → All
Summary: Submit button with empty value now has "Submit Query" text → [FIX]Submit button with empty value now has "Submit Query" text
Target Milestone: --- → mozilla1.9alpha
Comment 3•20 years ago
|
||
dupe of 318552? or the other way since this has a patch
![]() |
Assignee | |
Comment 4•20 years ago
|
||
*** Bug 318552 has been marked as a duplicate of this bug. ***
![]() |
Assignee | |
Comment 5•20 years ago
|
||
Attachment #215023 -
Attachment is obsolete: true
Attachment #215025 -
Flags: superreview?(peterv)
Attachment #215025 -
Flags: review?(bugmail)
Attachment #215023 -
Flags: superreview?(peterv)
Attachment #215023 -
Flags: review?(bugmail)
Reporter | ||
Comment 6•20 years ago
|
||
(In reply to comment #2)
> Yeah, this is a regression from the attribute landing... Martijn, for future
> please also cc the author of the patch that caused the regression, not just the
> reviewer? ;)
Uhm, my guess was a regression from bug 308270, which you fixed, not?
![]() |
Assignee | |
Comment 7•20 years ago
|
||
Oh, oops. It was a regression from 311827, not 308270. ;) I looked at the bonsai list and didn't realize that the bug# cited in this bug was different.... It's clearly time for vacation.
Updated•20 years ago
|
Attachment #215025 -
Flags: superreview?(peterv) → superreview+
Comment on attachment 215025 [details] [diff] [review]
Right fix
Just call GetAttr instead. You're relying on that the label lives in the value-attribute anyway. (which is a pretty safe assumption i'd say)
Attachment #215025 -
Flags: review?(bugmail) → review-
![]() |
Assignee | |
Comment 9•19 years ago
|
||
Comment on attachment 215025 [details] [diff] [review]
Right fix
Calling GetAttr() will get the wrong string. The label is _based_ on the value attribute, but is not _equal_ to the value attribute. See the blame for the code I'm modifying for details. All I want to tell is whether what GetValue() is returning is based on something the page specified or not; if it returned null for no value attr I wouldn't have to do this, but it doesn't, so...
Attachment #215025 -
Flags: review- → review?(bugmail)
Could we do this:
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::value)) {
elt->GetValue(aLabel);
}
else {
rv = GetDefaultLabel(aLabel);
NS_ENSURE_SUCCESS(rv, rv);
}
![]() |
Assignee | |
Comment 11•19 years ago
|
||
We could if we want to assume GetValue is infallible.
I'd be fine with that. Or you could add an NS_ENSURE_SUCCESS after GetValue. If GetValue fails I'm not sure we want to use fallback.
![]() |
Assignee | |
Comment 13•19 years ago
|
||
Attachment #215025 -
Attachment is obsolete: true
Attachment #217181 -
Flags: superreview?(bugmail)
Attachment #217181 -
Flags: review?(bugmail)
Attachment #215025 -
Flags: review?(bugmail)
Comment on attachment 217181 [details] [diff] [review]
With that approach
r/sr=sicking
Attachment #217181 -
Flags: superreview?(bugmail)
Attachment #217181 -
Flags: superreview+
Attachment #217181 -
Flags: review?(bugmail)
Attachment #217181 -
Flags: review+
![]() |
Assignee | |
Comment 15•19 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 16•19 years ago
|
||
Fixed on 1.8 branch by combined patch from bug 114997 comment 83 (checkin by bzbarsky, comment 86).
Keywords: fixed1.8.1
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•