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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const Vector<unsigned>& documentMarkerOffsets, 45 const Vector<unsigned>& documentMarkerOffsets,
46 int requestNumber) 46 int requestNumber)
47 : m_requester(nullptr) 47 : m_requester(nullptr)
48 , m_checkingRange(checkingRange) 48 , m_checkingRange(checkingRange)
49 , m_paragraphRange(paragraphRange) 49 , m_paragraphRange(paragraphRange)
50 , m_rootEditableElement(m_checkingRange->startContainer()->rootEditableEleme nt()) 50 , m_rootEditableElement(m_checkingRange->startContainer()->rootEditableEleme nt())
51 , m_requestData(unrequestedTextCheckingSequence, text, mask, processType, do cumentMarkersInRange, documentMarkerOffsets) 51 , m_requestData(unrequestedTextCheckingSequence, text, mask, processType, do cumentMarkersInRange, documentMarkerOffsets)
52 , m_requestNumber(requestNumber) 52 , m_requestNumber(requestNumber)
53 { 53 {
54 ASSERT(m_checkingRange); 54 ASSERT(m_checkingRange);
55 ASSERT(m_checkingRange->inDocument()); 55 ASSERT(m_checkingRange->inShadowIncludingDocument());
56 ASSERT(m_paragraphRange); 56 ASSERT(m_paragraphRange);
57 ASSERT(m_paragraphRange->inDocument()); 57 ASSERT(m_paragraphRange->inShadowIncludingDocument());
58 ASSERT(m_rootEditableElement); 58 ASSERT(m_rootEditableElement);
59 } 59 }
60 60
61 SpellCheckRequest::~SpellCheckRequest() 61 SpellCheckRequest::~SpellCheckRequest()
62 { 62 {
63 } 63 }
64 64
65 DEFINE_TRACE(SpellCheckRequest) 65 DEFINE_TRACE(SpellCheckRequest)
66 { 66 {
67 visitor->trace(m_requester); 67 visitor->trace(m_requester);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return new SpellCheckRequest(checkingRangeObject, paragraphRangeObject, text , textCheckingOptions, processType, hashes, offsets, requestNumber); 110 return new SpellCheckRequest(checkingRangeObject, paragraphRangeObject, text , textCheckingOptions, processType, hashes, offsets, requestNumber);
111 } 111 }
112 112
113 const TextCheckingRequestData& SpellCheckRequest::data() const 113 const TextCheckingRequestData& SpellCheckRequest::data() const
114 { 114 {
115 return m_requestData; 115 return m_requestData;
116 } 116 }
117 117
118 bool SpellCheckRequest::isValid() const 118 bool SpellCheckRequest::isValid() const
119 { 119 {
120 return m_checkingRange->inDocument() && m_paragraphRange->inDocument() && m_ rootEditableElement->inDocument(); 120 return m_checkingRange->inShadowIncludingDocument() && m_paragraphRange->inS hadowIncludingDocument() && m_rootEditableElement->inShadowIncludingDocument();
121 } 121 }
122 122
123 void SpellCheckRequest::didSucceed(const Vector<TextCheckingResult>& results) 123 void SpellCheckRequest::didSucceed(const Vector<TextCheckingResult>& results)
124 { 124 {
125 if (!m_requester) 125 if (!m_requester)
126 return; 126 return;
127 SpellCheckRequester* requester = m_requester; 127 SpellCheckRequester* requester = m_requester;
128 m_requester = nullptr; 128 m_requester = nullptr;
129 requester->didCheckSucceed(m_requestData.sequence(), results); 129 requester->didCheckSucceed(m_requestData.sequence(), results);
130 } 130 }
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 324 }
325 325
326 DEFINE_TRACE(SpellCheckRequester) 326 DEFINE_TRACE(SpellCheckRequester)
327 { 327 {
328 visitor->trace(m_frame); 328 visitor->trace(m_frame);
329 visitor->trace(m_processingRequest); 329 visitor->trace(m_processingRequest);
330 visitor->trace(m_requestQueue); 330 visitor->trace(m_requestQueue);
331 } 331 }
332 332
333 } // namespace blink 333 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698