| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |