Changeset 118594 in webkit
- Timestamp:
- May 25, 2012 6:02:19 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r118593 r118594 1 2012-05-25 Lynn Neir <lynn.neir@skype.net> 2 3 Updated tests as a result of implementing TextInputController in DRT for windows, https://bugs.webkit.org/show_bug.cgi?id=32021 4 5 Reviewed by Eric Seidel. 6 7 * platform/win/Skipped: 8 * platform/win/editing/selection/5825350-1-expected.txt: Added. 9 * platform/win/editing/selection/5825350-2-expected.txt: Added. 10 * platform/win/editing/selection/mixed-editability-10-expected.txt: 11 * platform/win/editing/selection/move-left-right-expected.txt: Added. 12 * platform/win/fast/events/ime-composition-events-001-expected.txt: 13 * platform/win/fast/forms/input-maxlength-ime-completed-expected.txt: Removed. 14 * platform/win/fast/forms/input-maxlength-ime-preedit-expected.txt: Removed. 15 * platform/win/svg/text/caret-in-svg-text-expected.txt: Added. 16 1 17 2012-05-25 Jessie Berlin <jberlin@apple.com> 2 18 -
trunk/LayoutTests/platform/win/Skipped
r118593 r118594 1065 1065 # https://bugs.webkit.org/show_bug.cgi?id=62597 1066 1066 editing/pasteboard/copy-standalone-image-crash.html 1067 1068 # https://webkit.org/b/32021 - DRT's textInputController is unimplemented on Windows1069 editing/input/ime-composition-clearpreedit.html1070 editing/input/password-echo-passnode2.html1071 editing/input/password-echo-passnode3.html1072 editing/input/password-echo-passnode.html1073 editing/input/password-echo-textnode.html1074 editing/input/setting-input-value-cancel-ime-composition.html1075 editing/inserting/insert-composition-whitespace.html1076 editing/selection/5825350-1.html1077 editing/selection/5825350-2.html1078 fast/text/international/thai-cursor-position.html1079 fast/dom/tab-in-right-alignment.html1080 svg/text/caret-in-svg-text.xhtml1081 1067 1082 1068 # textInputController.hasGrammarMarkers() is not implemented. -
trunk/LayoutTests/platform/win/editing/selection/mixed-editability-10-expected.txt
r94615 r118594 16 16 17 17 Hello: 18 Anchor ([object HTMLDivElement], 0 caret[ 0,0] refpos=40) is incorrect.19 Anchor ([object HTMLDivElement], 3 caret[ 0,0] refpos=76) is incorrect.20 Anchor ([object HTMLDivElement], 1 caret[ 0,0] refpos=43) is incorrect.21 Anchor ([object HTMLDivElement], 0 caret[ 0,0] refpos=8) is incorrect.22 Anchor ([object HTMLDivElement], 0 caret[ 0,0] refpos=73) is incorrect.23 Anchor ([object HTMLDivElement], 3 caret[ 0,0] refpos=47) is incorrect.24 Anchor ([object HTMLDivElement], 0 caret[ 0,0] refpos=58) is incorrect.18 Anchor ([object HTMLDivElement], 0 caret[40,42] refpos=40) is correct. 19 Anchor ([object HTMLDivElement], 3 caret[75,42] refpos=76) is incorrect. 20 Anchor ([object HTMLDivElement], 1 caret[43,110] refpos=43) is correct. 21 Anchor ([object HTMLDivElement], 0 caret[8,110] refpos=8) is correct. 22 Anchor ([object HTMLDivElement], 0 caret[73,178] refpos=73) is correct. 23 Anchor ([object HTMLDivElement], 3 caret[47,246] refpos=47) is correct. 24 Anchor ([object HTMLDivElement], 0 caret[58,314] refpos=58) is correct. 25 25 Anchor ([object HTMLSpanElement], 0 caret[0,0] refpos=0) is correct. -
trunk/LayoutTests/platform/win/fast/events/ime-composition-events-001-expected.txt
r51543 r118594 1 CONSOLE MESSAGE: line 40: ReferenceError: Can't find variable: textInputController2 1 This tests that calling input-method functions sends Composition Events and Text Events introduced in DOM Level 3. 3 2 … … 5 4 6 5 7 6 SUCCESS: INPUT - compositionstart - "1" 7 SUCCESS: INPUT - compositionupdate - "1" 8 SUCCESS: INPUT - compositionupdate - "2" 9 SUCCESS: INPUT - compositionupdate - "3" 10 SUCCESS: INPUT - compositionend - "4" 11 SUCCESS: INPUT - textInput - "4" 12 SUCCESS: INPUT - compositionstart - "5" 13 SUCCESS: INPUT - compositionupdate - "5" 14 SUCCESS: INPUT - compositionupdate - "6" 15 SUCCESS: INPUT - compositionupdate - "7" 16 SUCCESS: INPUT - compositionend - "" 17 SUCCESS: INPUT - compositionend - "8" 18 SUCCESS: INPUT - textInput - "8" 19 SUCCESS: INPUT - compositionstart - "9" 20 SUCCESS: INPUT - compositionupdate - "9" 21 SUCCESS: INPUT - compositionend - "9" 22 SUCCESS: INPUT - textInput - "9" 23 SUCCESS: INPUT - compositionend - "" 24 SUCCESS: INPUT - textInput - "" -
trunk/Source/WebKit/win/ChangeLog
r117771 r118594 1 2012-05-25 Lynn Neir <lynn.neir@skype.net> 2 3 Added methods needed to implement backend for DRT's TextInputController on windows, https://bugs.webkit.org/show_bug.cgi?id=32021 4 5 Reviewed by Eric Seidel. 6 7 * Interfaces/IWebViewPrivate.idl: 8 * WebView.cpp: 9 (WebView::setCompositionForTesting): 10 (WebView::hasCompositionForTesting): 11 (WebView::confirmCompositionForTesting): 12 (WebView::compositionRangeForTesting): 13 (WebView::firstRectForCharacterRangeForTesting): 14 (WebView::selectedRangeForTesting): 15 * WebView.h: 16 (WebView): 17 1 18 2012-05-21 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 19 -
trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl
r117460 r118594 278 278 HRESULT registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing([in] BSTR scheme); 279 279 HRESULT registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing([in] BSTR scheme); 280 // Used by TextInputController in DumpRenderTree 281 282 HRESULT setCompositionForTesting([in] BSTR composition,[in] UINT from,[in] UINT length); 283 284 HRESULT hasCompositionForTesting([out, retval] BOOL* result); 285 286 HRESULT confirmCompositionForTesting([in] BSTR composition); 287 288 HRESULT compositionRangeForTesting([out] UINT* startPosition, [out] UINT* length); 289 290 HRESULT firstRectForCharacterRangeForTesting([in] UINT location, [in] UINT length, [out, retval] RECT* resultRect); 291 292 HRESULT selectedRangeForTesting([out] UINT* location, [out] UINT* length); 280 293 } -
trunk/Source/WebKit/win/WebView.cpp
r117771 r118594 34 34 #include "MarshallingHelpers.h" 35 35 #include "SoftLinking.h" 36 #include "TextIterator.h" 36 37 #include "WebBackForwardList.h" 37 38 #include "WebChromeClient.h" … … 6884 6885 6885 6886 #endif 6887 // Used by TextInputController in DumpRenderTree 6888 6889 HRESULT STDMETHODCALLTYPE WebView::setCompositionForTesting( 6890 /* [in] */ BSTR composition, 6891 /* [in] */ UINT from, 6892 /* [in] */ UINT length) 6893 { 6894 if (!m_page) 6895 return E_FAIL; 6896 6897 Frame* frame = m_page->focusController()->focusedOrMainFrame(); 6898 if (!frame || !frame->editor()->canEdit()) 6899 return E_FAIL; 6900 6901 String compositionStr(composition, SysStringLen(composition)); 6902 6903 Vector<CompositionUnderline> underlines; 6904 underlines.append(CompositionUnderline(0, compositionStr.length(), Color(Color::black), false)); 6905 frame->editor()->setComposition(compositionStr, underlines, from, from + length); 6906 6907 return S_OK; 6908 } 6909 6910 HRESULT STDMETHODCALLTYPE WebView::hasCompositionForTesting(/* [out, retval] */ BOOL* result) 6911 { 6912 if (!m_page) 6913 return E_FAIL; 6914 6915 Frame* frame = m_page->focusController()->focusedOrMainFrame(); 6916 if (!frame) 6917 return E_FAIL; 6918 6919 *result = frame && frame->editor()->hasComposition(); 6920 6921 return S_OK; 6922 } 6923 6924 HRESULT STDMETHODCALLTYPE WebView::confirmCompositionForTesting(/* [in] */ BSTR composition) 6925 { 6926 if (!m_page) 6927 return E_FAIL; 6928 6929 Frame* frame = m_page->focusController()->focusedOrMainFrame(); 6930 if (!frame || !frame->editor()->canEdit()) 6931 return E_FAIL; 6932 6933 String compositionStr(composition, SysStringLen(composition)); 6934 6935 if (compositionStr.isNull()) 6936 frame->editor()->confirmComposition(); 6937 6938 frame->editor()->confirmComposition(compositionStr); 6939 6940 return S_OK; 6941 } 6942 6943 HRESULT STDMETHODCALLTYPE WebView::compositionRangeForTesting(/* [out] */ UINT* startPosition, /* [out] */ UINT* length) 6944 { 6945 if (!m_page) 6946 return E_FAIL; 6947 6948 Frame* frame = m_page->focusController()->focusedOrMainFrame(); 6949 if (!frame || !frame->editor()->canEdit()) 6950 return E_FAIL; 6951 6952 RefPtr<Range> range = frame->editor()->compositionRange(); 6953 6954 if (!range) 6955 return E_FAIL; 6956 6957 *startPosition = range->startOffset(); 6958 *length = range->startOffset() + range->endOffset(); 6959 6960 return S_OK; 6961 } 6962 6963 6964 HRESULT STDMETHODCALLTYPE WebView::firstRectForCharacterRangeForTesting( 6965 /* [in] */ UINT location, 6966 /* [in] */ UINT length, 6967 /* [out, retval] */ RECT* resultRect) 6968 { 6969 if (!m_page) 6970 return E_FAIL; 6971 6972 Frame* frame = m_page->focusController()->focusedOrMainFrame(); 6973 if (!frame) 6974 return E_FAIL; 6975 6976 IntRect resultIntRect; 6977 resultIntRect.setLocation(IntPoint(0, 0)); 6978 resultIntRect.setSize(IntSize(0, 0)); 6979 6980 if (location > INT_MAX) 6981 return E_FAIL; 6982 if (length > INT_MAX || location + length > INT_MAX) 6983 length = INT_MAX - location; 6984 6985 RefPtr<Range> range = TextIterator::rangeFromLocationAndLength(frame->selection()->rootEditableElementOrDocumentElement(), location, length); 6986 6987 if (!range) 6988 return E_FAIL; 6989 6990 ASSERT(range->startContainer()); 6991 ASSERT(range->endContainer()); 6992 6993 IntRect rect = frame->editor()->firstRectForRange(range.get()); 6994 resultIntRect = frame->view()->contentsToWindow(rect); 6995 6996 resultRect->left = resultIntRect.x(); 6997 resultRect->top = resultIntRect.y(); 6998 resultRect->right = resultIntRect.x() + resultIntRect.width(); 6999 resultRect->bottom = resultIntRect.y() + resultIntRect.height(); 7000 7001 return S_OK; 7002 } 7003 7004 HRESULT STDMETHODCALLTYPE WebView::selectedRangeForTesting(/* [out] */ UINT* location, /* [out] */ UINT* length) 7005 { 7006 if (!m_page) 7007 return E_FAIL; 7008 7009 Frame* frame = m_page->focusController()->focusedOrMainFrame(); 7010 if (!frame) 7011 return E_FAIL; 7012 7013 RefPtr<Range> range = frame->editor()->selectedRange(); 7014 7015 size_t locationSize; 7016 size_t lengthSize; 7017 if (range && TextIterator::getLocationAndLengthFromRange(frame->selection()->rootEditableElementOrDocumentElement(), range.get(), locationSize, lengthSize)) { 7018 *location = static_cast<UINT>(locationSize); 7019 *length = static_cast<UINT>(lengthSize); 7020 } 7021 7022 return S_OK; 7023 } -
trunk/Source/WebKit/win/WebView.h
r117460 r118594 963 963 #endif 964 964 965 // Used by TextInputController in DumpRenderTree 966 967 HRESULT STDMETHODCALLTYPE setCompositionForTesting( 968 /* [in] */ BSTR composition, 969 /* [in] */ UINT from, 970 /* [in] */ UINT length); 971 972 HRESULT STDMETHODCALLTYPE hasCompositionForTesting(/* [out, retval] */ BOOL* result); 973 974 HRESULT STDMETHODCALLTYPE confirmCompositionForTesting(/* [in] */ BSTR composition); 975 976 HRESULT STDMETHODCALLTYPE compositionRangeForTesting(/* [out] */ UINT* startPosition, /* [out] */ UINT* length); 977 978 HRESULT STDMETHODCALLTYPE firstRectForCharacterRangeForTesting( 979 /* [in] */ UINT location, 980 /* [in] */ UINT length, 981 /* [out, retval] */ RECT* resultRect); 982 983 HRESULT STDMETHODCALLTYPE selectedRangeForTesting(/* [out] */ UINT* location, /* [out] */ UINT* length); 965 984 private: 966 985 void setZoomMultiplier(float multiplier, bool isTextOnly); -
trunk/Tools/ChangeLog
r118557 r118594 1 2012-05-25 Lynn Neir <lynn.neir@skype.net> 2 3 Added windows implementation in DRT for TextInputController, https://bugs.webkit.org/show_bug.cgi?id=32021 4 5 Reviewed by Eric Seidel. 6 7 * DumpRenderTree/win/DumpRenderTree.vcproj: 8 * DumpRenderTree/win/FrameLoadDelegate.cpp: 9 (FrameLoadDelegate::FrameLoadDelegate): 10 (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): 11 * DumpRenderTree/win/FrameLoadDelegate.h: 12 (FrameLoadDelegate): 13 * DumpRenderTree/win/TextInputController.cpp: Added. 14 (setMarkedTextCallback): 15 (hasMarkedTextCallback): 16 (unmarkTextCallback): 17 (markedRangeCallback): 18 (insertTextCallback): 19 (firstRectForCharacterRangeCallback): 20 (selectedRangeCallback): 21 (TextInputController::makeWindowObject): 22 (TextInputController::getJSClass): 23 (TextInputController::staticValues): 24 (TextInputController::staticFunctions): 25 * DumpRenderTree/win/TextInputController.h: Added. 26 (TextInputController): 27 * DumpRenderTree/win/TextInputControllerWin.cpp: Added. 28 (TextInputController::setMarkedText): 29 (TextInputController::hasMarkedText): 30 (TextInputController::unmarkText): 31 (TextInputController::markedRange): 32 (TextInputController::insertText): 33 (TextInputController::firstRectForCharacterRange): 34 (TextInputController::selectedRange): 35 1 36 2012-05-25 Dirk Pranke <dpranke@chromium.org> 2 37 -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.vcproj
r104187 r118594 434 434 > 435 435 </File> 436 <File 437 RelativePath=".\TextInputController.cpp" 438 > 439 </File> 440 <File 441 RelativePath=".\TextInputController.h" 442 > 443 </File> 444 <File 445 RelativePath=".\TextInputControllerWin.cpp" 446 > 447 </File> 436 448 </Filter> 437 449 <Filter -
trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp
r110523 r118594 36 36 #include "GCController.h" 37 37 #include "LayoutTestController.h" 38 #include "TextInputController.h" 38 39 #include "WebCoreTestSupport.h" 39 40 #include "WorkQueueItem.h" … … 77 78 , m_gcController(adoptPtr(new GCController)) 78 79 , m_accessibilityController(adoptPtr(new AccessibilityController)) 80 , m_textInputController(adoptPtr(new TextInputController)) 79 81 { 80 82 } … … 366 368 367 369 m_accessibilityController->makeWindowObject(context, windowObject, &exception); 370 ASSERT(!exception); 371 372 m_textInputController->makeWindowObject(context, windowObject, &exception); 368 373 ASSERT(!exception); 369 374 -
trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h
r58111 r118594 34 34 35 35 class AccessibilityController; 36 class TextInputController; 36 37 class GCController; 37 38 … … 171 172 OwnPtr<GCController> m_gcController; 172 173 OwnPtr<AccessibilityController> m_accessibilityController; 174 OwnPtr<TextInputController> m_textInputController; 173 175 }; 174 176
Note: See TracChangeset
for help on using the changeset viewer.