[webkit-changes] [WebKit/WebKit] 3fabfe: REGRESSION (261253 at main): Editing GitHub comment q...
Alan Baradlay
noreply at github.com
Thu Mar 16 06:46:03 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3fabfea068b81f41e1c30cde8743a744aaa12dc9
https://github.com/WebKit/WebKit/commit/3fabfea068b81f41e1c30cde8743a744aaa12dc9
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-03-16 (Thu, 16 Mar 2023)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
A Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContent.cpp
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContent.h
M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h
Log Message:
-----------
REGRESSION (261253 at main): Editing GitHub comment quickly can cause flickering text/switching spellcheck suggestions and empty spaces
https://bugs.webkit.org/show_bug.cgi?id=253985
<rdar://106708219>
Reviewed by Simon Fraser.
Let's invalidate the glyph cache whenever we destroy an associated display box. This is similar to what legacy line layout does by calling removeGlyphDisplayList from ~LegacyInlineTextBox.
1. GlyphDisplayListCache uses display box's address as key.
2. When we destroy/create display boxes through partial layout, entries in GlyphDisplayListCache become stale...however if a newly constructed display box happens
to land on the same address, we end up reusing a stale entry and paint "old" content.
3. With no partial layout enabled GlyphDisplayListCache was cleared right before each and every layout.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContent.cpp: Copied from Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContent.h.
(WebCore::InlineDisplay::invalidateGlyphCache):
(WebCore::InlineDisplay::Content::clear):
(WebCore::InlineDisplay::Content::set):
(WebCore::InlineDisplay::Content::append):
(WebCore::InlineDisplay::Content::remove):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContent.h:
(WebCore::InlineDisplay::Content::clear): Deleted.
(WebCore::InlineDisplay::Content::set): Deleted.
(WebCore::InlineDisplay::Content::append): Deleted.
(WebCore::InlineDisplay::Content::remove): Deleted.
Canonical link: https://commits.webkit.org/261743@main
More information about the webkit-changes
mailing list