WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
13534
REGRESSION: setting innerHTML to null doesn't work correctly
https://bugs.webkit.org/show_bug.cgi?id=13534
Summary
REGRESSION: setting innerHTML to null doesn't work correctly
Alexey Proskuryakov
Reported
2007-04-28 08:12:00 PDT
Setting innerHTML to null sets it to "null" instead. As discussed in
bug 13448
, this is likely to be a problem with all settable properties, but I didn't see any follow-up bug filed (or did I just miss it?).
Attachments
test case
(136 bytes, text/html)
2007-04-28 08:12 PDT
,
Alexey Proskuryakov
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2007-04-28 08:12:31 PDT
Created
attachment 14241
[details]
test case
Darin Adler
Comment 2
2007-04-28 10:52:46 PDT
The binding for innerHTML is not automatically generated. So unlike
bug 13448
, [ConvertNullToNullString] in the IDL file is not the way to fix the bug (although it would not hurt to have that there to prepare for the day when we do auto-generate the binding). The fix for this bug goes in JSHTMLElement::putValueProperty in kjs_html.cpp. Instead of value->toString(), that function needs to use valueToStringWithNullCheck() in at least some of the cases. This is a general problem area for our bindings for functions and properties that take and return strings. Many are untested about whether they should accept null or undefined as a special values or return null or undefined rather than empty string in some cases. Another problem area is that is untested is whether functions return null or undefined. I believe we return undefined in many cases where null would be better/correct.
Darin Adler
Comment 3
2007-04-28 10:56:01 PDT
<
rdar://problem/5168940
>
Sam Weinig
Comment 4
2007-04-29 08:04:25 PDT
A more general follow up bug to
bug 13448
has been filed as
bug 13541
.
Sam Weinig
Comment 5
2007-05-16 10:05:16 PDT
Fixed by the first patch in
bug 13722
, landed in
r21489
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug