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

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

Issue 2920733002: Rename VisibleSelection::end() to End() (Closed)
Patch Set: 2017-06-01T18:31:38 Created 3 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) 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 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 } 1591 }
1592 } 1592 }
1593 1593
1594 bool Editor::FindString(const String& target, FindOptions options) { 1594 bool Editor::FindString(const String& target, FindOptions options) {
1595 VisibleSelection selection = 1595 VisibleSelection selection =
1596 GetFrame().Selection().ComputeVisibleSelectionInDOMTreeDeprecated(); 1596 GetFrame().Selection().ComputeVisibleSelectionInDOMTreeDeprecated();
1597 1597
1598 // TODO(yosin) We should make |findRangeOfString()| to return 1598 // TODO(yosin) We should make |findRangeOfString()| to return
1599 // |EphemeralRange| rather than|Range| object. 1599 // |EphemeralRange| rather than|Range| object.
1600 Range* result_range = FindRangeOfString( 1600 Range* result_range = FindRangeOfString(
1601 target, EphemeralRange(selection.Start(), selection.end()), 1601 target, EphemeralRange(selection.Start(), selection.End()),
1602 static_cast<FindOptions>(options | kFindAPICall)); 1602 static_cast<FindOptions>(options | kFindAPICall));
1603 1603
1604 if (!result_range) 1604 if (!result_range)
1605 return false; 1605 return false;
1606 1606
1607 GetFrame().Selection().SetSelection( 1607 GetFrame().Selection().SetSelection(
1608 SelectionInDOMTree::Builder() 1608 SelectionInDOMTree::Builder()
1609 .SetBaseAndExtent(EphemeralRange(result_range)) 1609 .SetBaseAndExtent(EphemeralRange(result_range))
1610 .Build()); 1610 .Build());
1611 GetFrame().Selection().RevealSelection(); 1611 GetFrame().Selection().RevealSelection();
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 1847
1848 DEFINE_TRACE(Editor) { 1848 DEFINE_TRACE(Editor) {
1849 visitor->Trace(frame_); 1849 visitor->Trace(frame_);
1850 visitor->Trace(last_edit_command_); 1850 visitor->Trace(last_edit_command_);
1851 visitor->Trace(undo_stack_); 1851 visitor->Trace(undo_stack_);
1852 visitor->Trace(mark_); 1852 visitor->Trace(mark_);
1853 visitor->Trace(typing_style_); 1853 visitor->Trace(typing_style_);
1854 } 1854 }
1855 1855
1856 } // namespace blink 1856 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698