Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(948)

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/ColdModeSpellCheckRequester.h

Issue 2768393003: Use finer-grained checking in cold mode (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/spellcheck/ColdModeSpellCheckRequester.h
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/ColdModeSpellCheckRequester.h b/third_party/WebKit/Source/core/editing/spellcheck/ColdModeSpellCheckRequester.h
index 113c4be7cfbf6e4a30ac050f5fc59dc01422d57c..5f7dc52e0e10633b68d7ad3abd540a25063b6eba 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/ColdModeSpellCheckRequester.h
+++ b/third_party/WebKit/Source/core/editing/spellcheck/ColdModeSpellCheckRequester.h
@@ -5,14 +5,12 @@
#ifndef ColdModeSpellCheckRequester_h
#define ColdModeSpellCheckRequester_h
+#include "core/editing/EphemeralRange.h"
#include "platform/heap/Handle.h"
namespace blink {
-class Element;
class IdleDeadline;
-class LocalFrame;
-class Node;
class SpellCheckRequester;
// This class is only supposed to be used by IdleSpellCheckCallback in cold mode
@@ -36,10 +34,24 @@ class ColdModeSpellCheckRequester
LocalFrame& frame() const { return *m_frame; }
SpellCheckRequester& spellCheckRequester() const;
+ // Perform checking task incrementally based on the stored state.
+ void step();
+
+ void searchForNextRootEditable();
+ void initializeForCurrentRootEditable();
+ bool haveMoreChunksToCheck();
+ void requestCheckingForNextChunk();
+ void finishCheckingCurrentRootEditable();
+
+ void resetCheckingProgress();
void chunkAndRequestFullCheckingFor(const Element&);
const Member<LocalFrame> m_frame;
Member<Node> m_nextNode;
+ Member<Element> m_currentRootEditable;
+ int m_currentFullLength;
+ int m_currentChunkIndex;
+ Position m_currentChunkStart;
uint64_t m_lastCheckedDOMTreeVersion;
mutable bool m_needsMoreInvocationForTesting;

Powered by Google App Engine
This is Rietveld 408576698