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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: 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 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // static 75 // static
76 SpellCheckRequest* SpellCheckRequest::create( 76 SpellCheckRequest* SpellCheckRequest::create(
77 const EphemeralRange& checkingRange, 77 const EphemeralRange& checkingRange,
78 int requestNumber) { 78 int requestNumber) {
79 if (checkingRange.isNull()) 79 if (checkingRange.isNull())
80 return nullptr; 80 return nullptr;
81 if (!blink::rootEditableElement( 81 if (!blink::rootEditableElement(
82 *checkingRange.startPosition().computeContainerNode())) 82 *checkingRange.startPosition().computeContainerNode()))
83 return nullptr; 83 return nullptr;
84 84
85 String text = 85 String text = plainText(checkingRange,
86 plainText(checkingRange, TextIteratorBehavior::Builder() 86 TextIteratorBehavior::Builder()
87 .setEmitsObjectReplacementCharacter(true) 87 .setEmitsObjectReplacementCharacter(true)
88 .build()); 88 .build());
89 if (text.isEmpty()) 89 if (text.isEmpty())
90 return nullptr; 90 return nullptr;
91 91
92 Range* checkingRangeObject = createRange(checkingRange); 92 Range* checkingRangeObject = createRange(checkingRange);
93 93
94 const DocumentMarkerVector& markers = 94 const DocumentMarkerVector& markers =
95 checkingRangeObject->ownerDocument().markers().markersInRange( 95 checkingRangeObject->ownerDocument().markers().markersInRange(
96 checkingRange, DocumentMarker::SpellCheckClientMarkers()); 96 checkingRange, DocumentMarker::SpellCheckClientMarkers());
97 Vector<uint32_t> hashes(markers.size()); 97 Vector<uint32_t> hashes(markers.size());
98 Vector<unsigned> offsets(markers.size()); 98 Vector<unsigned> offsets(markers.size());
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 didCheck(sequence, results); 286 didCheck(sequence, results);
287 } 287 }
288 288
289 DEFINE_TRACE(SpellCheckRequester) { 289 DEFINE_TRACE(SpellCheckRequester) {
290 visitor->trace(m_frame); 290 visitor->trace(m_frame);
291 visitor->trace(m_processingRequest); 291 visitor->trace(m_processingRequest);
292 visitor->trace(m_requestQueue); 292 visitor->trace(m_requestQueue);
293 } 293 }
294 294
295 } // namespace blink 295 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698