Failing message composition tests after bug 1726064
Categories
(Core :: DOM: Editor, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox-esr91 | --- | unaffected |
firefox91 | --- | unaffected |
firefox92 | --- | unaffected |
firefox93 | --- | fixed |
People
(Reporter: darktrojan, Assigned: masayuki)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
The failing tests are:
- comm/mail/test/browser/composition/browser_attachmentDragDrop.js
- comm/mail/test/browser/composition/browser_imageInsertionDialog.js
- comm/mail/test/browser/content-policy/browser_composeMailto.js
All have nsIHTMLEditor.insertElementAtSelection returning NS_ERROR_FAILURE
. I backed out 30478b345a7e1a0bfab8c20dcc9a8784efb36a79 and the tests pass.
Assignee | ||
Comment 1•3 years ago
|
||
Do you see warnings of debug build at the XPCOM API returning error? Currently, editor's warnings show the failing stack and lines.
Reporter | ||
Comment 2•3 years ago
•
|
||
Is this what you're after?
Edit: here's another one. The third test doesn't run in debug.
Assignee | ||
Comment 3•3 years ago
•
|
||
Thanks, perhaps, this is what I want to know:
WARNING: '!editingHost', file /builds/worker/checkouts/gecko/editor/libeditor/HTMLEditor.cpp:752
WARNING: '!editingHost', file /builds/worker/checkouts/gecko/editor/libeditor/HTMLEditor.cpp:1856
WARNING: '!targetElement', file /builds/worker/checkouts/gecko/editor/libeditor/EditorBase.cpp:2353
WARNING: HTMLEditor::InsertElementAtSelectionAsAction() failed: 'NS_SUCCEEDED(rv)', file /builds/worker/checkouts/gecko/editor/libeditor/HTMLEditor.cpp:1730
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIHTMLEditor.insertElementAtSelection]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://messenger/content/messengercompose/EdImageProps.js :: onAccept :: line 235" data: no]
So, it does not provide the stack at failing, but it's also a big hint.
Assignee | ||
Comment 4•3 years ago
|
||
Really odd. All error cases put warnings:
https://searchfox.org/mozilla-central/source/editor/libeditor/HTMLEditor.cpp#1736-1737,1743-1746,1759-1762,1772-1773,1780-1781,1789-1790,1797-1798,1813-1816,1821-1823,1835-1836,1843-1844,1856-1857,1866-1867,1873-1876,1881-1882,1885-1886,1889-1890,1894-1895,1913-1915
Anyway, if ScanEmptyBlockInclusiveAncestor
returns nullptr
and it causes error of InsertHTMLAtSelectionAsAction
, it seems that the HTMLEditor
works with nested editing hosts unless my patch does wrong. However, there are a lot of warning of non-editable situations, e.g., not found an editing host from selection, absolutely positioned element handling reached <html>
element at scanning such element. So, it seems that the mail code depends on buggy behavior before landing my patch.
If you wrap those lines with try {} catch (ex) {}
, what happends?
- https://searchfox.org/comm-central/rev/54208b3d0d5382054ce7712a517abb67ef4612c9/mail/components/compose/content/dialogs/EdImageProps.js#232,235
- https://searchfox.org/comm-central/rev/54208b3d0d5382054ce7712a517abb67ef4612c9/mail/components/compose/content/MsgComposeCommands.js#8561
Ignoring the exception causes unexpected content staying and expected content want's inserted? (And I don't think that Thunderbird uses contenteditable="false"
in its UI code. So, I'm really confused why the patch affects to Tb since the patches try to fix nested contenteditable
elements issues. So, for solving it, editable state is checked stricter than before in some places.)
Assignee | ||
Comment 5•3 years ago
|
||
I wonder, how can I use Developer Tools in the email composing window?
Reporter | ||
Comment 6•3 years ago
|
||
It's not perfect, but you can select messengercompose.xhtml from the menu top-right corner (next to the three-dots menu). The debugger may or many not work from there, it's not very reliable.
Assignee | ||
Comment 7•3 years ago
|
||
Thanks! It's enough to check the DOM tree.
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 9•3 years ago
|
||
Ah, I read the warnings wrong. Perhaps, it deletes <body>
and/or <html>
unexpectedly due to they can be empty. Then, the editor loose edting host and returns error.
Assignee | ||
Comment 10•3 years ago
|
||
Reporter | ||
Comment 11•3 years ago
|
||
That's great. Sorry to take up your entire Monday!
I've checked the tests that failed, and started a Try-CC run just in case something else turns up: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=5332bd9de3da91957fa7437f8ad11d4550a3ce1c
Assignee | ||
Comment 12•3 years ago
|
||
The new editor utility method does not stop scanning editable elements even if
it reaches the document root nor the (primary) <body>
element. Of course,
they should stop there if scanning editable block. And
ScanEmptyBlockInclusiveAncestor()
shouldn't store the removable empty block
element to them.
Depends on D123312
Assignee | ||
Comment 13•3 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #11)
That's great. Sorry to take up your entire Monday!
I've checked the tests that failed, and started a Try-CC run just in case something else turns up: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=5332bd9de3da91957fa7437f8ad11d4550a3ce1c
No worry. It's 100% of my mistake. I need to check similar code.
Comment 14•3 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/2139b3543587 `HTMLEditor` shouldn't strip `<html>` element nor `<body>` elements r=m_kato
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/30122 for changes under testing/web-platform/tests
Reporter | ||
Comment 16•3 years ago
|
||
Now there's a new problem: https://treeherder.mozilla.org/logviewer?job_id=349228271&repo=try-comm-central&lineNumber=26446
Still, 1 test failure is better than 3.
Assignee | ||
Comment 17•3 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #16)
Now there's a new problem: https://treeherder.mozilla.org/logviewer?job_id=349228271&repo=try-comm-central&lineNumber=26446
Still, 1 test failure is better than 3.
The first try had a bug. Could you retry it with the landed one?
(Sorry, I'm now in my bed.)
Comment 18•3 years ago
|
||
Set release status flags based on info from the regressing bug 1726064
Comment 19•3 years ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Reporter | ||
Comment 21•3 years ago
|
||
It's still there, I'll make a new bug for it since this one closed.
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Updated•3 years ago
|
Description
•