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

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

Issue 1994043002: Get rid of a redundant function alias lastPositionInNode() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-05-19T14:50:30 Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 DCHECK(visibleStart.isNotNull()); 511 DCHECK(visibleStart.isNotNull());
512 const Position& sentenceStart = startOfSentence(visibleStart).deepEquivalent (); 512 const Position& sentenceStart = startOfSentence(visibleStart).deepEquivalent ();
513 return expandEndToSentenceBoundary(EphemeralRange(sentenceStart.isNull() ? r ange.startPosition() : sentenceStart, range.endPosition())); 513 return expandEndToSentenceBoundary(EphemeralRange(sentenceStart.isNull() ? r ange.startPosition() : sentenceStart, range.endPosition()));
514 } 514 }
515 515
516 void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(Node* node, const Ep hemeralRange& insertedRange) 516 void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(Node* node, const Ep hemeralRange& insertedRange)
517 { 517 {
518 TRACE_EVENT0("blink", "SpellChecker::chunkAndMarkAllMisspellingsAndBadGramma r"); 518 TRACE_EVENT0("blink", "SpellChecker::chunkAndMarkAllMisspellingsAndBadGramma r");
519 if (!node) 519 if (!node)
520 return; 520 return;
521 EphemeralRange paragraphRange(Position::firstPositionInNode(node), lastPosit ionInNode(node)); 521 EphemeralRange paragraphRange(Position::firstPositionInNode(node), Position: :lastPositionInNode(node));
522 TextCheckingParagraph textToCheck(insertedRange, paragraphRange); 522 TextCheckingParagraph textToCheck(insertedRange, paragraphRange);
523 chunkAndMarkAllMisspellingsAndBadGrammar(resolveTextCheckingTypeMask(TextChe ckingTypeSpelling | TextCheckingTypeGrammar), textToCheck); 523 chunkAndMarkAllMisspellingsAndBadGrammar(resolveTextCheckingTypeMask(TextChe ckingTypeSpelling | TextCheckingTypeGrammar), textToCheck);
524 } 524 }
525 525
526 void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheckingOptions, const TextCheckingParagraph& fullParagraphToCheck) 526 void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheckingOptions, const TextCheckingParagraph& fullParagraphToCheck)
527 { 527 {
528 if (fullParagraphToCheck.isEmpty()) 528 if (fullParagraphToCheck.isEmpty())
529 return; 529 return;
530 const EphemeralRange& paragraphRange = fullParagraphToCheck.paragraphRange() ; 530 const EphemeralRange& paragraphRange = fullParagraphToCheck.paragraphRange() ;
531 531
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 visitor->trace(m_frame); 936 visitor->trace(m_frame);
937 visitor->trace(m_spellCheckRequester); 937 visitor->trace(m_spellCheckRequester);
938 } 938 }
939 939
940 void SpellChecker::prepareForLeakDetection() 940 void SpellChecker::prepareForLeakDetection()
941 { 941 {
942 m_spellCheckRequester->prepareForLeakDetection(); 942 m_spellCheckRequester->prepareForLeakDetection();
943 } 943 }
944 944
945 } // namespace blink 945 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698