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

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

Issue 1213213004: Introduce use counters for shadow DOM handling in plainText() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-07-03T14:40:27 Rebase 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
« no previous file with comments | « Source/core/editing/DOMSelection.cpp ('k') | Source/core/editing/FindOptions.h » ('j') | 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) 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 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 } 1138 }
1139 1139
1140 // Set the remaining style as the typing style. 1140 // Set the remaining style as the typing style.
1141 frame().selection().setTypingStyle(typingStyle); 1141 frame().selection().setTypingStyle(typingStyle);
1142 } 1142 }
1143 1143
1144 bool Editor::findString(const String& target, FindOptions options) 1144 bool Editor::findString(const String& target, FindOptions options)
1145 { 1145 {
1146 VisibleSelection selection = frame().selection().selection(); 1146 VisibleSelection selection = frame().selection().selection();
1147 1147
1148 RefPtrWillBeRawPtr<Range> resultRange = rangeOfString(target, selection.firs tRange().get(), options); 1148 RefPtrWillBeRawPtr<Range> resultRange = rangeOfString(target, selection.firs tRange().get(), static_cast<FindOptions>(options | FindAPICall));
1149 1149
1150 if (!resultRange) 1150 if (!resultRange)
1151 return false; 1151 return false;
1152 1152
1153 frame().selection().setSelection(VisibleSelection(resultRange.get(), DOWNSTR EAM)); 1153 frame().selection().setSelection(VisibleSelection(resultRange.get(), DOWNSTR EAM));
1154 frame().selection().revealSelection(); 1154 frame().selection().revealSelection();
1155 return true; 1155 return true;
1156 } 1156 }
1157 1157
1158 PassRefPtrWillBeRawPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Range* previousMatch, FindOptions options) 1158 PassRefPtrWillBeRawPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Range* previousMatch, FindOptions options)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 } 1267 }
1268 1268
1269 DEFINE_TRACE(Editor) 1269 DEFINE_TRACE(Editor)
1270 { 1270 {
1271 visitor->trace(m_frame); 1271 visitor->trace(m_frame);
1272 visitor->trace(m_lastEditCommand); 1272 visitor->trace(m_lastEditCommand);
1273 visitor->trace(m_mark); 1273 visitor->trace(m_mark);
1274 } 1274 }
1275 1275
1276 } // namespace blink 1276 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/DOMSelection.cpp ('k') | Source/core/editing/FindOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698