Changeset 84459 in webkit
- Timestamp:
- Apr 20, 2011 8:02:28 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84457 r84459 1 2011-04-20 Jia Pu <jpu@apple.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 [Mac] Correction panel shows up at incorrect location after webpage is scrolled. 6 https://bugs.webkit.org/show_bug.cgi?id=59052 7 <rdar://problem/9312513> 8 9 Fixed a regression caused by interaction between patch for bug 57353 and patch for bug 55571. 10 See bug webpage for detail. 11 12 * editing/Editor.cpp: 13 (WebCore::Editor::selectionStartHasMarkerFor): 14 * editing/SpellingCorrectionController.cpp: 15 (WebCore::SpellingCorrectionController::windowRectForRange): 16 1 17 2011-04-20 Adam Barth <abarth@webkit.org> 2 18 -
trunk/Source/WebCore/editing/Editor.cpp
r84448 r84459 3228 3228 3229 3229 return false; 3230 } 3231 3232 FloatRect Editor::windowRectForRange(const Range* range) const 3233 { 3234 FrameView* view = frame()->view(); 3235 if (!view) 3236 return FloatRect(); 3237 Vector<FloatQuad> textQuads; 3238 range->textQuads(textQuads); 3239 FloatRect boundingRect; 3240 size_t size = textQuads.size(); 3241 for (size_t i = 0; i < size; ++i) 3242 boundingRect.unite(textQuads[i].boundingBox()); 3243 return view->contentsToWindow(IntRect(boundingRect)); 3244 } 3230 } 3245 3231 3246 3232 TextCheckingTypeMask Editor::textCheckingTypeMaskFor(TextCheckingOptions textCheckingOptions) -
trunk/Source/WebCore/editing/Editor.h
r84311 r84459 434 434 // Return true if correction was applied, false otherwise. 435 435 bool applyAutocorrectionBeforeTypingIfAppropriate(); 436 FloatRect windowRectForRange(const Range*) const;437 436 }; 438 437 -
trunk/Source/WebCore/editing/SpellingCorrectionController.cpp
r84433 r84459 362 362 { 363 363 FrameView* view = m_frame->view(); 364 return view ? view->contentsToWindow(IntRect(range->boundingRect())) : FloatRect(); 364 if (!view) 365 return FloatRect(); 366 Vector<FloatQuad> textQuads; 367 range->textQuads(textQuads); 368 FloatRect boundingRect; 369 size_t size = textQuads.size(); 370 for (size_t i = 0; i < size; ++i) 371 boundingRect.unite(textQuads[i].boundingBox()); 372 return view->contentsToWindow(IntRect(boundingRect)); 365 373 } 366 374
Note: See TracChangeset
for help on using the changeset viewer.