Open
Bug 868874
Opened 12 years ago
Updated 2 months ago
Make HTMLInputElement use the version of Decimal::toString() that returns a std::string
Categories
(Core :: DOM: Forms, defect)
Core
DOM: Forms
Tracking
()
NEW
People
(Reporter: jwatt, Assigned: jwatt)
References
Details
Attachments
(2 files)
As noted in bug 854531 comment 30, I had to add a second version of the Decimal::toString method with a char* outparam and make HTMLInputElement use that for now. Once bug 868814 is fixed we can make HTMLInputElement use the version of Decimal::toString() that returns a std::string (the only one that exists upstream).
Attachment #745719 -
Flags: review?(mounir)
Comment 1•12 years ago
|
||
Comment on attachment 745719 [details] [diff] [review]
patch
Review of attachment 745719 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/html/content/src/HTMLInputElement.cpp
@@ +1346,5 @@
> case NS_FORM_INPUT_NUMBER:
> case NS_FORM_INPUT_RANGE:
> {
> + std::string valueAsStr = aValue.toString();
> + aResultString.AssignASCII(valueAsStr.c_str());
Why not:
aResultString.AssignASCII(aValue.toString().c_str());
@@ +3507,5 @@
> }
>
> if (needSanitization) {
> + std::string valueAsStr = value.toString();
> + aValue.AssignASCII(valueAsStr.c_str());
ditto
@@ +5451,5 @@
> Decimal maximum = GetMaximum();
> MOZ_ASSERT(!maximum.isNaN());
>
> + std::string maximumAsStr = maximum.toString();
> + maxStr.AssignASCII(maximumAsStr.c_str());
ditto
@@ +5476,5 @@
> Decimal minimum = GetMinimum();
> MOZ_ASSERT(!minimum.isNaN());
>
> + std::string minimumAsStr = minimum.toString();
> + minStr.AssignASCII(minimumAsStr.c_str());
ditto
Attachment #745719 -
Flags: review?(mounir) → review+
Updated•4 years ago
|
Component: DOM: Core & HTML → DOM: Forms
Updated•2 years ago
|
Severity: normal → S3
Comment 2•2 months ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•