Changeset 74582 in webkit
- Timestamp:
- Dec 23, 2010 2:34:52 PM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 1 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r74580 r74582 86 86 (WebKit::WebFrame::createSubframe): 87 87 Send parent frameID in addition to our own in the message to UIProcess. 88 89 2010-12-23 Anders Carlsson <andersca@apple.com> 90 91 Reviewed by Darin Adler. 92 93 Clean up the selection handling code 94 https://bugs.webkit.org/show_bug.cgi?id=51550 95 96 * Shared/SelectionState.h: Added. 97 Add SelectionState class which hold information about the current selection. 98 99 * UIProcess/API/mac/PageClientImpl.h: 100 * UIProcess/API/mac/PageClientImpl.mm: 101 Remove selectionChanged function. 102 103 * UIProcess/API/mac/WKView.mm: 104 (-[WKView initWithFrame:contextRef:pageGroupRef:]): 105 Remove all the selection related state; it lives in the WebPageProxy object now. 106 107 (-[WKView insertText:]): 108 (-[WKView selectedRange]): 109 (-[WKView hasMarkedText]): 110 Get the selection information from the WebPageProxy. 111 112 * UIProcess/API/mac/WKViewInternal.h: 113 Remove _selectionChanged declaration. 114 115 * UIProcess/PageClient.h: 116 Remove selectionChanged functions. 117 118 * UIProcess/WebPageProxy.cpp: 119 (WebKit::WebPageProxy::selectionStateChanged): 120 Update the selection state. 121 122 * UIProcess/WebPageProxy.h: 123 (WebKit::WebPageProxy::selectionState): 124 Return the selection state. 125 126 * UIProcess/WebPageProxy.messages.in: 127 Add SelectionStateChanged message. 128 129 * UIProcess/win/WebView.cpp: 130 (WebKit::WebView::WebView): 131 Remove all the selection related state; it lives in the WebPageProxy object now. 132 133 (WebKit::WebView::compositionSelectionChanged): 134 (WebKit::WebView::onIMEComposition): 135 (WebKit::WebView::onIMEEndComposition): 136 (WebKit::WebView::onIMERequestCharPosition): 137 (WebKit::WebView::onIMERequest): 138 Get the selection information from the WebPageProxy. 139 140 * WebKit2.xcodeproj/project.pbxproj: 141 Add SelectionState.h 142 143 * WebProcess/WebCoreSupport/WebEditorClient.cpp: 144 (WebKit::WebEditorClient::respondToChangedSelection): 145 Send a SelectionStateChanged message with the updated state. 146 147 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: 148 Remove mac specific code. 149 150 * WebProcess/WebPage/WebPage.cpp: 151 (WebKit::WebPage::getLocationAndLengthFromRange): 152 Rename this function from convertRangeToPlatformRange and move it out of WebPageMac.mm 153 154 * WebProcess/WebPage/mac/WebPageMac.mm: 155 (WebKit::WebPage::getMarkedRange): 156 (WebKit::WebPage::characterIndexForPoint): 157 Call getLocationAndLengthFromRange. 158 159 * win/WebKit2.vcproj: 160 Add SelectionState.h 88 161 89 162 2010-12-23 Anders Carlsson <andersca@apple.com> -
trunk/WebKit2/UIProcess/API/mac/PageClientImpl.h
r74285 r74582 65 65 66 66 virtual void didNotHandleKeyEvent(const NativeWebKeyboardEvent&); 67 virtual void selectionChanged(bool, bool, bool, bool, uint64_t, uint64_t);68 67 69 68 virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*); -
trunk/WebKit2/UIProcess/API/mac/PageClientImpl.mm
r74285 r74582 146 146 { 147 147 148 }149 150 void PageClientImpl::selectionChanged(bool isNone, bool isContentEditable, bool isPasswordField, bool hasComposition, uint64_t location, uint64_t length)151 {152 [m_wkView _selectionChanged:isNone isEditable:isContentEditable isPassword:isPasswordField hasMarkedText:hasComposition range:NSMakeRange(location, length)];153 148 } 154 149 -
trunk/WebKit2/UIProcess/API/mac/WKView.mm
r74580 r74582 110 110 uint64_t _pluginComplexTextInputIdentifier; 111 111 112 BOOL _isSelectionNone;113 BOOL _isSelectionEditable;114 BOOL _isSelectionInPasswordField;115 BOOL _hasMarkedText;116 112 Vector<CompositionUnderline> _underlines; 117 113 unsigned _selectionStart; 118 114 unsigned _selectionEnd; 119 NSRange _selectedRange;120 115 } 121 116 @end … … 165 160 _data->_page->initializeWebPage(IntSize(frame.size)); 166 161 _data->_page->setIsInWindow([self window]); 167 168 _data->_isSelectionNone = YES;169 _data->_isSelectionEditable = NO;170 _data->_isSelectionInPasswordField = NO;171 _data->_hasMarkedText = NO;172 _data->_selectedRange = NSMakeRange(NSNotFound, 0);173 162 174 163 WebContext::statistics().wkViewCount++; … … 473 462 LOG(TextInput, "insertText:\"%@\"", isAttributedString ? [string string] : string); 474 463 NSString *text; 475 bool isFromInputMethod = _data->_ hasMarkedText;464 bool isFromInputMethod = _data->_page->selectionState().hasComposition; 476 465 477 466 if (isAttributedString) { … … 550 539 } 551 540 552 - (void)_selectionChanged:(BOOL)isNone isEditable:(BOOL)isContentEditable isPassword:(BOOL)isPasswordField hasMarkedText:(BOOL)hasComposition range:(NSRange)newrange553 {554 _data->_isSelectionNone = isNone;555 _data->_isSelectionEditable = isContentEditable;556 _data->_isSelectionInPasswordField = isPasswordField;557 _data->_hasMarkedText = hasComposition;558 _data->_selectedRange = newrange;559 }560 561 541 - (Vector<KeypressCommand>&)_interceptKeyEvent:(NSEvent *)theEvent 562 542 { … … 617 597 - (NSRange)selectedRange 618 598 { 619 if (_data->_ isSelectionNone || !_data->_isSelectionEditable)599 if (_data->_page->selectionState().isNone || !_data->_page->selectionState().isContentEditable) 620 600 return NSMakeRange(NSNotFound, 0); 621 601 622 LOG(TextInput, "selectedRange -> (%u, %u)", _data->_ selectedRange.location, _data->_selectedRange.length);623 return _data->_selectedRange;602 LOG(TextInput, "selectedRange -> (%u, %u)", _data->_page->selectionState().selectedRangeStart, _data->_page->selectionState().selectedRangeLength); 603 return NSMakeRange(_data->_page->selectionState().selectedRangeStart, _data->_page->selectionState().selectedRangeLength); 624 604 } 625 605 626 606 - (BOOL)hasMarkedText 627 607 { 628 LOG(TextInput, "hasMarkedText -> %u", _data-> _hasMarkedText);629 return _data->_ hasMarkedText;608 LOG(TextInput, "hasMarkedText -> %u", _data->_page->selectionState().hasComposition); 609 return _data->_page->selectionState().hasComposition; 630 610 } 631 611 -
trunk/WebKit2/UIProcess/API/mac/WKViewInternal.h
r74037 r74582 44 44 - (NSRect)_convertToDeviceSpace:(NSRect)rect; 45 45 - (NSRect)_convertToUserSpace:(NSRect)rect; 46 - (void)_selectionChanged:(BOOL)isNone isEditable:(BOOL)isContentEditable isPassword:(BOOL)isPasswordField hasMarkedText:(BOOL)hasComposition range:(NSRange)newrange;47 48 46 - (void)_setFindIndicator:(PassRefPtr<WebKit::FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut; 49 47 -
trunk/WebKit2/UIProcess/PageClient.h
r74285 r74582 71 71 #if PLATFORM(MAC) 72 72 virtual void interceptKeyEvent(const NativeWebKeyboardEvent&, Vector<WebCore::KeypressCommand>&, uint32_t, uint32_t, Vector<WebCore::CompositionUnderline>&) = 0; 73 virtual void selectionChanged(bool, bool, bool, bool, uint64_t, uint64_t) = 0;74 #else75 virtual void selectionChanged(bool, bool, bool, bool) = 0;76 73 #endif 77 74 #if PLATFORM(WIN) -
trunk/WebKit2/UIProcess/WebPageProxy.cpp
r74571 r74582 1553 1553 } 1554 1554 1555 void WebPageProxy::selectionStateChanged(const SelectionState& selectionState) 1556 { 1557 m_selectionState = selectionState; 1558 } 1559 1555 1560 #if PLATFORM(MAC) 1556 // Selection change support1557 void WebPageProxy::didSelectionChange(bool isNone, bool isContentEditable, bool isPasswordField, bool hasComposition, uint64_t location, uint64_t length)1558 {1559 m_pageClient->selectionChanged(isNone, isContentEditable, isPasswordField, hasComposition, location, length);1560 }1561 1562 1561 // Complex text input support for plug-ins. 1563 1562 void WebPageProxy::sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput) … … 1567 1566 1568 1567 process()->send(Messages::WebPage::SendComplexTextInputToPlugin(pluginComplexTextInputIdentifier, textInput), m_pageID); 1569 }1570 1571 #else1572 void WebPageProxy::didChangeSelection(bool isNone, bool isContentEditable, bool isPasswordField, bool hasComposition)1573 {1574 m_pageClient->selectionChanged(isNone, isContentEditable, isPasswordField, hasComposition);1575 1568 } 1576 1569 #endif -
trunk/WebKit2/UIProcess/WebPageProxy.h
r74571 r74582 29 29 #include "APIObject.h" 30 30 #include "DrawingAreaProxy.h" 31 #include "SelectionState.h" 31 32 #include "SharedMemory.h" 32 33 #include "WKBase.h" … … 172 173 void validateMenuItem(const String& commandName); 173 174 174 // These are only used on Mac currently. 175 const SelectionState& selectionState() const { return m_selectionState; } 176 175 177 #if PLATFORM(MAC) 176 178 void updateWindowIsVisible(bool windowIsVisible); … … 179 181 uint64_t characterIndexForPoint(const WebCore::IntPoint); 180 182 WebCore::IntRect firstRectForCharacterRange(uint64_t, uint64_t); 181 void didSelectionChange(bool, bool, bool, bool, uint64_t, uint64_t);182 183 void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput); 183 #else184 void didChangeSelection(bool, bool, bool, bool);185 184 #endif 186 185 #if PLATFORM(WIN) … … 385 384 #endif 386 385 386 // Selection 387 void selectionStateChanged(const SelectionState&); 388 387 389 // Back/Forward list management 388 390 void backForwardAddItem(uint64_t itemID); … … 493 495 String m_toolTip; 494 496 497 SelectionState m_selectionState; 498 495 499 // REMOVE: For demo purposes only. 496 500 String m_urlAtProcessExit; -
trunk/WebKit2/UIProcess/WebPageProxy.messages.in
r74571 r74582 132 132 133 133 # Selection messages. 134 #if PLATFORM(MAC) 135 DidSelectionChange(bool isNone, bool isContentEditable, bool isPasswordField, bool hasComposition, uint64_t location, uint64_t length) 136 #endif 137 #if !PLATFORM(MAC) 138 DidChangeSelection(bool isNone, bool isContentEditable, bool isPasswordField, bool hasComposition) 139 #endif 134 SelectionStateChanged(WebKit::SelectionState selectionState) 135 140 136 #if PLATFORM(WIN) 141 137 DidChangeCompositionSelection(bool hasChanged) -
trunk/WebKit2/UIProcess/win/WebView.cpp
r74296 r74582 226 226 , m_trackingMouseLeave(false) 227 227 , m_isBeingDestroyed(false) 228 , m_selectionIsNone(true)229 , m_selectionIsEditable(false)230 , m_selectionInPasswordField(false)231 , m_hasMarkedText(false)232 228 , m_inIMEComposition(0) 233 229 { … … 694 690 } 695 691 696 void WebView::selectionChanged(bool isNone, bool isEditable, bool isPasswordField, bool hasComposition)697 {698 m_selectionIsNone = isNone;699 m_selectionIsEditable = isEditable;700 m_selectionInPasswordField = isPasswordField;701 m_hasMarkedText = hasComposition;702 }703 704 692 void WebView::compositionSelectionChanged(bool hasChanged) 705 693 { 706 if (m_ hasMarkedText&& !hasChanged)694 if (m_page->selectionState().hasComposition && !hasChanged) 707 695 resetIME(); 708 696 } … … 812 800 return true; 813 801 814 if (!m_ selectionIsEditable)802 if (!m_page->selectionState().isContentEditable) 815 803 return true; 816 804 … … 855 843 // If the composition hasn't been confirmed yet, it needs to be cancelled. 856 844 // This happens after deleting the last character from inline input hole. 857 if (m_ hasMarkedText)845 if (m_page->selectionState().hasComposition) 858 846 m_page->confirmComposition(String()); 859 847 … … 866 854 LRESULT WebView::onIMERequestCharPosition(IMECHARPOSITION* charPos) 867 855 { 868 if (charPos->dwCharPos && !m_ hasMarkedText)856 if (charPos->dwCharPos && !m_page->selectionState().hasComposition) 869 857 return 0; 870 858 IntRect caret = m_page->firstRectForCharacterInSelectedRange(charPos->dwCharPos); … … 898 886 { 899 887 LOG(TextInput, "onIMERequest %s", imeRequestName(request).latin1().data()); 900 if (!m_ selectionIsEditable)888 if (!m_page->selectionState().isContentEditable) 901 889 return 0; 902 890 -
trunk/WebKit2/UIProcess/win/WebView.h
r74296 r74582 118 118 virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&); 119 119 virtual void didNotHandleKeyEvent(const NativeWebKeyboardEvent&); 120 virtual void selectionChanged(bool, bool, bool, bool);121 120 virtual void compositionSelectionChanged(bool); 122 121 virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*); … … 152 151 RefPtr<WebPageProxy> m_page; 153 152 154 // Text input state values155 bool m_selectionIsNone;156 bool m_selectionIsEditable;157 bool m_selectionInPasswordField;158 bool m_hasMarkedText;159 153 unsigned m_inIMEComposition; 160 154 }; -
trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj
r74384 r74582 158 158 1AA417CB12C00CCA002BE67B /* TextChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA417C912C00CCA002BE67B /* TextChecker.h */; }; 159 159 1AA417EF12C00D87002BE67B /* TextCheckerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA417ED12C00D87002BE67B /* TextCheckerMac.mm */; }; 160 1AA41AB512C02EC4002BE67B /* SelectionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA41AB412C02EC4002BE67B /* SelectionState.h */; }; 160 161 1AA4792312A59FD9008236C3 /* PluginProcessMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA4792212A59FD9008236C3 /* PluginProcessMac.mm */; }; 161 162 1AA479B012A5A436008236C3 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; }; … … 814 815 1AA417C912C00CCA002BE67B /* TextChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextChecker.h; sourceTree = "<group>"; }; 815 816 1AA417ED12C00D87002BE67B /* TextCheckerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextCheckerMac.mm; sourceTree = "<group>"; }; 817 1AA41AB412C02EC4002BE67B /* SelectionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectionState.h; sourceTree = "<group>"; }; 816 818 1AA4792212A59FD9008236C3 /* PluginProcessMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProcessMac.mm; sourceTree = "<group>"; }; 817 819 1AA56F2811E92BC80061B882 /* PluginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginController.h; sourceTree = "<group>"; }; … … 1604 1606 BC2D021612AC41CB00E732A3 /* SameDocumentNavigationType.h */, 1605 1607 1AAB4A8C1296F0A20023952F /* SandboxExtension.h */, 1608 1AA41AB412C02EC4002BE67B /* SelectionState.h */, 1606 1609 BCBD3C3A125BFA7A00D2C29F /* StringPairVector.h */, 1607 1610 BCB0B0DF12305AB100B1341E /* UserMessageCoders.h */, … … 2771 2774 BC858A2012C0357B00EDEB2E /* WebResourceLoadClient.h in Headers */, 2772 2775 1AA417CB12C00CCA002BE67B /* TextChecker.h in Headers */, 2776 1AA41AB512C02EC4002BE67B /* SelectionState.h in Headers */, 2773 2777 ); 2774 2778 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
r74164 r74582 29 29 #include "NotImplemented.h" 30 30 31 #include "SelectionState.h" 31 32 #include "WebFrameLoaderClient.h" 32 33 #include "WebPage.h" … … 179 180 } 180 181 181 #if !PLATFORM(MAC)182 182 void WebEditorClient::respondToChangedSelection() 183 183 { … … 188 188 return; 189 189 190 m_page->send(Messages::WebPageProxy::DidChangeSelection(frame->selection()->isNone(), frame->selection()->isContentEditable(), frame->selection()->isInPasswordField(), frame->editor()->hasComposition())); 190 SelectionState selectionState; 191 selectionState.isNone = frame->selection()->isNone(); 192 selectionState.isContentEditable = frame->selection()->isContentEditable(); 193 selectionState.isInPasswordField = frame->selection()->isInPasswordField(); 194 selectionState.hasComposition = frame->editor()->hasComposition(); 195 196 WebPage::getLocationAndLengthFromRange(frame->selection()->toNormalizedRange().get(), selectionState.selectedRangeStart, selectionState.selectedRangeLength); 197 198 m_page->send(Messages::WebPageProxy::SelectionStateChanged(selectionState)); 199 191 200 #if PLATFORM(WIN) 201 // FIXME: This should also go into the selection state. 192 202 if (!frame->editor()->hasComposition() || frame->editor()->ignoreCompositionSelectionChange()) 193 203 return; … … 198 208 #endif 199 209 } 200 #endif201 210 202 211 void WebEditorClient::didEndEditing() -
trunk/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm
r73796 r74582 52 52 53 53 using namespace WebCore; 54 using namespace WTF;55 54 56 55 @interface NSAttributedString (WebNSAttributedStringDetails) … … 63 62 64 63 namespace WebKit { 65 66 void WebEditorClient::respondToChangedSelection()67 {68 static const String WebViewDidChangeSelectionNotification = "WebViewDidChangeSelectionNotification";69 m_page->injectedBundleEditorClient().didChangeSelection(m_page, WebViewDidChangeSelectionNotification.impl());70 WebCore::Frame* frame = m_page->corePage()->focusController()->focusedFrame();71 if (!frame)72 return;73 uint64_t location;74 uint64_t length;75 WebPage::convertRangeToPlatformRange(frame, frame->selection()->toNormalizedRange().get(), location, length);76 m_page->send(Messages::WebPageProxy::DidSelectionChange(frame->selection()->isNone(), frame->selection()->isContentEditable(), frame->selection()->isInPasswordField(), frame->editor()->hasComposition(), location, length));77 }78 64 79 65 void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event) -
trunk/WebKit2/WebProcess/WebPage/WebPage.cpp
r74527 r74582 77 77 #include <WebCore/SharedBuffer.h> 78 78 #include <WebCore/SubstituteData.h> 79 #include <WebCore/TextIterator.h> 79 80 #include <runtime/JSLock.h> 80 81 #include <runtime/JSValue.h> … … 609 610 m_contextMenu = WebContextMenu::create(this); 610 611 return m_contextMenu.get(); 612 } 613 614 void WebPage::getLocationAndLengthFromRange(Range* range, uint64_t& location, uint64_t& length) 615 { 616 location = notFound; 617 length = 0; 618 619 if (!range || !range->startContainer()) 620 return; 621 622 Element* selectionRoot = range->ownerDocument()->frame()->selection()->rootEditableElement(); 623 Element* scope = selectionRoot ? selectionRoot : range->ownerDocument()->documentElement(); 624 625 // Mouse events may cause TSM to attempt to create an NSRange for a portion of the view 626 // that is not inside the current editable region. These checks ensure we don't produce 627 // potentially invalid data when responding to such requests. 628 if (range->startContainer() != scope && !range->startContainer()->isDescendantOf(scope)) 629 return; 630 if (range->endContainer() != scope && !range->endContainer()->isDescendantOf(scope)) 631 return; 632 633 RefPtr<Range> testRange = Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset()); 634 ASSERT(testRange->startContainer() == scope); 635 location = TextIterator::rangeLength(testRange.get()); 636 637 ExceptionCode ec; 638 testRange->setEnd(range->endContainer(), range->endOffset(), ec); 639 ASSERT(testRange->startContainer() == scope); 640 length = TextIterator::rangeLength(testRange.get()) - location; 611 641 } 612 642 -
trunk/WebKit2/WebProcess/WebPage/WebPage.h
r74527 r74582 245 245 246 246 SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; } 247 247 248 static void getLocationAndLengthFromRange(WebCore::Range*, uint64_t& location, uint64_t& length); 249 248 250 #if PLATFORM(MAC) 249 251 void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput); … … 252 254 void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result); 253 255 void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect); 254 static void convertRangeToPlatformRange(WebCore::Frame* frame, WebCore::Range *range, uint64_t& location, uint64_t& length);255 256 #elif PLATFORM(WIN) 256 257 void confirmComposition(const String& compositionString); -
trunk/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r74131 r74582 124 124 } 125 125 126 void WebPage::convertRangeToPlatformRange(WebCore::Frame* frame, WebCore::Range *range, uint64_t& location, uint64_t& length)127 {128 location = NSNotFound;129 length = 0;130 if (!range || !range->startContainer())131 return;132 133 Element* selectionRoot = frame->selection()->rootEditableElement();134 Element* scope = selectionRoot ? selectionRoot : frame->document()->documentElement();135 136 // Mouse events may cause TSM to attempt to create an NSRange for a portion of the view137 // that is not inside the current editable region. These checks ensure we don't produce138 // potentially invalid data when responding to such requests.139 if (range->startContainer() != scope && !range->startContainer()->isDescendantOf(scope))140 return;141 if (range->endContainer() != scope && !range->endContainer()->isDescendantOf(scope))142 return;143 144 RefPtr<Range> testRange = Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset());145 ASSERT(testRange->startContainer() == scope);146 location = TextIterator::rangeLength(testRange.get());147 148 ExceptionCode ec;149 testRange->setEnd(range->endContainer(), range->endOffset(), ec);150 ASSERT(testRange->startContainer() == scope);151 length = TextIterator::rangeLength(testRange.get()) - location;152 }153 154 126 void WebPage::sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput) 155 127 { … … 168 140 return; 169 141 170 convertRangeToPlatformRange(frame,frame->editor()->compositionRange().get(), location, length);142 getLocationAndLengthFromRange(frame->editor()->compositionRange().get(), location, length); 171 143 } 172 144 … … 207 179 208 180 Range *range = characterRangeAtPoint(frame, result.point()); 181 if (!range) 182 return; 183 209 184 uint64_t length; 210 if (range) 211 convertRangeToPlatformRange(frame, range, index, length); 185 getLocationAndLengthFromRange(range, index, length); 212 186 } 213 187 -
trunk/WebKit2/win/WebKit2.vcproj
r74436 r74582 484 484 </File> 485 485 <File 486 RelativePath="..\Shared\SelectionState.h" 487 > 488 </File> 489 <File 486 490 RelativePath="..\Shared\StringPairVector.h" 487 491 >
Note: See TracChangeset
for help on using the changeset viewer.