Closed
Bug 1360162
Opened 9 years ago
Closed 9 years ago
UpdateOverlayTextVisibility is called twice by input.value setter when input element has focus
Categories
(Core :: DOM: Editor, enhancement, P3)
Tracking
()
RESOLVED
FIXED
mozilla56
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
UpdateOverlayTextVisibility uses OutputToString that is expensive. We should add fast path to check whether empty or not (Bug 1360154).
UpdateOverlayTextVisibility() is called from EditorBase::NotifyEditorObserver() via EndPlaceHolderTransaction(). But nsTextEditorState::SetValue is also called UpdateOverlayTextVisibility() via ValueWasChanged.
So it is unnecessary to call UpdateOverlayTextVisibility when editor already calls UpdateOverlayTextVisibility.
| Assignee | ||
Updated•9 years ago
|
Priority: -- → P3
| Assignee | ||
Comment 1•9 years ago
|
||
| Comment hidden (mozreview-request) |
Comment 3•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8880236 [details]
Bug 1360162 - Don't call UpdateOverlayTextVisibility twice by input.value setter when input element has focus.
https://reviewboard.mozilla.org/r/151590/#review156588
::: dom/html/nsTextEditorState.cpp:2696
(Diff revision 1)
> mTextListener->SetValueChanged(true);
> mTextListener->SettingValue(false);
> +
> + if (!notifyValueChanged) {
> + // Listener doesn't update frame, but it is required for placeholder
> + ValueWasChanged(true);
> + }
Hmm, really tricky code... This can be regressed again easily. However, I have no better idea to fix this.
Attachment #8880236 -
Flags: review?(masayuki) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/c36dabb0aba6
Don't call UpdateOverlayTextVisibility twice by input.value setter when input element has focus. r=masayuki
Comment 5•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•7 years ago
|
Assignee: nobody → m_kato
You need to log in
before you can comment on or make changes to this bug.
Description
•