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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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(blink::rootEditableElement(*m_checkingRange->startCo ntainer())) 50 , m_rootEditableElement(blink::rootEditableElement(*m_checkingRange->startCo ntainer()))
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 DCHECK(m_checkingRange); 54 DCHECK(m_checkingRange);
55 DCHECK(m_checkingRange->inShadowIncludingDocument()); 55 DCHECK(m_checkingRange->isConnected());
56 DCHECK(m_paragraphRange); 56 DCHECK(m_paragraphRange);
57 DCHECK(m_paragraphRange->inShadowIncludingDocument()); 57 DCHECK(m_paragraphRange->isConnected());
58 DCHECK(m_rootEditableElement); 58 DCHECK(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->inShadowIncludingDocument() && m_paragraphRange->inS hadowIncludingDocument() && m_rootEditableElement->inShadowIncludingDocument(); 120 return m_checkingRange->isConnected() && m_paragraphRange->isConnected() && m_rootEditableElement->isConnected();
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 312
313 DEFINE_TRACE(SpellCheckRequester) 313 DEFINE_TRACE(SpellCheckRequester)
314 { 314 {
315 visitor->trace(m_frame); 315 visitor->trace(m_frame);
316 visitor->trace(m_processingRequest); 316 visitor->trace(m_processingRequest);
317 visitor->trace(m_requestQueue); 317 visitor->trace(m_requestQueue);
318 } 318 }
319 319
320 } // namespace blink 320 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698