| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 return; | 1286 return; |
| 1287 RefPtr<Range> markerRange = Range::create(caretRange->ownerDocument(), caret
Range->startContainer(), markers[0]->startOffset(), caretRange->endContainer(),
markers[0]->endOffset()); | 1287 RefPtr<Range> markerRange = Range::create(caretRange->ownerDocument(), caret
Range->startContainer(), markers[0]->startOffset(), caretRange->endContainer(),
markers[0]->endOffset()); |
| 1288 if (!markerRange) | 1288 if (!markerRange) |
| 1289 return; | 1289 return; |
| 1290 if (!frame()->selection()->shouldChangeSelection(markerRange.get())) | 1290 if (!frame()->selection()->shouldChangeSelection(markerRange.get())) |
| 1291 return; | 1291 return; |
| 1292 frame()->selection()->setSelection(markerRange.get(), CharacterGranularity); | 1292 frame()->selection()->setSelection(markerRange.get(), CharacterGranularity); |
| 1293 frame()->editor()->replaceSelectionWithText(text, false, false); | 1293 frame()->editor()->replaceSelectionWithText(text, false, false); |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 void WebFrameImpl::removeSpellingMarkers() |
| 1297 { |
| 1298 frame()->document()->markers()->removeMarkers(DocumentMarker::Spelling | Doc
umentMarker::Grammar); |
| 1299 } |
| 1300 |
| 1296 bool WebFrameImpl::hasSelection() const | 1301 bool WebFrameImpl::hasSelection() const |
| 1297 { | 1302 { |
| 1298 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1303 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
| 1299 if (pluginContainer) | 1304 if (pluginContainer) |
| 1300 return pluginContainer->plugin()->hasSelection(); | 1305 return pluginContainer->plugin()->hasSelection(); |
| 1301 | 1306 |
| 1302 // frame()->selection()->isNone() never returns true. | 1307 // frame()->selection()->isNone() never returns true. |
| 1303 return (frame()->selection()->start() != frame()->selection()->end()); | 1308 return (frame()->selection()->start() != frame()->selection()->end()); |
| 1304 } | 1309 } |
| 1305 | 1310 |
| (...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2498 | 2503 |
| 2499 // There is a possibility that the frame being detached was the only | 2504 // There is a possibility that the frame being detached was the only |
| 2500 // pending one. We need to make sure final replies can be sent. | 2505 // pending one. We need to make sure final replies can be sent. |
| 2501 flushCurrentScopingEffort(m_findRequestIdentifier); | 2506 flushCurrentScopingEffort(m_findRequestIdentifier); |
| 2502 | 2507 |
| 2503 cancelPendingScopingEffort(); | 2508 cancelPendingScopingEffort(); |
| 2504 } | 2509 } |
| 2505 } | 2510 } |
| 2506 | 2511 |
| 2507 } // namespace WebKit | 2512 } // namespace WebKit |
| OLD | NEW |