Changeset 273298 in webkit
- Timestamp:
- Feb 22, 2021 7:50:54 PM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r273296 r273298 1 2021-02-22 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION (r272928): ASSERT NOT REACHED in WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance 4 https://bugs.webkit.org/show_bug.cgi?id=222219 5 <rdar://problem/74548257> 6 7 Reviewed by Wenson Hsieh. 8 9 The assertion failure was caused by confirmCompositionAndNotifyClient called in commitProvisionalLoad 10 committing the composition even though the composition node had been removed from the document. 11 12 Fixed the bug by canceling the composition if the composition node had been removed or the selection 13 had been moved away from it in confirmCompositionAndNotifyClient. 14 15 Test: editing/input/select-all-clear-input-method.html 16 17 * editing/Editor.cpp: 18 (WebCore::Editor::confirmOrCancelCompositionAndNotifyClient): Renamed from confirmCompositionAndNotifyClient. 19 * editing/Editor.h: 20 * loader/FrameLoader.cpp: 21 (WebCore::FrameLoader::commitProvisionalLoad): 22 1 23 2021-02-22 Wenson Hsieh <wenson_hsieh@apple.com> 2 24 -
trunk/Source/WebCore/editing/Editor.cpp
r273077 r273298 1944 1944 } 1945 1945 1946 void Editor::confirm CompositionAndNotifyClient()1946 void Editor::confirmOrCancelCompositionAndNotifyClient() 1947 1947 { 1948 1948 if (!hasComposition()) … … 1951 1951 auto frame = makeRefPtr(m_document.frame()); 1952 1952 if (!frame) 1953 return; 1954 1955 if (cancelCompositionIfSelectionIsInvalid()) 1953 1956 return; 1954 1957 -
trunk/Source/WebCore/editing/Editor.h
r271459 r273298 380 380 WEBCORE_EXPORT void confirmComposition(); 381 381 WEBCORE_EXPORT void confirmComposition(const String&); // if no existing composition, replaces selection 382 void confirm CompositionAndNotifyClient();382 void confirmOrCancelCompositionAndNotifyClient(); 383 383 WEBCORE_EXPORT void cancelComposition(); 384 384 bool cancelCompositionIfSelectionIsInvalid(); -
trunk/Source/WebCore/loader/FrameLoader.cpp
r272920 r273298 1988 1988 // attempt to confirm any active composition once again in this scenario after we 1989 1989 // finish restoring from the cached page. 1990 document->editor().confirm CompositionAndNotifyClient();1990 document->editor().confirmOrCancelCompositionAndNotifyClient(); 1991 1991 } 1992 1992 … … 2069 2069 2070 2070 if (auto document = makeRefPtr(m_frame.document())) 2071 document->editor().confirm CompositionAndNotifyClient();2071 document->editor().confirmOrCancelCompositionAndNotifyClient(); 2072 2072 2073 2073 LOG(Loading, "WebCoreLoading %s: Finished committing provisional load to URL %s", m_frame.tree().uniqueName().string().utf8().data(),
Note: See TracChangeset
for help on using the changeset viewer.