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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/mouse/click-left-of-rtl-wrapping-text.html

Issue 2800723002: Ensure we never remove the style attribute when syncing it from CSSOM. (Closed)
Patch Set: Nits Created 3 years, 8 months 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <meta http-equiv="Content-type" content="text/html; charset=utf-8"> 2 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
3 <script src="../../../resources/testharness.js"></script> 3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script> 4 <script src="../../../resources/testharnessreport.js"></script>
5 <script src="../../assert_selection.js"></script> 5 <script src="../../assert_selection.js"></script>
6 <script> 6 <script>
7 test(() => { 7 test(() => {
8 if (!window.eventSender) { 8 if (!window.eventSender) {
9 assert_no_reached('This test requires eventSender.'); 9 assert_no_reached('This test requires eventSender.');
10 return; 10 return;
(...skipping 21 matching lines...) Expand all
32 eventSender.mouseUp(); 32 eventSender.mouseUp();
33 33
34 // Remove width from style to clean result DOM. 34 // Remove width from style to clean result DOM.
35 container.style.removeProperty('width'); 35 container.style.removeProperty('width');
36 return heightOfLine; 36 return heightOfLine;
37 } 37 }
38 38
39 assert_selection( 39 assert_selection(
40 '<div contenteditable dir="rtl">&#1498; &#1500;&#1499;</div>', 40 '<div contenteditable dir="rtl">&#1498; &#1500;&#1499;</div>',
41 selection => testClickLeft(selection, 2, 0), 41 selection => testClickLeft(selection, 2, 0),
42 '<div contenteditable dir="rtl">ך |לכ</div>'); 42 '<div contenteditable dir="rtl" style>ך |לכ</div>');
43 43
44 assert_selection( 44 assert_selection(
45 '<div contenteditable dir="rtl">&#1498; &#1500;&#1499;</div>', 45 '<div contenteditable dir="rtl">&#1498; &#1500;&#1499;</div>',
46 selection => testClickLeft(selection, 2, 1), 46 selection => testClickLeft(selection, 2, 1),
47 '<div contenteditable dir="rtl">ך לכ|</div>'); 47 '<div contenteditable dir="rtl" style>ך לכ|</div>');
48 48
49 assert_selection( 49 assert_selection(
50 [ 50 [
51 '<div contenteditable dir="rtl">', 51 '<div contenteditable dir="rtl">',
52 '&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;', 52 '&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;',
53 '</div>' 53 '</div>'
54 ].join(''), 54 ].join(''),
55 selection => testClickLeft(selection, 3, 0), 55 selection => testClickLeft(selection, 3, 0),
56 [ 56 [
57 '<div contenteditable dir="rtl">', 57 '<div contenteditable dir="rtl" style>',
58 'ככ |ככככ כככ', 58 'ככ |ככככ כככ',
59 '</div>' 59 '</div>'
60 ].join('')); 60 ].join(''));
61 61
62 assert_selection( 62 assert_selection(
63 [ 63 [
64 '<div contenteditable dir="rtl">', 64 '<div contenteditable dir="rtl">',
65 '&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;', 65 '&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;',
66 '</div>' 66 '</div>'
67 ].join(''), 67 ].join(''),
68 selection => testClickLeft(selection, 3, 1), 68 selection => testClickLeft(selection, 3, 1),
69 [ 69 [
70 '<div contenteditable dir="rtl">', 70 '<div contenteditable dir="rtl" style>',
71 'ככ ככככ |כככ', 71 'ככ ככככ |כככ',
72 '</div>' 72 '</div>'
73 ].join('')); 73 ].join(''));
74 74
75 assert_selection( 75 assert_selection(
76 [ 76 [
77 '<div contenteditable dir="rtl">', 77 '<div contenteditable dir="rtl">',
78 '&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;', 78 '&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;',
79 '</div>' 79 '</div>'
80 ].join(''), 80 ].join(''),
81 selection => testClickLeft(selection, 3, 2), 81 selection => testClickLeft(selection, 3, 2),
82 [ 82 [
83 '<div contenteditable dir="rtl">', 83 '<div contenteditable dir="rtl" style>',
84 'ככ ככככ כככ|', 84 'ככ ככככ כככ|',
85 '</div>' 85 '</div>'
86 ].join('')); 86 ].join(''));
87 87
88 assert_selection( 88 assert_selection(
89 [ 89 [
90 '<div contenteditable dir="rtl">', 90 '<div contenteditable dir="rtl">',
91 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;', 91 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;',
92 '</div>' 92 '</div>'
93 ].join(''), 93 ].join(''),
94 selection => testClickLeft(selection, 5, 0), 94 selection => testClickLeft(selection, 5, 0),
95 [ 95 [
96 '<div contenteditable dir="rtl">', 96 '<div contenteditable dir="rtl" style>',
97 'גכ |יגכ יגכ יגכ יגכ', 97 'גכ |יגכ יגכ יגכ יגכ',
98 '</div>' 98 '</div>'
99 ].join('')); 99 ].join(''));
100 100
101 assert_selection( 101 assert_selection(
102 [ 102 [
103 '<div contenteditable dir="rtl">', 103 '<div contenteditable dir="rtl">',
104 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;', 104 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;',
105 '</div>' 105 '</div>'
106 ].join(''), 106 ].join(''),
107 selection => testClickLeft(selection, 5, 1), 107 selection => testClickLeft(selection, 5, 1),
108 [ 108 [
109 '<div contenteditable dir="rtl">', 109 '<div contenteditable dir="rtl" style>',
110 'גכ יגכ |יגכ יגכ יגכ', 110 'גכ יגכ |יגכ יגכ יגכ',
111 '</div>' 111 '</div>'
112 ].join('')); 112 ].join(''));
113 113
114 assert_selection( 114 assert_selection(
115 [ 115 [
116 '<div contenteditable dir="rtl">', 116 '<div contenteditable dir="rtl">',
117 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;', 117 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;',
118 '</div>' 118 '</div>'
119 ].join(''), 119 ].join(''),
120 selection => testClickLeft(selection, 5, 2), 120 selection => testClickLeft(selection, 5, 2),
121 [ 121 [
122 '<div contenteditable dir="rtl">', 122 '<div contenteditable dir="rtl" style>',
123 'גכ יגכ יגכ |יגכ יגכ', 123 'גכ יגכ יגכ |יגכ יגכ',
124 '</div>' 124 '</div>'
125 ].join('')); 125 ].join(''));
126 126
127 assert_selection( 127 assert_selection(
128 [ 128 [
129 '<div contenteditable dir="rtl">', 129 '<div contenteditable dir="rtl">',
130 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;', 130 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;',
131 '</div>' 131 '</div>'
132 ].join(''), 132 ].join(''),
133 selection => testClickLeft(selection, 5, 3), 133 selection => testClickLeft(selection, 5, 3),
134 [ 134 [
135 '<div contenteditable dir="rtl">', 135 '<div contenteditable dir="rtl" style>',
136 'גכ יגכ יגכ יגכ |יגכ', 136 'גכ יגכ יגכ יגכ |יגכ',
137 '</div>' 137 '</div>'
138 ].join('')); 138 ].join(''));
139 139
140 assert_selection( 140 assert_selection(
141 [ 141 [
142 '<div contenteditable dir="rtl">', 142 '<div contenteditable dir="rtl">',
143 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;', 143 '&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#149 0;&#1499; &#1497;&#1490;&#1499;',
144 '</div>' 144 '</div>'
145 ].join(''), 145 ].join(''),
146 selection => testClickLeft(selection, 5, 4), 146 selection => testClickLeft(selection, 5, 4),
147 [ 147 [
148 '<div contenteditable dir="rtl">', 148 '<div contenteditable dir="rtl" style>',
149 'גכ יגכ יגכ יגכ יגכ|', 149 'גכ יגכ יגכ יגכ יגכ|',
150 '</div>' 150 '</div>'
151 ].join('')); 151 ].join(''));
152 152
153 }, 'This tests clicking on the left of RTL text puts the caret at the end of the line'); 153 }, 'This tests clicking on the left of RTL text puts the caret at the end of the line');
154 </script> 154 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698