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

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

Issue 2373243002: Prune createVisiblePositionDeprecated from endOfParagraphAlgorithm (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | 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) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
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 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1738 if (candidateType == PositionAnchorType::OffsetInAnchor) 1738 if (candidateType == PositionAnchorType::OffsetInAnchor)
1739 return PositionTemplate<Strategy>(candidateNode, candidateOffset); 1739 return PositionTemplate<Strategy>(candidateNode, candidateOffset);
1740 1740
1741 return PositionTemplate<Strategy>(candidateNode, candidateType); 1741 return PositionTemplate<Strategy>(candidateNode, candidateType);
1742 } 1742 }
1743 1743
1744 template <typename Strategy> 1744 template <typename Strategy>
1745 static VisiblePositionTemplate<Strategy> endOfParagraphAlgorithm(const VisiblePo sitionTemplate<Strategy>& visiblePosition, EditingBoundaryCrossingRule boundaryC rossingRule) 1745 static VisiblePositionTemplate<Strategy> endOfParagraphAlgorithm(const VisiblePo sitionTemplate<Strategy>& visiblePosition, EditingBoundaryCrossingRule boundaryC rossingRule)
1746 { 1746 {
1747 DCHECK(visiblePosition.isValid()) << visiblePosition; 1747 DCHECK(visiblePosition.isValid()) << visiblePosition;
1748 return createVisiblePositionDeprecated(endOfParagraphAlgorithm(visiblePositi on.deepEquivalent(), boundaryCrossingRule)); 1748 return createVisiblePosition(endOfParagraphAlgorithm(visiblePosition.deepEqu ivalent(), boundaryCrossingRule));
1749 } 1749 }
1750 1750
1751 VisiblePosition endOfParagraph(const VisiblePosition& c, EditingBoundaryCrossing Rule boundaryCrossingRule) 1751 VisiblePosition endOfParagraph(const VisiblePosition& c, EditingBoundaryCrossing Rule boundaryCrossingRule)
1752 { 1752 {
1753 return endOfParagraphAlgorithm<EditingStrategy>(c, boundaryCrossingRule); 1753 return endOfParagraphAlgorithm<EditingStrategy>(c, boundaryCrossingRule);
1754 } 1754 }
1755 1755
1756 VisiblePositionInFlatTree endOfParagraph(const VisiblePositionInFlatTree& c, Edi tingBoundaryCrossingRule boundaryCrossingRule) 1756 VisiblePositionInFlatTree endOfParagraph(const VisiblePositionInFlatTree& c, Edi tingBoundaryCrossingRule boundaryCrossingRule)
1757 { 1757 {
1758 return endOfParagraphAlgorithm<EditingInFlatTreeStrategy>(c, boundaryCrossin gRule); 1758 return endOfParagraphAlgorithm<EditingInFlatTreeStrategy>(c, boundaryCrossin gRule);
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
3509 3509
3510 VisiblePositionInFlatTree previousPositionOfDeprecated(const VisiblePositionInFl atTree& visiblePosition, EditingBoundaryCrossingRule rule) 3510 VisiblePositionInFlatTree previousPositionOfDeprecated(const VisiblePositionInFl atTree& visiblePosition, EditingBoundaryCrossingRule rule)
3511 { 3511 {
3512 if (visiblePosition.isNull()) 3512 if (visiblePosition.isNull())
3513 return VisiblePositionInFlatTree(); 3513 return VisiblePositionInFlatTree();
3514 visiblePosition.deepEquivalent().document()->updateStyleAndLayoutIgnorePendi ngStylesheets(); 3514 visiblePosition.deepEquivalent().document()->updateStyleAndLayoutIgnorePendi ngStylesheets();
3515 return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>(visiblePositio n.deepEquivalent(), rule); 3515 return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>(visiblePositio n.deepEquivalent(), rule);
3516 } 3516 }
3517 3517
3518 } // namespace blink 3518 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698