Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1469)

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html

Issue 2541163003: Fix TextIterator's behavior with first-letter (Closed)
Patch Set: Mon Dec 5 18:00:48 JST 2016 Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/text-iterator/first-letter-word-boundary.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html b/third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html
index 73c6e28b4f75cb5869ef6fc2e7f3d237d7ee3a1a..c267b56b0dce9fa166ec9927bbaa7c239a2296b4 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_extend/extend_by_word_002.html
@@ -6,9 +6,6 @@
<script>
const middot = String.fromCharCode(183); // &middot;
const isMac = navigator.platform.indexOf('Mac') !== -1;
-
-// The current behavior is wrong. The correct focus should be at 'Steak |& ...'
-// on Windows, and 'Steak| & ....' on other platforms.
test(() => assert_selection(
[
'<style>ul li:first-letter {color: red;}</style>',
@@ -31,7 +28,12 @@ test(() => assert_selection(
`<li>${middot} <a href="foo.html">^Appetizers</a></li>`,
`<li>${middot} <a href="foo.html">Soups & Salads</a></li>`,
`<li>${middot} <a href="foo.html">Sandwiches & Burgers</a></li>`,
- isMac ? `<li>${middot} <a href="foo.html">Stea|k & Ribs</a></li>`
+ isMac ? `<li>${middot} <a href="foo.html">Steak| & Ribs</a></li>`
+ // The current non-Mac behavior is wrong. The correct focus
+ // should be at 'Steak & |Ribs'. A deeper reason is that Blink
+ // performs backward word boundary searches to refine the final
+ // selection, which doesn't work with first-letter
+ // (crbug.com/671104).
: `<li>${middot} <a href="foo.html">Steak &| Ribs</a></li>`,
`<li>${middot} <a href="foo.html">Seafood</a></li>`,
`<li>${middot} <a href="foo.html">Combos</a></li>`,
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/text-iterator/first-letter-word-boundary.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698