Changeset 179792 in webkit
- Timestamp:
- Feb 7, 2015, 6:43:40 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac/editing/dictionary-lookup (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-expected.txt (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-input-expected.txt (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-input.html (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-inside-selection-expected.txt (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-inside-selection.html (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-outside-selection-expected.txt (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-outside-selection.html (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-rtl-expected.txt (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup-rtl.html (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/dictionary-lookup.html (added)
-
LayoutTests/platform/mac/editing/dictionary-lookup/lookup-test.js (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/WebCore.exp.in (modified) (1 diff)
-
Source/WebCore/editing/mac/DictionaryLookup.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.cpp (modified) (2 diffs)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r179790 r179792 1 2015-02-07 Tim Horton <timothy_horton@apple.com> 2 3 Add some dictionary lookup tests 4 https://bugs.webkit.org/show_bug.cgi?id=141355 5 6 Reviewed by Darin Adler. 7 8 * platform/mac/editing/dictionary-lookup/dictionary-lookup-expected.txt: Added. 9 * platform/mac/editing/dictionary-lookup/dictionary-lookup-input-expected.txt: Added. 10 * platform/mac/editing/dictionary-lookup/dictionary-lookup-input.html: Added. 11 * platform/mac/editing/dictionary-lookup/dictionary-lookup-inside-selection-expected.txt: Added. 12 * platform/mac/editing/dictionary-lookup/dictionary-lookup-inside-selection.html: Added. 13 * platform/mac/editing/dictionary-lookup/dictionary-lookup-outside-selection-expected.txt: Added. 14 * platform/mac/editing/dictionary-lookup/dictionary-lookup-outside-selection.html: Added. 15 * platform/mac/editing/dictionary-lookup/dictionary-lookup-rtl-expected.txt: Added. 16 * platform/mac/editing/dictionary-lookup/dictionary-lookup-rtl.html: Added. 17 * platform/mac/editing/dictionary-lookup/dictionary-lookup.html: Added. 18 * platform/mac/editing/dictionary-lookup/lookup-test.js: Added. 19 (runTest): 20 Add tests for various cases that we've had trouble with in the past. 21 1 22 2015-02-07 Zalan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/ChangeLog
r179791 r179792 1 2015-02-07 Tim Horton <timothy_horton@apple.com> 2 3 Add some dictionary lookup tests 4 https://bugs.webkit.org/show_bug.cgi?id=141355 5 6 Reviewed by Darin Adler. 7 8 Tests: platform/mac/editing/dictionary-lookup/dictionary-lookup-input.html 9 platform/mac/editing/dictionary-lookup/dictionary-lookup-inside-selection.html 10 platform/mac/editing/dictionary-lookup/dictionary-lookup-outside-selection.html 11 platform/mac/editing/dictionary-lookup/dictionary-lookup-rtl.html 12 platform/mac/editing/dictionary-lookup/dictionary-lookup.html 13 14 * WebCore.exp.in: 15 Remove an unneeded export. 16 17 * editing/mac/DictionaryLookup.h: 18 Use OBJC_CLASS instead of @class so that this can be included in pure-C++ files. 19 20 * testing/Internals.cpp: 21 (WebCore::Internals::rangeForDictionaryLookupAtLocation): 22 * testing/Internals.h: 23 * testing/Internals.idl: 24 Expose rangeForDictionaryLookupAtHitTestResult fairly directly to JavaScript. 25 1 26 2015-02-07 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/Source/WebCore/WebCore.exp.in
r179702 r179792 2455 2455 __ZN7WebCore37contextMenuItemTagTransformationsMenuEv 2456 2456 __ZN7WebCore38contextMenuItemTagWritingDirectionMenuEv 2457 __ZN7WebCore39rangeExpandedAroundPositionByCharactersERKNS_15VisiblePositionEi2458 2457 __ZN7WebCore39rangeForDictionaryLookupAtHitTestResultERKNS_13HitTestResultEPP12NSDictionary 2459 2458 __ZN7WebCore42contextMenuItemTagCheckGrammarWithSpellingEv -
trunk/Source/WebCore/editing/mac/DictionaryLookup.h
r177739 r179792 31 31 #include <wtf/PassRefPtr.h> 32 32 33 @classNSDictionary;33 OBJC_CLASS NSDictionary; 34 34 35 35 namespace WebCore { -
trunk/Source/WebCore/testing/Internals.cpp
r179702 r179792 167 167 #endif 168 168 169 #if PLATFORM(MAC) 170 #include "DictionaryLookup.h" 171 #endif 172 169 173 using JSC::CodeBlock; 170 174 using JSC::FunctionExecutable; … … 1085 1089 1086 1090 return TextIterator::subrange(range, rangeLocation, rangeLength); 1091 } 1092 1093 RefPtr<Range> Internals::rangeForDictionaryLookupAtLocation(int x, int y, ExceptionCode& ec) 1094 { 1095 #if PLATFORM(MAC) 1096 Document* document = contextDocument(); 1097 if (!document || !document->frame()) { 1098 ec = INVALID_ACCESS_ERR; 1099 return nullptr; 1100 } 1101 1102 document->updateLayoutIgnorePendingStylesheets(); 1103 1104 HitTestResult result = document->frame()->mainFrame().eventHandler().hitTestResultAtPoint(IntPoint(x, y)); 1105 NSDictionary *options = nullptr; 1106 return rangeForDictionaryLookupAtHitTestResult(result, &options); 1107 #else 1108 UNUSED_PARAM(x); 1109 UNUSED_PARAM(y); 1110 ec = INVALID_ACCESS_ERR; 1111 return nullptr; 1112 #endif 1087 1113 } 1088 1114 -
trunk/Source/WebCore/testing/Internals.h
r179702 r179792 163 163 String rangeAsText(const Range*, ExceptionCode&); 164 164 PassRefPtr<Range> subrange(Range* range, int rangeLocation, int rangeLength, ExceptionCode&); 165 RefPtr<Range> rangeForDictionaryLookupAtLocation(int x, int y, ExceptionCode&); 165 166 166 167 void setDelegatesScrolling(bool enabled, ExceptionCode&); -
trunk/Source/WebCore/testing/Internals.idl
r179702 r179792 125 125 [RaisesException] DOMString rangeAsText(Range range); 126 126 [RaisesException] Range subrange(Range range, long rangeLocation, long rangeLength); 127 [RaisesException] Range rangeForDictionaryLookupAtLocation(long x, long y); 127 128 128 129 [RaisesException] void setDelegatesScrolling(boolean enabled);
Note:
See TracChangeset
for help on using the changeset viewer.