Changeset 141618 in webkit
- Timestamp:
- Feb 1, 2013 11:44:37 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r141616 r141618 1 2013-02-01 Ryosuke Niwa <rniwa@webkit.org> 2 3 Smart link can erroneously move caret after an URL when typing immediately before it 4 https://bugs.webkit.org/show_bug.cgi?id=92812 5 6 Reviewed by Enrica Casucci. 7 8 Add a regression for typing immediately before an URL while smart link is enabled. 9 WebKit should not be moving the caret erroneously. 10 11 * editing/inserting/smart-link-when-caret-is-moved-before-URL-expected.txt: Added. 12 * editing/inserting/smart-link-when-caret-is-moved-before-URL.html: Added. 13 1 14 2013-02-01 Julien Chaffraix <jchaffraix@webkit.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r141617 r141618 1 2013-02-01 Ryosuke Niwa <rniwa@webkit.org> 2 3 Smart link can erroneously move caret after an URL when typing immediately before it 4 https://bugs.webkit.org/show_bug.cgi?id=92812 5 6 Reviewed by Enrica Casucci. 7 8 The bug was caused by smart link being triggered even when a user finished typing a word 9 immediately before an URL. We already had a logic to avoid smart-linking an URL when the caret 10 was after the URL but we were missing a check for when the caret is before the URL. 11 12 Fixed the bug by adding this check. 13 14 Test: editing/inserting/smart-link-when-caret-is-moved-before-URL.html 15 16 * editing/Editor.cpp: 17 (WebCore::Editor::markAndReplaceFor): 18 1 19 2013-02-01 Roger Fong <roger_fong@apple.com> 2 20 -
trunk/Source/WebCore/editing/Editor.cpp
r141545 r141618 2138 2138 2139 2139 // adding links should be done only immediately after they are typed 2140 if (result->type == TextCheckingTypeLink && selectionOffset > resultLocation + resultLength + 1) 2140 int resultEnd = resultLocation + resultLength; 2141 if (result->type == TextCheckingTypeLink 2142 && (selectionOffset > resultEnd + 1 || selectionOffset <= resultLocation)) 2141 2143 continue; 2142 2144
Note: See TracChangeset
for help on using the changeset viewer.