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

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: Thu Mar 2 16:35:42 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..b3713575757c7ff0d4638efe584a1b57352653a2 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
+++ b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
@@ -7,6 +7,8 @@
#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 {
@@ -70,6 +72,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&,
yosin_UTC9 2017/03/03 05:34:23 nit: s/calc/calculate/ We usually don't use abbrev
Xiaocheng 2017/03/03 06:28:28 Done.
+ 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 +97,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