OLD | NEW |
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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 RefPtrWillBeRawPtr<EditingStyle> blockStyle = typingStyle->extractAndRemoveB
lockProperties(); | 1134 RefPtrWillBeRawPtr<EditingStyle> blockStyle = typingStyle->extractAndRemoveB
lockProperties(); |
1135 if (!blockStyle->isEmpty()) { | 1135 if (!blockStyle->isEmpty()) { |
1136 ASSERT(frame().document()); | 1136 ASSERT(frame().document()); |
1137 ApplyStyleCommand::create(*frame().document(), blockStyle.get(), editing
Action)->apply(); | 1137 ApplyStyleCommand::create(*frame().document(), blockStyle.get(), editing
Action)->apply(); |
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, bool forward, bool caseFlag, bool
wrapFlag, bool startInSelection) | |
1145 { | |
1146 FindOptions options = (forward ? 0 : Backwards) | (caseFlag ? 0 : CaseInsens
itive) | (wrapFlag ? WrapAround : 0) | (startInSelection ? StartInSelection : 0)
; | |
1147 return findString(target, options); | |
1148 } | |
1149 | |
1150 bool Editor::findString(const String& target, FindOptions options) | 1144 bool Editor::findString(const String& target, FindOptions options) |
1151 { | 1145 { |
1152 VisibleSelection selection = frame().selection().selection(); | 1146 VisibleSelection selection = frame().selection().selection(); |
1153 | 1147 |
1154 RefPtrWillBeRawPtr<Range> resultRange = rangeOfString(target, selection.firs
tRange().get(), options); | 1148 RefPtrWillBeRawPtr<Range> resultRange = rangeOfString(target, selection.firs
tRange().get(), options); |
1155 | 1149 |
1156 if (!resultRange) | 1150 if (!resultRange) |
1157 return false; | 1151 return false; |
1158 | 1152 |
1159 frame().selection().setSelection(VisibleSelection(resultRange.get(), DOWNSTR
EAM)); | 1153 frame().selection().setSelection(VisibleSelection(resultRange.get(), DOWNSTR
EAM)); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 } | 1267 } |
1274 | 1268 |
1275 DEFINE_TRACE(Editor) | 1269 DEFINE_TRACE(Editor) |
1276 { | 1270 { |
1277 visitor->trace(m_frame); | 1271 visitor->trace(m_frame); |
1278 visitor->trace(m_lastEditCommand); | 1272 visitor->trace(m_lastEditCommand); |
1279 visitor->trace(m_mark); | 1273 visitor->trace(m_mark); |
1280 } | 1274 } |
1281 | 1275 |
1282 } // namespace blink | 1276 } // namespace blink |
OLD | NEW |