OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 if (!frame) | 189 if (!frame) |
190 return; | 190 return; |
191 | 191 |
192 SelectionState selectionState; | 192 SelectionState selectionState; |
193 selectionState.isNone = frame->selection()->isNone(); | 193 selectionState.isNone = frame->selection()->isNone(); |
194 selectionState.isContentEditable = frame->selection()->isContentEditable(); | 194 selectionState.isContentEditable = frame->selection()->isContentEditable(); |
195 selectionState.isContentRichlyEditable = frame->selection()->isContentRichly
Editable(); | 195 selectionState.isContentRichlyEditable = frame->selection()->isContentRichly
Editable(); |
196 selectionState.isInPasswordField = frame->selection()->isInPasswordField(); | 196 selectionState.isInPasswordField = frame->selection()->isInPasswordField(); |
197 selectionState.hasComposition = frame->editor()->hasComposition(); | 197 selectionState.hasComposition = frame->editor()->hasComposition(); |
198 | 198 |
199 WebPage::getLocationAndLengthFromRange(frame->selection()->toNormalizedRange
().get(), selectionState.selectedRangeStart, selectionState.selectedRangeLength)
; | 199 Range* range = frame->selection()->toNormalizedRange().get(); |
| 200 if (range) |
| 201 range->getLocationAndLength(selectionState.selectedRangeStart, selection
State.selectedRangeLength); |
200 | 202 |
201 m_page->send(Messages::WebPageProxy::SelectionStateChanged(selectionState)); | 203 m_page->send(Messages::WebPageProxy::SelectionStateChanged(selectionState)); |
202 | 204 |
203 #if PLATFORM(WIN) | 205 #if PLATFORM(WIN) |
204 // FIXME: This should also go into the selection state. | 206 // FIXME: This should also go into the selection state. |
205 if (!frame->editor()->hasComposition() || frame->editor()->ignoreComposition
SelectionChange()) | 207 if (!frame->editor()->hasComposition() || frame->editor()->ignoreComposition
SelectionChange()) |
206 return; | 208 return; |
207 | 209 |
208 unsigned start; | 210 unsigned start; |
209 unsigned end; | 211 unsigned end; |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 { | 442 { |
441 notImplemented(); | 443 notImplemented(); |
442 } | 444 } |
443 | 445 |
444 void WebEditorClient::requestCheckingOfString(WebCore::SpellChecker*, int, const
WTF::String&) | 446 void WebEditorClient::requestCheckingOfString(WebCore::SpellChecker*, int, const
WTF::String&) |
445 { | 447 { |
446 notImplemented(); | 448 notImplemented(); |
447 } | 449 } |
448 | 450 |
449 } // namespace WebKit | 451 } // namespace WebKit |
OLD | NEW |