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

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

Issue 2720193002: Implement hot mode invocation for idle time spell checker (Closed)
Patch Set: Wed Mar 1 16:02:57 PST 2017 Created 3 years, 10 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/IdleSpellCheckCallback.h
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
index db1e34d49f2b9e952e397da3c15dcdcc17755b47..a95e0bce96aca0bfe9200599c7af11f25d7518b6 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
+++ b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
@@ -7,12 +7,15 @@
#include "core/dom/IdleRequestCallback.h"
#include "core/dom/SynchronousMutationObserver.h"
+#include "core/editing/EphemeralRange.h"
+#include "core/editing/Position.h"
#include "platform/Timer.h"
namespace blink {
class LocalFrame;
class SpellCheckRequester;
+class UndoStack;
// Main class for the implementation of idle time spell checker.
class CORE_EXPORT IdleSpellCheckCallback final
@@ -62,6 +65,7 @@ class CORE_EXPORT IdleSpellCheckCallback final
void handleEvent(IdleDeadline*) override;
LocalFrame& frame() const { return *m_frame; }
+ UndoStack& undoStack() const;
yosin_UTC9 2017/03/02 03:38:41 This should be private.
Xiaocheng 2017/03/02 04:34:59 This is private.
// Returns whether spell checking is globally enabled.
bool isSpellCheckingEnabled() const;
@@ -70,6 +74,13 @@ class CORE_EXPORT IdleSpellCheckCallback final
void requestInvocation();
// Functions for hot mode.
+ bool isTypingInPartialWord(const Element&) const;
+ bool shouldCheckRootEditableInHotMode(const Element&, const Position&) const;
+ EphemeralRange calcHotModeCheckingRange(const Element&,
+ const Position&) const;
+ void hotModeCheckRootEditable(Element*,
+ const Position&,
+ HeapVector<Member<Element>>*);
void hotModeInvocation(IdleDeadline*);
// Transit to ColdModeTimerStarted, if possible. Sets up a timer, and requests
@@ -88,7 +99,7 @@ class CORE_EXPORT IdleSpellCheckCallback final
int m_idleCallbackHandle;
mutable bool m_needsMoreColdModeInvocationForTesting;
const Member<LocalFrame> m_frame;
-
+ uint64_t m_lastProcessedUndoStepSequence;
TaskRunnerTimer<IdleSpellCheckCallback> m_coldModeTimer;
};

Powered by Google App Engine
This is Rietveld 408576698