 Chromium Code Reviews
 Chromium Code Reviews Issue 14113040:
  Update the first letter when the first line is changed by adding a new text at its start.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@first-letter-rendering-issue
    
  
    Issue 14113040:
  Update the first letter when the first line is changed by adding a new text at its start.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@first-letter-rendering-issue| Index: LayoutTests/fast/css/first-letter-block-change.html | 
| diff --git a/LayoutTests/fast/css/first-letter-block-change.html b/LayoutTests/fast/css/first-letter-block-change.html | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..e89ac5a0dc61d495937bf0e4c984a5aafc88355b | 
| --- /dev/null | 
| +++ b/LayoutTests/fast/css/first-letter-block-change.html | 
| @@ -0,0 +1,29 @@ | 
| +<!doctype html> | 
| +<html> | 
| +<head> | 
| +<title>Test for first-letter that is added by DOM scripting</title> | 
| +<style type="text/css"> | 
| +p:first-letter {text-decoration: underline; color: #CB000F;} | 
| +</style> | 
| +<script type="text/javascript"> | 
| +if (window.testRunner) | 
| + testRunner.waitUntilDone(); | 
| + | 
| +setTimeout(function() {addTextNode()}, 0); | 
| 
esprehn
2013/09/27 18:30:15
This doesn't need to use setTimeout, just do:
onl
 | 
| + | 
| +function addTextNode() { | 
| + var textNode = document.createTextNode('I am adding a new text. '); | 
| + var para = document.getElementById('test'); | 
| + para.insertBefore(textNode, para.firstChild); | 
| + if (window.testRunner) | 
| + testRunner.notifyDone(); | 
| +} | 
| +</script> | 
| +</head> | 
| +<body> | 
| +<p id="test"> | 
| +This is a test paragraph. You can insert extra text at its start; | 
| +the :first-letter styles should be updated to accomodate this new text. | 
| +</p> | 
| +</body> | 
| +</html> |