Open
Bug 583775
Opened 14 years ago
Updated 2 years ago
Use HTMLWhitespace to trim whitespace for script event handlers attributes
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: mounir, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
4.38 KB,
patch
|
Ms2ger
:
review+
|
Details | Diff | Splinter Review |
IsHTMLWhitespace is checking for HTML5 whitespace which includes more characters than IsAsciiSpace. Very likely, TrimWhitespace<nsCRT::IsAsciiSpace> callers want to call TrimWhitespace<nsContentUtils::IsHTMLWhitespace>.
Reporter | ||
Updated•14 years ago
|
Whiteboard: [good first bug]
Comment 1•14 years ago
|
||
Might be a good time to make nsContentUtils::TrimCharsInSet consumers use TrimWhitespace instead.
Reporter | ||
Comment 2•13 years ago
|
||
If you want to work on that, feel free to contact me on IRC (nick: volkmar) or by email.
Whiteboard: [good first bug] → [mentor=volkmar]
Updated•13 years ago
|
Assignee: nobody → chrisf
Updated•13 years ago
|
Attachment #537379 -
Flags: review?(mounir.lamouri)
Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 537379 [details] [diff] [review] changed rellevent locations on for IsAscciSpace Review of attachment 537379 [details] [diff] [review]: ----------------------------------------------------------------- I agree with the changes you did but why didn't you change this call: https://mxr.mozilla.org/mozilla-central/source/content/events/src/nsDOMDataTransfer.cpp#330 f=me for the moment. Please ask back for a review if you didn't change the call I pointed for good reasons or with a new patch.
Attachment #537379 -
Flags: review?(mounir.lamouri) → feedback+
Reporter | ||
Comment 5•13 years ago
|
||
Changing the assignee given that we got a patch from someone else. Chris, feel free to email me if you want to work on something else.
Assignee: chrisf → tsurdor
Comment 6•13 years ago
|
||
(In reply to comment #4) > Comment on attachment 537379 [details] [diff] [review] [review] > changed rellevent locations on for IsAscciSpace > > Review of attachment 537379 [details] [diff] [review] [review]: > ----------------------------------------------------------------- > > I agree with the changes you did but why didn't you change this call: > https://mxr.mozilla.org/mozilla-central/source/content/events/src/ > nsDOMDataTransfer.cpp#330 > > f=me for the moment. Please ask back for a review if you didn't change the > call I pointed for good reasons or with a new patch. You can blame me for that one. Without a spec, I'd rather not change behaviour here. Note that the change to ProcessViewportToken in nsContentUtils.cpp is wrong per <http://dev.w3.org/csswg/css-device-adapt/#parsing-algorithm>. The change in nsScriptLoader.cpp is correct. In any case, this needs tests.
Reporter | ||
Comment 7•13 years ago
|
||
(In reply to comment #6) > You can blame me for that one. Without a spec, I'd rather not change > behaviour here. If the spec say spacing characters should be trimmed, it will be HTML5 definition of spacing characters so we will have to change our code. IMO, it would be better to change this code now. > Note that the change to ProcessViewportToken in nsContentUtils.cpp is wrong > per <http://dev.w3.org/csswg/css-device-adapt/#parsing-algorithm>. The > change in nsScriptLoader.cpp is correct. Indeed :) > In any case, this needs tests. I agree.
Comment 8•11 years ago
|
||
Can you confirm that you're still working on this bug?
Flags: needinfo?(tsurdor)
Reporter | ||
Comment 9•11 years ago
|
||
Assignee: tsurdor → mounir
Attachment #537379 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #792736 -
Flags: review?(Ms2ger)
Flags: needinfo?(tsurdor)
Reporter | ||
Updated•11 years ago
|
Whiteboard: [mentor=volkmar]
Reporter | ||
Updated•11 years ago
|
Flags: in-testsuite+
Summary: Change TrimWhitespace<nsCRT::IsAsciiSpace> calls to TrimWhitespace<nsContentUtils::IsHTMLWhitespace> if possible → Use HTMLWhitespace to trim whitespace for script event handlers attributes
Comment 10•11 years ago
|
||
Comment on attachment 792736 [details] [diff] [review] Use HTMLWhitespace to trim script event handler attributes Review of attachment 792736 [details] [diff] [review]: ----------------------------------------------------------------- Missing a commit message. This *should* make us pass some imported tests; don't forget to update the expected failures. ::: content/html/content/test/test_script_event_handler.html @@ +12,5 @@ > + var executed = 0; > + </script> > + <script> > + executed++; > + ok(true, "should be executed"); The ok(true) ones aren't terribly useful. Fine either way. @@ +65,5 @@ > + executed++; > + ok(true, "should be executed"); > + </script> > + <script> > + is(executed, 9, "should got 9 executions"); "should get", if you think that's useful
Attachment #792736 -
Flags: review?(Ms2ger) → review+
Comment 11•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: mounir → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•