[Webkit-unassigned] [Bug 52221] Autocorrection should respect undo.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 11 14:07:33 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=52221





--- Comment #8 from jpu at apple.com  2011-01-11 14:07:33 PST ---
(In reply to comment #5)
> View in context: https://bugs.webkit.org/attachment.cgi?id=78548&action=review
> 
> > WebCore/editing/Editor.cpp:1125
> > +    RefPtr<Range> range = Range::create(document, newSelection.start(), newSelection.end());
> > +    // If the text is inserted by undo, it should be exempt from autocorrection.
> > +    // This is especially important when user reverts an autocorrection by undo.
> > +    document->markers()->addMarker(range.get(), DocumentMarker::Replacement);
> > +#endif
> 
> Is this going to make all text inserted by undo marked as replacement? Are those marks ever cleared?

Yes, the marker will be added to all inserted text. And they will not be cleared. 

The replacement mark is used to prevent text to be checked for spelling. The general on AppKit side is that we try not to re-correct what user has reverted. So if the undo'ed text contains misspelled word, we don't check it again. And if it doesn't contain misspelled word, we don't need to check it anyway.

However, having this discussion made me realize that this may not be the right place for adding marker, since the command we are undoing here may not modify text. It could simply be font change or something.

> 
> > WebCore/rendering/InlineTextBox.cpp:1033
> > +                // Other markers are for intenal annotation, and don't require update on UI.
> 
> typo: “intenal”

Fixed in new patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list