Changeset 84592 in webkit
- Timestamp:
- Apr 21, 2011 7:49:05 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84589 r84592 1 2011-04-21 Jia Pu <jpu@apple.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 [Mac] correctionPanelTimerFired() crashes due to rangeToBeReplaced being cleared. 6 https://bugs.webkit.org/show_bug.cgi?id=59155 7 <rdar://problem/9261698> 8 9 Make sure the range isn't cleared before calling windowRectForRange() on it. Also removed unused functions in Editor.h, 10 and fixed a typo in function name. 11 12 * editing/Editor.h: 13 * editing/SpellingCorrectionController.cpp: 14 (WebCore::SpellingCorrectionController::correctionPanelTimerFired): 15 (WebCore::SpellingCorrectionController::respondToChangedSelection): 16 * editing/SpellingCorrectionController.h: 17 (WebCore::SpellingCorrectionController::shouldStartTimerFor): 18 1 19 2011-04-21 Maciej Stachowiak <mjs@apple.com> 2 20 -
trunk/Source/WebCore/editing/Editor.h
r84459 r84592 429 429 430 430 Node* findEventTargetFromSelection() const; 431 void stopCorrectionPanelTimer();432 433 void applyCorrectionPanelInfo(const Vector<DocumentMarker::MarkerType>& markerTypesToAdd);434 // Return true if correction was applied, false otherwise.435 bool applyAutocorrectionBeforeTypingIfAppropriate();436 431 }; 437 432 -
trunk/Source/WebCore/editing/SpellingCorrectionController.cpp
r84459 r84592 293 293 break; 294 294 case CorrectionPanelInfo::PanelTypeReversion: { 295 if (!m_correctionPanelInfo.rangeToBeReplaced) 296 break; 295 297 m_correctionPanelInfo.isActive = true; 296 298 m_correctionPanelInfo.replacedString = plainText(m_correctionPanelInfo.rangeToBeReplaced.get()); … … 301 303 break; 302 304 case CorrectionPanelInfo::PanelTypeSpellingSuggestions: { 303 if ( plainText(m_correctionPanelInfo.rangeToBeReplaced.get()) != m_correctionPanelInfo.replacedString)305 if (!m_correctionPanelInfo.rangeToBeReplaced || plainText(m_correctionPanelInfo.rangeToBeReplaced.get()) != m_correctionPanelInfo.replacedString) 304 306 break; 305 307 String paragraphText = plainText(TextCheckingParagraph(m_correctionPanelInfo.rangeToBeReplaced).paragraphRange().get()); … … 398 400 for (size_t i = 0; i < markerCount; ++i) { 399 401 const DocumentMarker& marker = markers[i]; 400 if (!shouldStartTime For(marker, endOffset))402 if (!shouldStartTimerFor(marker, endOffset)) 401 403 continue; 402 404 RefPtr<Range> wordRange = Range::create(m_frame->document(), node, marker.startOffset, node, marker.endOffset); -
trunk/Source/WebCore/editing/SpellingCorrectionController.h
r84433 r84592 122 122 void recordAutocorrectionResponseReversed(const String& replacedString, const String& replacementString); 123 123 124 bool shouldStartTime For(const DocumentMarker& marker, int endOffset) const124 bool shouldStartTimerFor(const DocumentMarker& marker, int endOffset) const 125 125 { 126 126 return (((marker.type == DocumentMarker::Replacement && !marker.description.isNull())
Note: See TracChangeset
for help on using the changeset viewer.