Title: [238222] trunk
- Revision
- 238222
- Author
- an...@apple.com
- Date
- 2018-11-15 05:48:52 -0800 (Thu, 15 Nov 2018)
Log Message
Remove fonts from CSSFontFaceSet safely
https://bugs.webkit.org/show_bug.cgi?id=191676
Reviewed by Zalan Bujtas.
Source/WebCore:
Test: fast/text/font-face-set-remove-safely.html
* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::remove):
LayoutTests:
* fast/text/font-face-set-remove-safely-expected.txt: Added.
* fast/text/font-face-set-remove-safely.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (238221 => 238222)
--- trunk/LayoutTests/ChangeLog 2018-11-15 13:43:11 UTC (rev 238221)
+++ trunk/LayoutTests/ChangeLog 2018-11-15 13:48:52 UTC (rev 238222)
@@ -1,3 +1,13 @@
+2018-11-15 Antti Koivisto <an...@apple.com>
+
+ Remove fonts from CSSFontFaceSet safely
+ https://bugs.webkit.org/show_bug.cgi?id=191676
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/text/font-face-set-remove-safely-expected.txt: Added.
+ * fast/text/font-face-set-remove-safely.html: Added.
+
2018-11-14 Timothy Hatcher <timo...@apple.com>
Default the view background color and text color to different values when in dark mode.
Added: trunk/LayoutTests/fast/text/font-face-set-remove-safely-expected.txt (0 => 238222)
--- trunk/LayoutTests/fast/text/font-face-set-remove-safely-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/font-face-set-remove-safely-expected.txt 2018-11-15 13:48:52 UTC (rev 238222)
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 6: Retrieving fonts...
+CONSOLE MESSAGE: line 8: Clearing...
+CONSOLE MESSAGE: line 10: Done.
+
Added: trunk/LayoutTests/fast/text/font-face-set-remove-safely.html (0 => 238222)
--- trunk/LayoutTests/fast/text/font-face-set-remove-safely.html (rev 0)
+++ trunk/LayoutTests/fast/text/font-face-set-remove-safely.html 2018-11-15 13:48:52 UTC (rev 238222)
@@ -0,0 +1,20 @@
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function test() {
+ console.log("Retrieving fonts...");
+ var fonts = document.fonts;
+ console.log("Clearing...");
+ fonts.clear();
+ console.log("Done.");
+}
+
+</script>
+<body _onload_=test()>
+
+<svg>
+
+<font>
+
+<font-face font-family="Palatino, Menlo, Verdana, serif, monospace">
Modified: trunk/Source/WebCore/ChangeLog (238221 => 238222)
--- trunk/Source/WebCore/ChangeLog 2018-11-15 13:43:11 UTC (rev 238221)
+++ trunk/Source/WebCore/ChangeLog 2018-11-15 13:48:52 UTC (rev 238222)
@@ -1,3 +1,15 @@
+2018-11-15 Antti Koivisto <an...@apple.com>
+
+ Remove fonts from CSSFontFaceSet safely
+ https://bugs.webkit.org/show_bug.cgi?id=191676
+
+ Reviewed by Zalan Bujtas.
+
+ Test: fast/text/font-face-set-remove-safely.html
+
+ * css/CSSFontFaceSet.cpp:
+ (WebCore::CSSFontFaceSet::remove):
+
2018-11-15 Manuel Rego Casasnovas <r...@igalia.com>
[css-grid] Consider scrollbars in populateGridPositionsForDirection()
Modified: trunk/Source/WebCore/css/CSSFontFaceSet.cpp (238221 => 238222)
--- trunk/Source/WebCore/css/CSSFontFaceSet.cpp 2018-11-15 13:43:11 UTC (rev 238221)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.cpp 2018-11-15 13:48:52 UTC (rev 238222)
@@ -230,6 +230,8 @@
void CSSFontFaceSet::remove(const CSSFontFace& face)
{
+ auto protect = makeRef(face);
+
m_cache.clear();
for (auto* client : m_clients)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes