haikuwebkit/LayoutTests/fast/editing
Frédéric Wang d1259ab9f1 Crash in ApplyStyleCommand::applyRelativeFontStyleChange
https://bugs.webkit.org/show_bug.cgi?id=226926

Patch by Frédéric Wang <fwang@igalia.com> on 2021-07-28
Reviewed by Ryosuke Niwa.

Source/WebCore:

In r179944 and r180050, special handling was added for display: grid/flex nodes in
Position::isCandidate in order to make them editable but the same logic was not added in
PositionIterator::isCandidate. This patch fixes that inconsistency as well as the
corresponding debug ASSERT and release nullptr dereference.

Tests: fast/editing/apply-relative-font-style-change-crash-001.html
       fast/editing/apply-relative-font-style-change-crash-002.html

* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate const): Handle flexbox and grid.

LayoutTests:

Add regression tests.

* fast/editing/apply-relative-font-style-change-crash-001-expected.txt: Added.
* fast/editing/apply-relative-font-style-change-crash-001-expected.txt: Added.
* fast/editing/apply-relative-font-style-change-crash-002.html: Added.
* fast/editing/apply-relative-font-style-change-crash-002.html: Added.

Canonical link: https://commits.webkit.org/240025@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-28 14:01:53 +00:00
..
apply-relative-font-style-change-crash-001-expected.txt Crash in ApplyStyleCommand::applyRelativeFontStyleChange 2021-07-28 14:01:53 +00:00
apply-relative-font-style-change-crash-001.html Crash in ApplyStyleCommand::applyRelativeFontStyleChange 2021-07-28 14:01:53 +00:00
apply-relative-font-style-change-crash-002-expected.txt Crash in ApplyStyleCommand::applyRelativeFontStyleChange 2021-07-28 14:01:53 +00:00
apply-relative-font-style-change-crash-002.html Crash in ApplyStyleCommand::applyRelativeFontStyleChange 2021-07-28 14:01:53 +00:00
frame-selection-is-not-caret-expected.txt
frame-selection-is-not-caret.html
indent-non-enclosed-element-crash-expected.txt
indent-non-enclosed-element-crash.html
indent-pre-user-select-all-crash-expected.txt
indent-pre-user-select-all-crash.html
indent-then-insertUL-crash-expected.txt
indent-then-insertUL-crash.html
indent-then-justifyFull-crash-expected.txt
indent-then-justifyFull-crash.html
insert-list-in-orphaned-list-item-crash-expected.txt
insert-list-in-orphaned-list-item-crash.html Nullptr crash in RenderObject::parent 2020-11-19 08:40:50 +00:00
insert-paragraph-with-img-in-table-crash-expected.txt Crash in InsertParagraphSeparatorCommand::doApply 2021-06-08 07:35:58 +00:00
insert-paragraph-with-img-in-table-crash.html Crash in InsertParagraphSeparatorCommand::doApply 2021-06-08 07:35:58 +00:00
insert-paragraph-with-text-in-table-crash-expected.txt Crash in InsertParagraphSeparatorCommand::doApply 2021-06-08 07:35:58 +00:00
insert-paragraph-with-text-in-table-crash.html Crash in InsertParagraphSeparatorCommand::doApply 2021-06-08 07:35:58 +00:00
insert-text-orphaned-summary-crash-expected.txt Nullptr crash in positionInParentBeforeNode via InsertTextCommand::doApply 2021-06-16 13:36:22 +00:00
insert-text-orphaned-summary-crash.html Nullptr crash in positionInParentBeforeNode via InsertTextCommand::doApply 2021-06-16 13:36:22 +00:00
justify-user-select-none-dir-rtl-crash-expected.txt
justify-user-select-none-dir-rtl-crash.html Nullptr crash in CompositeEditCommand::moveParagraphs when changing style on elements that are 2020-05-04 23:55:06 +00:00
modify-selection-list-level-crash-expected.txt Nullptr crash in ModifySelectionListLevelCommand::appendSiblingNodeRange 2021-02-23 12:28:20 +00:00
modify-selection-list-level-crash.html Nullptr crash in ModifySelectionListLevelCommand::appendSiblingNodeRange 2021-02-23 12:28:20 +00:00
mutation-with-display-contents-container-crash-expected.txt Nullptr crash in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline 2021-02-23 20:19:23 +00:00
mutation-with-display-contents-container-crash.html Nullptr crash in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline 2021-02-23 20:19:23 +00:00
paste-and-indent-microtask-crash-expected.txt Nullptr crash in null ptr deref in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline 2021-06-22 09:06:14 +00:00
paste-and-indent-microtask-crash.html Nullptr crash in null ptr deref in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline 2021-06-22 09:06:14 +00:00
paste-and-match-style-with-table-2-crash-expected.txt Crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply 2021-05-25 08:32:20 +00:00
paste-and-match-style-with-table-2-crash.html Crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply 2021-05-25 08:32:20 +00:00
paste-and-match-style-with-table-crash-expected.txt Nullptr crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply 2021-02-24 09:20:30 +00:00
paste-and-match-style-with-table-crash.html Nullptr crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply 2021-02-24 09:20:30 +00:00
replace-selection-and-apply-style-crash-expected.txt Crash in makeBoundaryPoint via ReplaceSelectionCommand::insertedContentRange 2021-03-16 12:20:31 +00:00
replace-selection-and-apply-style-crash.html Crash in makeBoundaryPoint via ReplaceSelectionCommand::insertedContentRange 2021-03-16 12:20:31 +00:00
wbr-iterator-crash-expected.txt RunIterator::traverseNext/PreviousOnLineIgnoringLineBreak should skip over WBRs 2021-04-14 22:54:21 +00:00
wbr-iterator-crash.html RunIterator::traverseNext/PreviousOnLineIgnoringLineBreak should skip over WBRs 2021-04-14 22:54:21 +00:00