Closed Bug 1676702 Opened 1 year ago Closed 5 months ago

Intermittent editor/libeditor/tests/test_cut_copy_password.html | Timed out while polling clipboard for requested data, got: waitForClipboard-known-value-0.10851663164183323

Categories

(Core :: DOM: Editor, defect, P5)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: masayuki)

References

Details

(Keywords: intermittent-failure)

Attachments

(4 files)

Filed by: apavel [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=321473766&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/PUwBxDyMTTeiqPPl3SQzcg/runs/0/artifacts/public/logs/live_backing.log


[task 2020-11-11T17:15:10.867Z] 17:15:10     INFO - TEST-START | editor/libeditor/tests/test_cut_copy_password.html
[task 2020-11-11T17:15:36.358Z] 17:15:36     INFO - TEST-INFO | started process screenshot
[task 2020-11-11T17:15:36.448Z] 17:15:36     INFO - TEST-INFO | screenshot: exit 0
[task 2020-11-11T17:15:36.449Z] 17:15:36     INFO - Buffered messages logged at 17:15:10
[task 2020-11-11T17:15:36.449Z] 17:15:36     INFO - must wait for load
[task 2020-11-11T17:15:36.449Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Trying to copy masked password... 
[task 2020-11-11T17:15:36.450Z] 17:15:36     INFO - Initializing clipboard with "waitForClipboard-known-value-0.006311119207081162"...
[task 2020-11-11T17:15:36.450Z] 17:15:36     INFO - Succeeded initializing clipboard, start requested things...
[task 2020-11-11T17:15:36.450Z] 17:15:36     INFO - Buffered messages logged at 17:15:16
[task 2020-11-11T17:15:36.450Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Timed out while polling clipboard for requested data, got: waitForClipboard-known-value-0.006311119207081162 
[task 2020-11-11T17:15:36.451Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Copying masked password shouldn't copy raw value into the clipboard 
[task 2020-11-11T17:15:36.451Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Copying masked password shouldn't copy masked value into the clipboard 
[task 2020-11-11T17:15:36.452Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Trying to cut masked password... 
[task 2020-11-11T17:15:36.452Z] 17:15:36     INFO - Initializing clipboard with "waitForClipboard-known-value-0.39932074602308254"...
[task 2020-11-11T17:15:36.453Z] 17:15:36     INFO - Succeeded initializing clipboard, start requested things...
[task 2020-11-11T17:15:36.453Z] 17:15:36     INFO - Buffered messages logged at 17:15:21
[task 2020-11-11T17:15:36.454Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Timed out while polling clipboard for requested data, got: waitForClipboard-known-value-0.39932074602308254 
[task 2020-11-11T17:15:36.454Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting masked password shouldn't copy raw value into the clipboard 
[task 2020-11-11T17:15:36.454Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting masked password shouldn't copy masked value into the clipboard 
[task 2020-11-11T17:15:36.454Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting masked password shouldn't modify the value 
[task 2020-11-11T17:15:36.455Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Trying to copy partially masked password... 
[task 2020-11-11T17:15:36.455Z] 17:15:36     INFO - Initializing clipboard with "waitForClipboard-known-value-0.8448542607820275"...
[task 2020-11-11T17:15:36.455Z] 17:15:36     INFO - Succeeded initializing clipboard, start requested things...
[task 2020-11-11T17:15:36.455Z] 17:15:36     INFO - Buffered messages logged at 17:15:26
[task 2020-11-11T17:15:36.456Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Timed out while polling clipboard for requested data, got: waitForClipboard-known-value-0.8448542607820275 
[task 2020-11-11T17:15:36.456Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Copying partially masked password shouldn't copy raw value into the clipboard 
[task 2020-11-11T17:15:36.456Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Copying partially masked password shouldn't copy partially masked value into the clipboard 
[task 2020-11-11T17:15:36.457Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Copying partially masked password shouldn't copy masked value into the clipboard 
[task 2020-11-11T17:15:36.457Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Trying to cut partially masked password... 
[task 2020-11-11T17:15:36.457Z] 17:15:36     INFO - Initializing clipboard with "waitForClipboard-known-value-0.7889237534774878"...
[task 2020-11-11T17:15:36.457Z] 17:15:36     INFO - Succeeded initializing clipboard, start requested things...
[task 2020-11-11T17:15:36.458Z] 17:15:36     INFO - Buffered messages logged at 17:15:31
[task 2020-11-11T17:15:36.458Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Timed out while polling clipboard for requested data, got: waitForClipboard-known-value-0.7889237534774878 
[task 2020-11-11T17:15:36.458Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting partially masked password shouldn't copy raw value into the clipboard 
[task 2020-11-11T17:15:36.458Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting partially masked password shouldn't copy partially masked value into the clipboard 
[task 2020-11-11T17:15:36.458Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting partially masked password shouldn't copy masked value into the clipboard 
[task 2020-11-11T17:15:36.458Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting partially masked password shouldn't modify the value 
[task 2020-11-11T17:15:36.458Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Trying to copy unmasked password... 
[task 2020-11-11T17:15:36.459Z] 17:15:36     INFO - Initializing clipboard with "waitForClipboard-known-value-0.10851663164183323"...
[task 2020-11-11T17:15:36.459Z] 17:15:36     INFO - Succeeded initializing clipboard, start requested things...
[task 2020-11-11T17:15:36.459Z] 17:15:36     INFO - Buffered messages finished
[task 2020-11-11T17:15:36.459Z] 17:15:36     INFO - TEST-UNEXPECTED-FAIL | editor/libeditor/tests/test_cut_copy_password.html | Timed out while polling clipboard for requested data, got: waitForClipboard-known-value-0.10851663164183323 
[task 2020-11-11T17:15:36.459Z] 17:15:36     INFO -     SimpleTest.ok@SimpleTest/SimpleTest.js:417:16
[task 2020-11-11T17:15:36.459Z] 17:15:36     INFO -     putAndVerify@SimpleTest/SimpleTest.js:1329:16
[task 2020-11-11T17:15:36.459Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Copying unmasked password shouldn't modify the value 
[task 2020-11-11T17:15:36.460Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Trying to cut unmasked password... 
[task 2020-11-11T17:15:36.460Z] 17:15:36     INFO - Initializing clipboard with "waitForClipboard-known-value-0.4221332783722296"...
[task 2020-11-11T17:15:36.460Z] 17:15:36     INFO - Succeeded initializing clipboard, start requested things...
[task 2020-11-11T17:15:36.460Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Clipboard has the given value: '23' 
[task 2020-11-11T17:15:36.460Z] 17:15:36     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting unmasked password should modify the value 
[task 2020-11-11T17:15:36.460Z] 17:15:36     INFO - GECKO(9188) | MEMORY STAT | vsize 2104101MB | vsizeMaxContiguous 68164029MB | residentFast 106MB | heapAllocated 10MB
[task 2020-11-11T17:15:36.460Z] 17:15:36     INFO - TEST-OK | editor/libeditor/tests/test_cut_copy_password.html | took 25537ms```
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → INCOMPLETE

When this occurs, unmasked range is accidentally removed. It seems that this is a bug of editor.

[task 2021-04-20T06:30:08.969Z] 06:30:08     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Trying to cut masked password... 
[task 2021-04-20T06:30:08.969Z] 06:30:08     INFO - Initializing clipboard with "waitForClipboard-known-value-0.505336838147413"...
[task 2021-04-20T06:30:08.969Z] 06:30:08     INFO - Succeeded initializing clipboard, start requested things...
[task 2021-04-20T06:30:08.969Z] 06:30:08     INFO - Buffered messages logged at 06:29:53
[task 2021-04-20T06:30:08.969Z] 06:30:08     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Timed out while polling clipboard for requested data, got: waitForClipboard-known-value-0.505336838147413 
[task 2021-04-20T06:30:08.969Z] 06:30:08     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting masked password shouldn't copy raw value into the clipboard 
[task 2021-04-20T06:30:08.969Z] 06:30:08     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting masked password shouldn't copy masked value into the clipboard 
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Cutting masked password shouldn't modify the value 
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - Editor unmasked range: 2 - 4
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - Editor unmasked range: 2 - 4
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Trying to copy partially masked password... 
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - Initializing clipboard with "waitForClipboard-known-value-0.22163652095860376"...
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - Succeeded initializing clipboard, start requested things...
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - Buffered messages logged at 06:29:58
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - TEST-PASS | editor/libeditor/tests/test_cut_copy_password.html | Timed out while polling clipboard for requested data, got: waitForClipboard-known-value-0.22163652095860376 
[task 2021-04-20T06:30:08.970Z] 06:30:08     INFO - Editor unmasked range: 0 - 0
Assignee: nobody → masayuki
Status: REOPENED → ASSIGNED

Hmm, the re-masking is occurred by unexpected reflow which caused destroying the frame of the password field.

[task 2021-04-20T08:02:04.131Z] 08:02:04     INFO - GECKO(8104) | #01: NS_DebugBreak(unsigned int, char const*, char const*, char const*, int) [xpcom/base/nsDebugImpl.cpp:431]
[task 2021-04-20T08:02:04.132Z] 08:02:04     INFO - GECKO(8104) | #02: mozilla::TextEditor::SetUnmaskRangeInternal(unsigned int, unsigned int, unsigned int, bool, bool) [editor/libeditor/TextEditor.cpp:1754]
[task 2021-04-20T08:02:04.132Z] 08:02:04     INFO - GECKO(8104) | #03: mozilla::EditorBase::PreDestroy(bool) [editor/libeditor/EditorBase.cpp:534]
[task 2021-04-20T08:02:04.133Z] 08:02:04     INFO - GECKO(8104) | #04: mozilla::TextControlState::UnbindFromFrame(nsTextControlFrame*) [dom/html/TextControlState.cpp:2407]
[task 2021-04-20T08:02:04.133Z] 08:02:04     INFO - GECKO(8104) | #05: nsTextControlFrame::DestroyFrom(nsIFrame*, mozilla::layout::PostFrameDestroyData&) [layout/forms/nsTextControlFrame.cpp:147]
[task 2021-04-20T08:02:04.133Z] 08:02:04     INFO - GECKO(8104) | #06: static nsLineBox::DeleteLineList(nsPresContext*, nsLineList&, nsIFrame*, nsFrameList*, mozilla::layout::PostFrameDestroyData&) [layout/generic/nsLineBox.cpp:387]
[task 2021-04-20T08:02:04.134Z] 08:02:04     INFO - GECKO(8104) | #07: nsBlockFrame::DestroyFrom(nsIFrame*, mozilla::layout::PostFrameDestroyData&) [layout/generic/nsBlockFrame.cpp:444]
[task 2021-04-20T08:02:04.134Z] 08:02:04     INFO - GECKO(8104) | #08: static nsLineBox::DeleteLineList(nsPresContext*, nsLineList&, nsIFrame*, nsFrameList*, mozilla::layout::PostFrameDestroyData&) [layout/generic/nsLineBox.cpp:387]
[task 2021-04-20T08:02:04.134Z] 08:02:04     INFO - GECKO(8104) | #09: nsBlockFrame::DestroyFrom(nsIFrame*, mozilla::layout::PostFrameDestroyData&) [layout/generic/nsBlockFrame.cpp:444]
[task 2021-04-20T08:02:04.135Z] 08:02:04     INFO - GECKO(8104) | #10: nsContainerFrame::DestroyFrom(nsIFrame*, mozilla::layout::PostFrameDestroyData&) [layout/generic/nsContainerFrame.cpp:227]
[task 2021-04-20T08:02:04.135Z] 08:02:04     INFO - GECKO(8104) | #11: nsCanvasFrame::DestroyFrom(nsIFrame*, mozilla::layout::PostFrameDestroyData&) [layout/generic/nsCanvasFrame.cpp:232]
[task 2021-04-20T08:02:04.135Z] 08:02:04     INFO - GECKO(8104) | #12: nsContainerFrame::DestroyFrom(nsIFrame*, mozilla::layout::PostFrameDestroyData&) [layout/generic/nsContainerFrame.cpp:227]
[task 2021-04-20T08:02:04.136Z] 08:02:04     INFO - GECKO(8104) | #13: nsContainerFrame::RemoveFrame(mozilla::layout::FrameChildListID, nsIFrame*) [layout/generic/nsContainerFrame.cpp:181]
[task 2021-04-20T08:02:04.136Z] 08:02:04     INFO - GECKO(8104) | #14: nsCSSFrameConstructor::ContentRemoved(nsIContent*, nsIContent*, nsCSSFrameConstructor::RemoveFlags) [layout/base/nsCSSFrameConstructor.cpp:7513]
[task 2021-04-20T08:02:04.137Z] 08:02:04     INFO - GECKO(8104) | #15: nsCSSFrameConstructor::RecreateFramesForContent(nsIContent*, nsCSSFrameConstructor::InsertionKind) [layout/base/nsCSSFrameConstructor.cpp:8481]
[task 2021-04-20T08:02:04.137Z] 08:02:04     INFO - GECKO(8104) | #16: mozilla::RestyleManager::ProcessRestyledFrames(nsStyleChangeList&) [layout/base/RestyleManager.cpp:1503]
[task 2021-04-20T08:02:04.138Z] 08:02:04     INFO - GECKO(8104) | #17: mozilla::RestyleManager::DoProcessPendingRestyles(mozilla::ServoTraversalFlags) [layout/base/RestyleManager.cpp:3049]
[task 2021-04-20T08:02:04.138Z] 08:02:04     INFO - GECKO(8104) | #18: mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) [layout/base/PresShell.cpp:4202]
[task 2021-04-20T08:02:04.138Z] 08:02:04     INFO - GECKO(8104) | #19: nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) [layout/base/nsRefreshDriver.cpp:2188]
[task 2021-04-20T08:02:04.139Z] 08:02:04     INFO - GECKO(8104) | #20: mozilla::detail::RunnableFunction<`lambda at /builds/worker/checkouts/gecko/layout/base/nsRefreshDriver.cpp:1456:15'>::Run() [xpcom/threads/nsThreadUtils.h:535]
[task 2021-04-20T08:02:04.139Z] 08:02:04     INFO - GECKO(8104) | #21: mozilla::RunnableTask::Run() [xpcom/threads/TaskController.cpp:474]
[task 2021-04-20T08:02:04.139Z] 08:02:04     INFO - GECKO(8104) | #22: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex &> const&) [xpcom/threads/TaskController.cpp:757]
[task 2021-04-20T08:02:04.139Z] 08:02:04     INFO - GECKO(8104) | #23: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex &> const&) [xpcom/threads/TaskController.cpp:612]
[task 2021-04-20T08:02:04.139Z] 08:02:04     INFO - GECKO(8104) | #24: mozilla::TaskController::ProcessPendingMTTask(bool) [xpcom/threads/TaskController.cpp:396]
[task 2021-04-20T08:02:04.139Z] 08:02:04     INFO - GECKO(8104) | #25: mozilla::detail::RunnableFunction<`lambda at /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:135:7'>::Run() [xpcom/threads/nsThreadUtils.h:535]
[task 2021-04-20T08:02:04.140Z] 08:02:04     INFO - GECKO(8104) | #26: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1163]
[task 2021-04-20T08:02:04.140Z] 08:02:04     INFO - GECKO(8104) | #27: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/threads/nsThreadUtils.cpp:548]
[task 2021-04-20T08:02:04.140Z] 08:02:04     INFO - GECKO(8104) | #28: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:87]
[task 2021-04-20T08:02:04.140Z] 08:02:04     INFO - GECKO(8104) | #29: MessageLoop::RunHandler() [ipc/chromium/src/base/message_loop.cc:329]
[task 2021-04-20T08:02:04.140Z] 08:02:04     INFO - GECKO(8104) | #30: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:311]
[task 2021-04-20T08:02:04.141Z] 08:02:04     INFO - GECKO(8104) | #31: nsBaseAppShell::Run() [widget/nsBaseAppShell.cpp:139]
[task 2021-04-20T08:02:04.141Z] 08:02:04     INFO - GECKO(8104) | #32: nsAppShell::Run() [widget/windows/nsAppShell.cpp:602]
[task 2021-04-20T08:02:04.141Z] 08:02:04     INFO - GECKO(8104) | #33: XRE_RunAppShell() [toolkit/xre/nsEmbedFunctions.cpp:906]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #34: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:237]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #35: MessageLoop::RunHandler() [ipc/chromium/src/base/message_loop.cc:329]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #36: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:311]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #37: XRE_InitChildProcess(int, char**, XREChildData const*) [toolkit/xre/nsEmbedFunctions.cpp:742]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #38: NS_internal_main(int, char**, char**) [browser/app/nsBrowserApp.cpp:309]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #39: wmain(int, wchar_t**) [toolkit/xre/nsWindowsWMain.cpp:131]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #40: __scrt_common_main_seh() [/builds/worker/workspace/obj-build/browser/app/f:/dd/vctools/crt/vcstartup/src/startup/exe_common.inl:288]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #41: BaseThreadInitThunk [C:\Windows\System32\KERNEL32.DLL + 0x13034]
[task 2021-04-20T08:02:04.142Z] 08:02:04     INFO - GECKO(8104) | #42: RtlUserThreadStart [C:\Windows\SYSTEM32\ntdll.dll + 0x71461]
[task 2021-04-20T08:02:04.143Z] 08:02:04     INFO - GECKO(8104) | [Child 912, Main Thread] [Child 9724, MaWARin Thread] WARNING: '!aContenNING: Nt->GetCoS_ENSURE_TRUE(mPmposedDoc()', file /builds/worker/resShcehell) failckouts/ged: file /builds/workecko/laer/checkouts/gecyout/base/nsCSSFramko/layout/geeConstructneric/nsFraomreSele.cpp:8427
[task 2021-04-20T08:02:04.143Z] 08:02:04     INFO - GECKO(8104) | ction.cpp:1591
[task 2021-04-20T08:02:04.168Z] 08:02:04     INFO - GECKO(8104) | [Child 9724, Main Thread] WARNING: '!aContent->GetComposedDoc()', file /builds/worker/checkouts/gecko/layout/base/nsCSSFrameConstructor.cpp:8427
[task 2021-04-20T08:02:04.168Z] 08:02:04     INFO - GECKO(8104) | [Child 9724, Main Thread] WARNING: '!aContent->GetComposedDoc()', file /builds/worker/checkouts/gecko/layout/base/nsCSSFrameConstructor.cpp:8427

As far as my investigation, this requires a big change of editor module design. The root cause is, TextEditor instance is recreated if the corresponding <input> element is recreated. At this time, the unmasked range stored in TextEditor is lost. So, there are 2 problems:

  • Unexpected global reflow happens during the test randomly.
  • TextEditor's unmasked range should be stored in <input> element or somewhere.

From point of view of the purpose of the feature, user must not want a password filed masked when global reflow occurs e.g., by font list updates. So, the second approach is the right fix. In other words, this is not a bug of the test, this detects an actual bug of the feature.

The intermittent failure is caused by unexpected global reflow during the test.
If <input type="password"> is reframed, TextEditor instance is recreated.
Then, the unmasked range of the editor stored by TextEditor is also lost.
Therefore, unmasked range is randomly lost by unexpected reflow.

If the global reflow is occurred by font list update etc which are not expected
by users, unmasked password field is unexpectedly masked. So, this is a real
bug of TextEditor.

So, unmasked range needs to be stored outside TextEditor for making its
lifetime longer than TextEditor. For doing it, first, TextEditor should
access password mask data via a pointer to a struct. Then, fortunately,
we need to allocate it only when the TextEditor is a password editor.

Depends on D118755

During a TextControlState alive, PasswordMaskData should be alive too.
Otherwise, we cannot keep unmasked range at reframing.

Depends on D118756

TextControlState is alive during reframing, but TextEditor is not so.
Therefore, TextControlState should take the PasswordMaskData before
TextEditor is destroyed. And if TextEditor is recreated, and the value
hasn't been modified, unmasked range should be restored in the new editor.

Depends on D118757

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/09fb0d56a64f
part 0: Add automated tests for keeping unmasked range during reflows r=m_kato
https://hg.mozilla.org/integration/autoland/rev/e526321a76ff
part 1: Make `TextEditor` store password masking data in a struct r=m_kato
https://hg.mozilla.org/integration/autoland/rev/e85703ef518d
part 2: Make `TextControlState` initialize `TextEditor` with `PasswordMaskData` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/9faf557a1ba3
part 3: Make `TextControlState` store unmasked range while it does not have `TextEditor` r=m_kato
You need to log in before you can comment on or make changes to this bug.