OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 false); | 966 false); |
967 } | 967 } |
968 } else if (EqualsASCII(command, "Indent")) { | 968 } else if (EqualsASCII(command, "Indent")) { |
969 frame()->editor()->indent(); | 969 frame()->editor()->indent(); |
970 } else if (EqualsASCII(command, "Outdent")) { | 970 } else if (EqualsASCII(command, "Outdent")) { |
971 frame()->editor()->outdent(); | 971 frame()->editor()->outdent(); |
972 } else if (EqualsASCII(command, "DeleteBackward")) { | 972 } else if (EqualsASCII(command, "DeleteBackward")) { |
973 rv = frame()->editor()->command(AtomicString("BackwardDelete")).execute(); | 973 rv = frame()->editor()->command(AtomicString("BackwardDelete")).execute(); |
974 } else if (EqualsASCII(command, "DeleteForward")) { | 974 } else if (EqualsASCII(command, "DeleteForward")) { |
975 rv = frame()->editor()->command(AtomicString("ForwardDelete")).execute(); | 975 rv = frame()->editor()->command(AtomicString("ForwardDelete")).execute(); |
| 976 } else if (EqualsASCII(command, "AdvanceToNextMisspelling")) { |
| 977 // False must be passed here, or the currently selected word will never be |
| 978 // skipped. |
| 979 frame()->editor()->advanceToNextMisspelling(false); |
| 980 } else if (EqualsASCII(command, "ToggleSpellPanel")) { |
| 981 frame()->editor()->showSpellingGuessPanel(); |
976 } else { | 982 } else { |
977 rv = frame()->editor()->command(AtomicString(command.c_str())).execute(); | 983 rv = frame()->editor()->command(AtomicString(command.c_str())).execute(); |
978 } | 984 } |
979 return rv; | 985 return rv; |
980 } | 986 } |
981 | 987 |
982 bool WebFrameImpl::executeCommand(const WebString& name, | 988 bool WebFrameImpl::executeCommand(const WebString& name, |
983 const WebString& value) { | 989 const WebString& value) { |
984 ASSERT(frame()); | 990 ASSERT(frame()); |
985 return frame()->editor()->command(webkit_glue::WebStringToString(name)). | 991 return frame()->editor()->command(webkit_glue::WebStringToString(name)). |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 | 1882 |
1877 SecurityOrigin* security_origin = frame_->document()->securityOrigin(); | 1883 SecurityOrigin* security_origin = frame_->document()->securityOrigin(); |
1878 | 1884 |
1879 if (!frame_->loader()->isScheduledLocationChangePending()) { | 1885 if (!frame_->loader()->isScheduledLocationChangePending()) { |
1880 frame_->loader()->stopAllLoaders(); | 1886 frame_->loader()->stopAllLoaders(); |
1881 frame_->loader()->begin(frame_->loader()->url(), true, security_origin); | 1887 frame_->loader()->begin(frame_->loader()->url(), true, security_origin); |
1882 frame_->loader()->write(script_result); | 1888 frame_->loader()->write(script_result); |
1883 frame_->loader()->end(); | 1889 frame_->loader()->end(); |
1884 } | 1890 } |
1885 } | 1891 } |
OLD | NEW |