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

Unified Diff: LayoutTests/fast/css/remove-style-after-insert-font-face.html

Issue 66483002: fontSelector should be reset when removing stylesheets which has @font-face rule. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css/remove-style-after-insert-font-face.html
diff --git a/LayoutTests/fast/css/remove-style-after-insert-font-face.html b/LayoutTests/fast/css/remove-style-after-insert-font-face.html
new file mode 100644
index 0000000000000000000000000000000000000000..56b8984adff2e0b47ef2b2515e895ae8875335c5
--- /dev/null
+++ b/LayoutTests/fast/css/remove-style-after-insert-font-face.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<html>
+<head>
+<script>
+function runTest() {
+ var rules = document.styleSheets[0].cssRules;
+ document.styleSheets[0].insertRule("@font-face { font-family: f1; font-weight: 100; src: url(../../resources/Ahem.ttf); }", 0);
+ document.body.offsetLeft;
+ var target = document.getElementById('target');
+ target.parentNode.removeChild(target);
+}
+</script>
+</head>
+<body onload="runTest()">
+<style id="target">
+.nothing {
+ color: red;
+}
+</style>
+<!-- crbug.com/305885: when removing stylesheets, consider @font-face rules. -->
+<span style="font-family: f1; font-weight: 100">A</span>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698