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

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

Issue 1369713002: Avoid creating duplicate Range objects when handling misspellings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: push Range de-dup into SpellCheckRequester::create() Created 5 years, 3 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/SpellCheckRequester.h
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.h b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.h
index 2f125e869f279f1caf99f20e6eef6c149cf43546..41826047e95c61e5fc6a29c8f956f74a6d62a9c9 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.h
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.h
@@ -28,6 +28,7 @@
#include "core/dom/Element.h"
#include "core/dom/Range.h"
+#include "core/editing/EphemeralRange.h"
#include "platform/Timer.h"
#include "platform/text/TextChecking.h"
#include "wtf/Deque.h"
@@ -44,7 +45,7 @@ class TextCheckerClient;
class SpellCheckRequest final : public TextCheckingRequest {
public:
- static PassRefPtrWillBeRawPtr<SpellCheckRequest> create(TextCheckingTypeMask, TextCheckingProcessType, PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefPtrWillBeRawPtr<Range> paragraphRange, int requestNumber = 0);
+ static PassRefPtrWillBeRawPtr<SpellCheckRequest> create(TextCheckingTypeMask, TextCheckingProcessType, const EphemeralRange& checkingRange, const EphemeralRange& paragraphRange, int requestNumber = 0);
~SpellCheckRequest() override;
PassRefPtrWillBeRawPtr<Range> checkingRange() const { return m_checkingRange; }

Powered by Google App Engine
This is Rietveld 408576698