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

Side by Side Diff: Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp

Issue 1245843003: [CodeHealth] Use Position::anchorNode instead of deprecatedNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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) 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 , m_textLength(0) 75 , m_textLength(0)
76 , m_singleCharacterBuffer(0) 76 , m_singleCharacterBuffer(0)
77 , m_havePassedStartNode(false) 77 , m_havePassedStartNode(false)
78 , m_shouldHandleFirstLetter(false) 78 , m_shouldHandleFirstLetter(false)
79 , m_stopsOnFormControls(behavior & TextIteratorStopsOnFormControls) 79 , m_stopsOnFormControls(behavior & TextIteratorStopsOnFormControls)
80 , m_shouldStop(false) 80 , m_shouldStop(false)
81 , m_emitsOriginalText(false) 81 , m_emitsOriginalText(false)
82 { 82 {
83 ASSERT(behavior == TextIteratorDefaultBehavior || behavior == TextIteratorSt opsOnFormControls); 83 ASSERT(behavior == TextIteratorDefaultBehavior || behavior == TextIteratorSt opsOnFormControls);
84 84
85 Node* startNode = start.deprecatedNode(); 85 Node* startNode = start.anchorNode();
86 if (!startNode) 86 if (!startNode)
87 return; 87 return;
88 Node* endNode = end.deprecatedNode(); 88 Node* endNode = end.anchorNode();
89 int startOffset = start.deprecatedEditingOffset(); 89 int startOffset = start.deprecatedEditingOffset();
90 int endOffset = end.deprecatedEditingOffset(); 90 int endOffset = end.deprecatedEditingOffset();
91 91
92 init(startNode, endNode, startOffset, endOffset); 92 init(startNode, endNode, startOffset, endOffset);
93 } 93 }
94 94
95 template <typename Strategy> 95 template <typename Strategy>
96 void SimplifiedBackwardsTextIteratorAlgorithm<Strategy>::init(Node* startNode, N ode* endNode, int startOffset, int endOffset) 96 void SimplifiedBackwardsTextIteratorAlgorithm<Strategy>::init(Node* startNode, N ode* endNode, int startOffset, int endOffset)
97 { 97 {
98 if (!startNode->offsetInCharacters() && startOffset >= 0) { 98 if (!startNode->offsetInCharacters() && startOffset >= 0) {
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if (m_positionNode) 378 if (m_positionNode)
379 return PositionAlgorithm<Strategy>::createLegacyEditingPosition(m_positi onNode, m_positionEndOffset); 379 return PositionAlgorithm<Strategy>::createLegacyEditingPosition(m_positi onNode, m_positionEndOffset);
380 return PositionAlgorithm<Strategy>::createLegacyEditingPosition(m_startNode, m_startOffset); 380 return PositionAlgorithm<Strategy>::createLegacyEditingPosition(m_startNode, m_startOffset);
381 } 381 }
382 382
383 template class CORE_TEMPLATE_EXPORT SimplifiedBackwardsTextIteratorAlgorithm<Edi tingStrategy>; 383 template class CORE_TEMPLATE_EXPORT SimplifiedBackwardsTextIteratorAlgorithm<Edi tingStrategy>;
384 template class CORE_TEMPLATE_EXPORT SimplifiedBackwardsTextIteratorAlgorithm<Edi tingInComposedTreeStrategy>; 384 template class CORE_TEMPLATE_EXPORT SimplifiedBackwardsTextIteratorAlgorithm<Edi tingInComposedTreeStrategy>;
385 385
386 386
387 } // namespace blink 387 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/htmlediting.cpp ('k') | Source/core/html/HTMLTextFormControlElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698