Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7685053aabfc692b2b35b2b6885eaa2af68da6ef https://github.com/WebKit/WebKit/commit/7685053aabfc692b2b35b2b6885eaa2af68da6ef Author: Richard Robinson <richard_robins...@apple.com> Date: 2024-04-29 (Mon, 29 Apr 2024)
Changed paths: A LayoutTests/editing/input/mac/writing-suggestions-textarea-multiple-lines-expected.txt A LayoutTests/editing/input/mac/writing-suggestions-textarea-multiple-lines.html M LayoutTests/platform/mac-wk2/TestExpectations M Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp Log Message: ----------- Writing suggestions sometimes show up in the middle of previous paragraphs in `textarea`s https://bugs.webkit.org/show_bug.cgi?id=273365 rdar://127129683 Reviewed by Wenson Hsieh. The logic that inserts the writing suggestions renderer was incorrectly assuming that the renderer which corresponds to the node before the writing suggestion would always just be the first text child node of the current renderer. While this is true for trivial `contenteditable` `div`s, which have several `RenderBlock`s, and one `RenderText` per block, this is not true for `textarea`s, which can and do have multiple `RenderText`s per block, nor is this true in the general case of arbitrary HTML. Since the node before the writing suggestions renderer is known already, its renderer is the correct one to use, and doesn't make any assumptions about the number of children of a renderer. * LayoutTests/editing/input/mac/writing-suggestions-textarea-multiple-lines-expected.txt: Added. * LayoutTests/editing/input/mac/writing-suggestions-textarea-multiple-lines.html: Added. * Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp: (WebCore::RenderTreeUpdater::GeneratedContent::updateWritingSuggestionsRenderer): Canonical link: https://commits.webkit.org/278140@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes