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

Side by Side Diff: third_party/WebKit/Source/core/editing/iterators/SearchBuffer.cpp

Issue 2059143002: "up-to-date" should only use hyphens when used as compound modifier of a noun (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
3 * Copyright (C) 2005 Alexey Proskuryakov. 3 * Copyright (C) 2005 Alexey Proskuryakov.
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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 416
417 return matchLength; 417 return matchLength;
418 } 418 }
419 419
420 static const TextIteratorBehaviorFlags iteratorFlagsForFindPlainText = TextItera torEntersTextControls | TextIteratorEntersOpenShadowRoots | TextIteratorDoesNotB reakAtReplacedElement | TextIteratorCollapseTrailingSpace; 420 static const TextIteratorBehaviorFlags iteratorFlagsForFindPlainText = TextItera torEntersTextControls | TextIteratorEntersOpenShadowRoots | TextIteratorDoesNotB reakAtReplacedElement | TextIteratorCollapseTrailingSpace;
421 421
422 template <typename Strategy> 422 template <typename Strategy>
423 static EphemeralRangeTemplate<Strategy> findPlainTextAlgorithm(const EphemeralRa ngeTemplate<Strategy>& inputRange, const String& target, FindOptions options) 423 static EphemeralRangeTemplate<Strategy> findPlainTextAlgorithm(const EphemeralRa ngeTemplate<Strategy>& inputRange, const String& target, FindOptions options)
424 { 424 {
425 // CharacterIterator requires layoutObjects to be up-to-date. 425 // CharacterIterator requires layoutObjects to be up to date.
426 if (!inputRange.startPosition().inShadowIncludingDocument()) 426 if (!inputRange.startPosition().inShadowIncludingDocument())
427 return EphemeralRangeTemplate<Strategy>(); 427 return EphemeralRangeTemplate<Strategy>();
428 DCHECK_EQ(inputRange.startPosition().document(), inputRange.endPosition().do cument()); 428 DCHECK_EQ(inputRange.startPosition().document(), inputRange.endPosition().do cument());
429 429
430 // FIXME: Reduce the code duplication with above (but how?). 430 // FIXME: Reduce the code duplication with above (but how?).
431 size_t matchStart; 431 size_t matchStart;
432 size_t matchLength; 432 size_t matchLength;
433 { 433 {
434 TextIteratorBehaviorFlags behavior = iteratorFlagsForFindPlainText; 434 TextIteratorBehaviorFlags behavior = iteratorFlagsForFindPlainText;
435 if (options & FindAPICall) 435 if (options & FindAPICall)
(...skipping 18 matching lines...) Expand all
454 { 454 {
455 return findPlainTextAlgorithm<EditingStrategy>(inputRange, target, options); 455 return findPlainTextAlgorithm<EditingStrategy>(inputRange, target, options);
456 } 456 }
457 457
458 EphemeralRangeInFlatTree findPlainText(const EphemeralRangeInFlatTree& inputRang e, const String& target, FindOptions options) 458 EphemeralRangeInFlatTree findPlainText(const EphemeralRangeInFlatTree& inputRang e, const String& target, FindOptions options)
459 { 459 {
460 return findPlainTextAlgorithm<EditingInFlatTreeStrategy>(inputRange, target, options); 460 return findPlainTextAlgorithm<EditingInFlatTreeStrategy>(inputRange, target, options);
461 } 461 }
462 462
463 } // namespace blink 463 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/bounds-calc.html ('k') | third_party/WebKit/Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698