Port bug 1479125 to Thunderbird: Rewrite callers firstChild/lastChild/childNodes/previousSibling/nextSibling with firstElementChild/lastElementChild/children/previousElementSibling/nextElementSibling
Categories
(Thunderbird :: General, task)
Tracking
(Not tracked)
People
(Reporter: mkmelin, Assigned: mkmelin)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
357.89 KB,
patch
|
pmorris
:
review+
|
Details | Diff | Splinter Review |
39.63 KB,
patch
|
Details | Diff | Splinter Review |
Rewrite callers firstChild/lastChild/childNodes/previousSibling/nextSibling with firstElementChild/lastElementChild/children/previousElementSibling/nextElementSibling
https://hg.mozilla.org/integration/autoland/rev/c266a7f4237e - quoting the commit message:
This allows the JS to work in HTML documents, where whitespace is preserved. In XUL
documents, whitespace is ignored when parsing so text nodes are generally not returned.
The following changes were made, with manual cleanups as necessary (i.e. when firstChild actually refers to a text node, or when firstChild is used in a loop to empty out an element):
firstChild->firstElementChild
lastChild->lastElementChild
nextSibling->nextElementSibling
previousSibling->previousElementSibling
childNodes->children
Assignee | ||
Comment 1•5 years ago
|
||
This is a pretty large patch. I'll attach one with the manual changes needed after the automatic replacements had been done. (See the hg commit message for what was done.)
Assignee | ||
Comment 2•5 years ago
|
||
Manual changes. These are already folded in the main patch to ease review.
Assignee | ||
Comment 3•5 years ago
|
||
Fixed the test failure locally.
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Yeah you're right we shouldn't change TeXZilla.js
In general, the files I've now excluded are related to composition (or addr book since that has a childNodes, grr!).
Assignee | ||
Comment 6•5 years ago
|
||
The manual parts, updated.
Assignee | ||
Comment 7•5 years ago
|
||
Comment 8•5 years ago
|
||
Assignee | ||
Comment 9•5 years ago
|
||
Final try: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=1a7bb64dbbbc418984d2ef639bc6c8ede8c36276
Landing it later tonight.
Comment 10•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/a128f9557e9d
Port bug 1479125 to Thunderbird: Rewrite callers firstChild/lastChild/childNodes/previousSibling/nextSibling with firstElementChild/lastElementChild/children/previousElementSibling/nextElementSibling. r=pmorris
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Magnus, I think you caused a whole bunch of test failures here.
Already on your try:
TEST-UNEXPECTED-FAIL | Z:\task_1570966607\build\tests\mozmill\message-header\test-reply-identity.js | test-reply-identity.js::test_reply_no_matching_identity
And then on the push:
https://treeherder.mozilla.org/#/jobs?repo=comm-central&revision=a128f9557e9db7951a9d8d6467e553fdccb8a0f5
TEST-UNEXPECTED-FAIL | /builds/worker/workspace/build/tests/mozmill/message-header/test-reply-identity.js | test-reply-identity.js::test_reply_matching_only_deliveredto
TEST-UNEXPECTED-FAIL | /builds/worker/workspace/build/tests/mozmill/message-header/test-reply-identity.js | test-reply-identity.js::test_reply_matching_subaddress
Comment 12•5 years ago
|
||
mozmake SOLO_TEST=message-header/test-reply-identity.js mozmill-one passes locally.
Comment 13•5 years ago
|
||
Hmm, I tried to run the entire directory and crashed on test-phishing-bar.js with:
TEST-START | c:\mozilla-source\comm-central\comm\mail\test\mozmill\message-header\test-phishing-bar.js | test_no_phishing_warning_for_ip_sameish_text
[5788, Main Thread] WARNING: '!ClientIsValidPrincipalInfo(mClientInfo.PrincipalInfo())', file c:/mozilla-source/comm-central/dom/clients/manager/ClientSource.cpp, line 176
++DOMWINDOW == 84 (000001FC4CD1C000) [pid = 5788] [serial = 95] [outer = 000001FC493B05C0]
[5788, Main Thread] WARNING: Failed to retarget HTML data delivery to the parser thread.: file c:/mozilla-source/comm-central/parser/html/nsHtml5StreamParser.cpp, line 1142
Assertion failure: (((HRESULT)(hr)) >= 0), at c:/mozilla-source/comm-central/obj-x86_64-pc-mingw32/dist/include\mozilla/ShellHeaderOnlyUtils.h:132
#01: nsExternalHelperAppService::LoadURI (c:\mozilla-source\comm-central\uriloader\exthandler\nsExternalHelperAppService.cpp:966)
#02: XPTC__InvokebyIndex[c:\mozilla-source\comm-central\obj-x86_64-pc-mingw32\dist\bin\xul.dll +0x8dd6c62]
#03: CallMethodHelper::Call (c:\mozilla-source\comm-central\js\xpconnect\src\XPCWrappedNative.cpp:1183)
#04: XPCWrappedNative::CallMethod (c:\mozilla-source\comm-central\js\xpconnect\src\XPCWrappedNative.cpp:1149)
#05: XPC_WN_CallMethod (c:\mozilla-source\comm-central\js\xpconnect\src\XPCWrappedNativeJSOps.cpp:946)
I took some subtests of test-phishing-bar.js out and now the entire directory passes.
Here's a try run with that. I guess I need to file a new bug for the test-phishing-bar.js failures which drag everything else down:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=80ec64e7abea4411e3b5a0b075ac13e3c2226046
Description
•