Summary: | Enabling spellchecking slows down selection even when nothing is editable | ||
---|---|---|---|
Product: | WebKit | Reporter: | Brett Wilson (Google) <brettw> |
Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
Status: | VERIFIED WORKSFORME | ||
Severity: | Normal | CC: | fishd |
Priority: | P2 | ||
Version: | 523.x (Safari 3) | ||
Hardware: | All | ||
OS: | All |
Description
Brett Wilson (Google)
2007-05-30 14:06:23 PDT
If the selection is not editable then all we do is [from Frame.cpp]: if (RefPtr<Range> wordRange = newAdjacentWords.toRange()) document()->removeMarkers(wordRange.get(), DocumentMarker::Spelling); if (RefPtr<Range> sentenceRange = newSelectedSentence.toRange()) document()->removeMarkers(sentenceRange.get(), DocumentMarker::Grammar); Which will do very little work since the selections newSelected{Word, Sentence} are both empty. And: if (!isContinuousSpellCheckingEnabled) document()->removeMarkers(DocumentMarker::Spelling); if (!isContinuousGrammarCheckingEnabled) document()->removeMarkers(DocumentMarker::Grammar); Which will also do very little since there will be no markers. I can't reproduce the slowness you describe. Are you using the latest nightly? This is fixed when I synced, the version I was using was a little older. The old version checked isContinuousSpellCheckingEnabled and did a lot of work. The latest version now checks the selection's editableness before doing the hard part. |