Open
Bug 544504
Opened 15 years ago
Updated 2 years ago
Spellcheck shouldn't be setting up whole-document ranges
Categories
(Core :: Spelling checker, defect)
Tracking
()
NEW
People
(Reporter: bzbarsky, Unassigned)
References
(Blocks 1 open bug)
Details
Reporter | ||
Comment 1•15 years ago
|
||
OK, so what happens is that nsEditorSpellCheck::InitSpellChecker always creates an nsITextServicesDocument, which sets up a document range. In this case aEnableSelectionChecking is false, so we leave that range in place. Then we pass the nsITextServicesDocument to mozSpellChecker::SetDocument.
Still trying to figure out whether we ever use it for anything after that.
Reporter | ||
Comment 2•15 years ago
|
||
OK, so in the _inline_ spellcheck case we don't use it. mozInlineSpellChecker handles its own chunking of the text into words and only uses nsEditorSpellCheck::CheckCurrentWordNoSuggest, which calls mozSpellChecker::CheckWord. None of that uses the nsITextServicesDocument.
Reporter | ||
Comment 3•15 years ago
|
||
Is there a reason to not pass an extra flag to nsEditorSpellCheck::InitSpellChecker that will tell it to simply not create an nsITextServicesDocument thing at all?
Reporter | ||
Comment 4•15 years ago
|
||
Or would at least collapse its range or something....
Reporter | ||
Comment 5•15 years ago
|
||
The benefit of not creating it at all is of course less code and memory use, but we may get largely there anyway with lazy editor init on textareas. It looks like nsEditorSpellCheck assumes that it has an nsITextServicesDocument in all the methods that are not called from inline spellcheck; so if we decided to not give it one we'd want to add some null-checks.
Ehsan says he can look at this in a few weeks, hopefully.
Assignee: nobody → ehsan.akhgari
Updated•5 years ago
|
Assignee: ehsan → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•