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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/indent/indent_root.html

Issue 2753193002: Editing: Indent command: Do not insert BLOCKQUOTE under the root HTML element. (Closed)
Patch Set: . Created 3 years, 9 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <script src="../../assert_selection.js"></script>
5 <script>
6 test(() => {
7 assert_selection(
8 '',
9 selection => {
10 let doc = selection.document;
11 doc.documentElement.innerHTML = `<style>aaa</style>
12 First text in BODY
13 <br/>
14 <style>
15 * { display: -webkit-inline-box; }
16 .CLASS11 { float: right;}
17 </style>
18 <div class="CLASS11"></div>
19 Trailing text`;
20
21 doc.designMode = 'on';
22 doc.execCommand("SelectAll")
yosin_UTC9 2017/03/17 10:04:11 nit: Let's use single-quote since other parts use
23 doc.execCommand("Indent");
yosin_UTC9 2017/03/17 10:04:11 nit: Let's use single-quote since other parts use
24 },
25
26 // TODO(tkent): We successfully avoid inserting BLOCKQUOTE under HTML, but
27 // inserting BR in the first STYLE looks wrong and resultant selection is
28 // weird.
29 '<html><head><style>aa<br>^a</style>\n</head>' +
30 '<body><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">' +
31 'First text in BODY<br><style>\n* { display: -webkit-inline-box; }\n.CLASS11 { float: right;}\n' +
32 '<br></style>\nTrailing tex|t</blockquote><br><div class="CLASS11"></div>' +
33 '</body></html>',
34 {'dumpFromRoot': true});
35 }, 'Indent the whole tree should not insert new nodes under the documentElement. ');
36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698