Bug 1942969 - Do not schedule a paint for all focus changing events. r=smaug

Do not schedule a paint for all focus changing events.

Differential Revision: https://phabricator.services.mozilla.com/D235153
This commit is contained in:
Dan Robertson
2025-01-23 03:34:06 +00:00
parent 14e5d5dc22
commit 9723d38b74
3 changed files with 11 additions and 1 deletions

View File

@@ -7155,7 +7155,7 @@ nsresult PresShell::EventHandler::HandleEvent(nsIFrame* aFrameForPresShell,
// the next transasction that gets sent to the compositor will carry this over
if (mPresShell->mAPZFocusSequenceNumber < aGUIEvent->mFocusSequenceNumber) {
mPresShell->mAPZFocusSequenceNumber = aGUIEvent->mFocusSequenceNumber;
if (aFrameForPresShell) {
if (aFrameForPresShell && StaticPrefs::apz_keyboard_focus_optimization()) {
aFrameForPresShell->SchedulePaint(nsIFrame::PAINT_COMPOSITE_ONLY);
}
}