Closed
Bug 1484110
Opened 6 years ago
Closed 6 years ago
Split HTMLEditor::CheckSelectionStateForAnonymousButtons() for internal use
Categories
(Core :: DOM: Editor, enhancement)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(3 files)
No description provided.
Assignee | ||
Comment 1•6 years ago
|
||
HTMLEditor::CheckSelectionStateForAnonymousButtons() is called a lot internally.
Especially, its virtual call cost may make damage to our performance since
it's called from a selection listener.
So, we should create non-virtual method, RefereshEditingUI() for internal use.
Assignee | ||
Comment 2•6 years ago
|
||
First, HTMLEditor::HideInlineTableEditingUI() always returns NS_OK. So, we
can change its return type to void.
Additionally, it removes each UI from the DOM tree one by one. However, each
mutation could cause showing same UI again. In such case,
ShowInlineTableEditingUI() overwrites each UI with newly created element.
Then, HTMLEditor cannot remove the old UI anymore. Therefore, this patch
moves all members of the UI into local variables first.
Assignee | ||
Comment 3•6 years ago
|
||
HTMLEditor::RefereshEditingUI() works only with enabled UIs. Therefore, if
UI is disabled while it's visible, it keeps shown. This is too bad if web
apps tries to disable the Gecko specific UIs after we show some of them.
This patch adds HTMLEditor::HideAnonymousEditingUIsIfUnnecessary() to hide
unnecessary UIs and makes RefereshEditingUI() call it always.
Comment 4•6 years ago
|
||
Comment on attachment 9002435 [details]
Bug 1484110 - part 1: Create HTMLEditor::RefereshEditingUI() for internal use of nsIHTMLEditor::CheckSelectionStateForAnonymousButtons()
Makoto Kato [:m_kato] has approved the revision.
Attachment #9002435 -
Flags: review+
Comment 5•6 years ago
|
||
Comment on attachment 9002436 [details]
Bug 1484110 - part 2: Rewrite HTMLEditor::HideInlineTableEditingUI()
Makoto Kato [:m_kato] has approved the revision.
Attachment #9002436 -
Flags: review+
Comment 6•6 years ago
|
||
Comment on attachment 9002437 [details]
Bug 1484110 - part 3: HTMLEditor::RefereshEditingUI() should refresh UIs when one of them is changed to enabled or disabled
Makoto Kato [:m_kato] has approved the revision.
Attachment #9002437 -
Flags: review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/08d0e0c32a53
part 1: Create HTMLEditor::RefereshEditingUI() for internal use of nsIHTMLEditor::CheckSelectionStateForAnonymousButtons() r=m_kato
https://hg.mozilla.org/integration/mozilla-inbound/rev/6a6a79e2c19b
part 2: Rewrite HTMLEditor::HideInlineTableEditingUI() r=m_kato
https://hg.mozilla.org/integration/mozilla-inbound/rev/4f0a12bcb401
part 3: HTMLEditor::RefereshEditingUI() should refresh UIs when one of them is changed to enabled or disabled r=m_kato
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/08d0e0c32a53
https://hg.mozilla.org/mozilla-central/rev/6a6a79e2c19b
https://hg.mozilla.org/mozilla-central/rev/4f0a12bcb401
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•