| 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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 RefPtrWillBeRawPtr<EditingStyle> blockStyle = typingStyle->extractAndRemoveB
lockProperties(); | 1140 RefPtrWillBeRawPtr<EditingStyle> blockStyle = typingStyle->extractAndRemoveB
lockProperties(); |
| 1141 if (!blockStyle->isEmpty()) { | 1141 if (!blockStyle->isEmpty()) { |
| 1142 ASSERT(frame().document()); | 1142 ASSERT(frame().document()); |
| 1143 ApplyStyleCommand::create(*frame().document(), blockStyle.get(), editing
Action)->apply(); | 1143 ApplyStyleCommand::create(*frame().document(), blockStyle.get(), editing
Action)->apply(); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 // Set the remaining style as the typing style. | 1146 // Set the remaining style as the typing style. |
| 1147 frame().selection().setTypingStyle(typingStyle); | 1147 frame().selection().setTypingStyle(typingStyle); |
| 1148 } | 1148 } |
| 1149 | 1149 |
| 1150 bool Editor::findString(const String& target, bool forward, bool caseFlag, bool
wrapFlag, bool startInSelection) | |
| 1151 { | |
| 1152 FindOptions options = (forward ? 0 : Backwards) | (caseFlag ? 0 : CaseInsens
itive) | (wrapFlag ? WrapAround : 0) | (startInSelection ? StartInSelection : 0)
; | |
| 1153 return findString(target, options); | |
| 1154 } | |
| 1155 | |
| 1156 bool Editor::findString(const String& target, FindOptions options) | 1150 bool Editor::findString(const String& target, FindOptions options) |
| 1157 { | 1151 { |
| 1158 VisibleSelection selection = frame().selection().selection(); | 1152 VisibleSelection selection = frame().selection().selection(); |
| 1159 | 1153 |
| 1160 RefPtrWillBeRawPtr<Range> resultRange = rangeOfString(target, selection.firs
tRange().get(), options); | 1154 RefPtrWillBeRawPtr<Range> resultRange = rangeOfString(target, selection.firs
tRange().get(), options); |
| 1161 | 1155 |
| 1162 if (!resultRange) | 1156 if (!resultRange) |
| 1163 return false; | 1157 return false; |
| 1164 | 1158 |
| 1165 frame().selection().setSelection(VisibleSelection(resultRange.get(), DOWNSTR
EAM)); | 1159 frame().selection().setSelection(VisibleSelection(resultRange.get(), DOWNSTR
EAM)); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 } | 1273 } |
| 1280 | 1274 |
| 1281 void Editor::trace(Visitor* visitor) | 1275 void Editor::trace(Visitor* visitor) |
| 1282 { | 1276 { |
| 1283 visitor->trace(m_frame); | 1277 visitor->trace(m_frame); |
| 1284 visitor->trace(m_lastEditCommand); | 1278 visitor->trace(m_lastEditCommand); |
| 1285 visitor->trace(m_mark); | 1279 visitor->trace(m_mark); |
| 1286 } | 1280 } |
| 1287 | 1281 |
| 1288 } // namespace blink | 1282 } // namespace blink |
| OLD | NEW |