| <html> |
| <head> |
| <style> |
| p { |
| color: red; |
| } |
| </style> |
| </head> |
| <body> |
| <div id="description">This tests for a copy bug where styles from matched rules would be placed on elements and take precedence over styles from their inline style declarations. When run manually, you must do a Paste. The text in the bottom region should be blue.</div> |
| <div id="copy" contenteditable="true"> |
| <p style="color: blue;">This text</p> |
| <p style="color: blue;">should be</p> |
| <p style="color: blue;">blue</p> |
| </div> |
| |
| <div id="paste" contenteditable="true"></div> |
| |
| <script> |
| copy = document.getElementById("copy"); |
| copy.focus(); |
| document.execCommand("selectall"); |
| document.execCommand("copy"); |
| paste = document.getElementById("paste"); |
| paste.focus(); |
| document.execCommand("paste"); |
| if (window.layoutTestController) { |
| window.layoutTestController.dumpAsText(); |
| document.body.innerText = document.getElementById("description").innerText + "\n\n" + copy.innerHTML; |
| } |
| </script> |
| </body> |
| </html> |