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

Side by Side Diff: LayoutTests/fast/css/cssom-modify-font-face-rule.html

Issue 82583005: Use removeFontFace to avoid resetting fontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added 2 layout tests Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 function runTest() { 5 function runTest() {
6 var target = document.getElementById('target');
7 document.body.offsetLeft; 6 document.body.offsetLeft;
8 target.parentNode.removeChild(target); 7 console.log(document.styleSheets[0].cssRules[0].style.fontFamily);
ojan 2014/01/03 01:20:44 Are these console.logs accidentally included in th
tasak 2014/01/07 08:42:12 Sorry. I used the console.logs for debugging. Remo
8 document.styleSheets[0].cssRules[0].style.fontFamily = "f2";
9 console.log(document.styleSheets[0].cssRules[0].style.fontFamily);
9 } 10 }
10 </script> 11 </script>
11 </head> 12 </head>
12 <body onload="runTest()"> 13 <body onload="runTest()">
13 <style id="target"> 14 <style id="target">
14 @font-face { 15 @font-face {
15 font-family: f1; 16 font-family: f1;
16 font-weight: 100; 17 font-weight: 100;
17 src: url(../../resources/Ahem.ttf); 18 src: url(../../resources/Ahem.ttf);
18 } 19 }
19 </style> 20 </style>
20 <!-- crbug.com/305885: when removing stylesheets, consider @font-face rules. --> 21 <!-- crbug.com/305885: when removing stylesheets, consider @font-face rules. -->
21 <span style="font-family: f1; font-weight: 100">A</span> 22 <span style="font-family: f1; font-weight: 100">A</span>
22 </body> 23 </body>
23 </html> 24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698