<rdar://problem/8521243>
Created attachment 70016 [details] Proposed patch (v1) This patch contains following tests: 1. Verify the autocorrection is applied, and autocorrected word has blue underline. 2. Blue underline is removed when a paragraph separator is inserted either by typing or by copy-and-paste'ing. 3. Autocorrection is not applied to word that is first autocorrected, then subsequently modified by user. Not every aspect of autocorrection panel is readily testable. Please see corresponding Radar for detailed explanation.
Comment on attachment 70016 [details] Proposed patch (v1) Clearing flags on attachment: 70016 Committed r69269: <http://trac.webkit.org/changeset/69269>
All reviewed patches have been landed. Closing bug.
Why don't you use textInputController.hasSpellingMarker() ?
(In reply to comment #4) > Why don't you use textInputController.hasSpellingMarker() ? Kent, that's good point. I wasn't aware of the existence of this object. In fact, I have difficulty locating it's definition. Could you tell me the meaning of the two arguments? Thanks.
(In reply to comment #5) > > Why don't you use textInputController.hasSpellingMarker() ? > > Kent, that's good point. I wasn't aware of the existence of this object. In fact, I have difficulty locating it's definition. Could you tell me the meaning of the two arguments? Thanks. I think they are the starting offset and the length in the focused node.
Created attachment 70047 [details] An example of textInputController.hasSpellingMarker() Greetings, I have a little changed one of your new layout tests "autocorrection-delete.html" as an example how to use textInputController.hasSpellingMarker(). I wish it helps. Regards, Hironori Bono
These tests fail on Windows (and probably shouldn't be running there at all). I filed bug bug 47341.
(In reply to comment #4) > Why don't you use textInputController.hasSpellingMarker() ? It seems hasSpellingMarker() only look for marker whose value is "Spelling". What is needed for these test is a more generic function that allows testing for arbitrary marker value, since the implementation of autocorrection uses two newly added marker values. I don't suppose this is very difficult to do, yes?
(In reply to comment #9) > It seems hasSpellingMarker() only look for marker whose value is "Spelling". What is needed for these test is a more generic function that allows testing for arbitrary marker value, since the implementation of autocorrection uses two newly added marker values. > > I don't suppose this is very difficult to do, yes? Even though it is not so hard to support non-Spelling markers (such as grammar markers), it is not so easy to write its layout tests. (Are there any existing layout tests for grammar markers?) Regards, Hironori Bono
> > Even though it is not so hard to support non-Spelling markers (such as grammar markers), it is not so easy to write its layout tests. (Are there any existing layout tests for grammar markers?) > I don't see existing tests for grammar markers. The autocorrection related markers behaves similarly to spell checking marker. It shouldn't be too difficult to write tests. Of course, this is Mac-only at this moment. I have filed a request in bug 47705. We could carry the discussion forward over there.