| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html style="background: transparent; text-decoration: none"> | 2 <html style="background: transparent; text-decoration: none"> |
| 3 <body> | 3 <body> |
| 4 <p id="description">This tests cutting and pasting a content with inline "backgr
ound: transparent;" into a document with a style rule that overrides this style. | 4 <p id="description">This tests cutting and pasting a content with inline "backgr
ound: transparent;" into a document with a style rule that overrides this style. |
| 5 WebKit should preserve the inline style declaration. To manually test, cut and p
aste "hello world WebKit" below. "world" should not be highlighted in blue.</p> | 5 WebKit should preserve the inline style declaration. To manually test, cut and p
aste "hello world WebKit" below. "world" should not be highlighted in blue.</p> |
| 6 <style> | 6 <style> |
| 7 .test { | 7 .test { |
| 8 background: blue; | 8 background: blue; |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| 11 <div id="container" contenteditable>hello <span class=test style="background: tr
ansparent;">world</span> WebKit</div> | 11 <div id="container" contenteditable>hello <span class=test style="background: tr
ansparent;">world</span> WebKit</div> |
| 12 <script src="../../resources/dump-as-markup.js"></script> | 12 <script src="../../resources/dump-as-markup.js"></script> |
| 13 <script> | 13 <script> |
| 14 | 14 |
| 15 Markup.description(document.getElementById('description').textContent); | 15 Markup.description(document.getElementById('description').textContent); |
| 16 | 16 |
| 17 document.getElementById('container').focus(); | 17 document.getElementById('container').focus(); |
| 18 document.execCommand('SelectAll', false, null); | 18 document.execCommand('SelectAll', false, null); |
| 19 | 19 |
| 20 Markup.dump(document.getElementById('container'), 'Before cut and paste'); | 20 Markup.dump(document.getElementById('container'), 'Before cut and paste'); |
| 21 | 21 |
| 22 document.execCommand('Cut', false, null); | 22 document.execCommand('Cut', false, null); |
| 23 document.execCommand('Paste', false, null); | 23 document.execCommand('Paste', false, null); |
| 24 | 24 |
| 25 Markup.dump(document.getElementById('container'), 'After cut and paste'); | 25 Markup.dump(document.getElementById('container'), 'After cut and paste'); |
| 26 | 26 |
| 27 </script> | 27 </script> |
| 28 </body> | 28 </body> |
| 29 </html> | 29 </html> |
| OLD | NEW |