<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[201906] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/201906">201906</a></dd>
<dt>Author</dt> <dd>ryanhaddad@apple.com</dd>
<dt>Date</dt> <dd>2016-06-09 22:24:46 -0700 (Thu, 09 Jun 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/201887">r201887</a>.
https://bugs.webkit.org/show_bug.cgi?id=158610
This change caused LayoutTest crashes under GuardMalloc and
ASan (Requested by ryanhaddad on #webkit).
Reverted changeset:
"Deleting a CSSOM style rule invalidates any previously-added
FontFaces"
https://bugs.webkit.org/show_bug.cgi?id=158450
http://trac.webkit.org/changeset/201887
Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-09</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFacecpp">trunk/Source/WebCore/css/CSSFontFace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceh">trunk/Source/WebCore/css/CSSFontFace.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSetcpp">trunk/Source/WebCore/css/CSSFontFaceSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSeth">trunk/Source/WebCore/css/CSSFontFaceSet.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorh">trunk/Source/WebCore/css/CSSFontSelector.h</a></li>
<li><a href="#trunkSourceWebCorecssFontFacecpp">trunk/Source/WebCore/css/FontFace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssFontFaceh">trunk/Source/WebCore/css/FontFace.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttextfontfacesetcssomexpectedtxt">trunk/LayoutTests/fast/text/font-face-set-cssom-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttextfontfacesetcssomhtml">trunk/LayoutTests/fast/text/font-face-set-cssom.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/LayoutTests/ChangeLog        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-06-09 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r201887.
+ https://bugs.webkit.org/show_bug.cgi?id=158610
+
+ This change caused LayoutTest crashes under GuardMalloc and
+ ASan (Requested by ryanhaddad on #webkit).
+
+ Reverted changeset:
+
+ "Deleting a CSSOM style rule invalidates any previously-added
+ FontFaces"
+ https://bugs.webkit.org/show_bug.cgi?id=158450
+ http://trac.webkit.org/changeset/201887
+
</ins><span class="cx"> 2016-06-09 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Add testing support for 3x device scale factor.
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextfontfacesetcssomexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/text/font-face-set-cssom-expected.txt (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-face-set-cssom-expected.txt        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/LayoutTests/fast/text/font-face-set-cssom-expected.txt        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -1,48 +0,0 @@
</span><del>-This test makes sure that the CSS Font Loading API plays nicely with modifying @font-face rules with the CSSOM.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS item1.getBoundingClientRect().width is 48
-PASS item2.getBoundingClientRect().width is not 48
-PASS item3.getBoundingClientRect().width is not 48
-PASS item4.getBoundingClientRect().width is not 48
-PASS item5.getBoundingClientRect().width is not 48
-PASS item6.getBoundingClientRect().width is not 48
-PASS item1.getBoundingClientRect().width is 48
-PASS item2.getBoundingClientRect().width is 48
-PASS item3.getBoundingClientRect().width is not 48
-PASS item4.getBoundingClientRect().width is not 48
-PASS item5.getBoundingClientRect().width is not 48
-PASS item6.getBoundingClientRect().width is not 48
-PASS item1.getBoundingClientRect().width is 48
-PASS item2.getBoundingClientRect().width is 48
-PASS item3.getBoundingClientRect().width is 48
-PASS item4.getBoundingClientRect().width is not 48
-PASS item5.getBoundingClientRect().width is not 48
-PASS item6.getBoundingClientRect().width is not 48
-PASS item1.getBoundingClientRect().width is 48
-PASS item2.getBoundingClientRect().width is 48
-PASS item3.getBoundingClientRect().width is not 48
-PASS item4.getBoundingClientRect().width is not 48
-PASS item5.getBoundingClientRect().width is not 48
-PASS item6.getBoundingClientRect().width is not 48
-PASS connectedFontFace.family is "WebFont2"
-PASS connectedFontFace.family is "WebFont5"
-PASS item1.getBoundingClientRect().width is 48
-PASS item2.getBoundingClientRect().width is not 48
-PASS item3.getBoundingClientRect().width is not 48
-PASS item4.getBoundingClientRect().width is not 48
-PASS item5.getBoundingClientRect().width is 48
-PASS item6.getBoundingClientRect().width is not 48
-PASS styleSheet.cssRules[0].style.fontFamily is "WebFont6"
-PASS item1.getBoundingClientRect().width is 48
-PASS item2.getBoundingClientRect().width is not 48
-PASS item3.getBoundingClientRect().width is not 48
-PASS item4.getBoundingClientRect().width is not 48
-PASS item5.getBoundingClientRect().width is not 48
-PASS item6.getBoundingClientRect().width is 48
-PASS successfullyParsed is true
-
-TEST COMPLETE
-l l l l l l
</del></span></pre></div>
<a id="trunkLayoutTestsfasttextfontfacesetcssomhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/text/font-face-set-cssom.html (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/font-face-set-cssom.html        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/LayoutTests/fast/text/font-face-set-cssom.html        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -1,92 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../resources/js-test-pre.js"></script>
-<style id="styleElement">
-</style>
-</head>
-<body>
-<span id="item1" style="font: 48px WebFont;">l</span>
-<span id="item2" style="font: 48px WebFont2;">l</span>
-<span id="item3" style="font: 48px WebFont3;">l</span>
-<span id="item4" style="font: 48px WebFont4;">l</span>
-<span id="item5" style="font: 48px WebFont5;">l</span>
-<span id="item6" style="font: 48px WebFont6;">l</span>
-<script>
-description("This test makes sure that the CSS Font Loading API plays nicely with modifying @font-face rules with the CSSOM.");
-
-var item1 = document.getElementById("item1");
-var item2 = document.getElementById("item2");
-var item3 = document.getElementById("item3");
-var item4 = document.getElementById("item4");
-var item5 = document.getElementById("item5");
-var item6 = document.getElementById("item6");
-
-var fontFace = new FontFace("WebFont", "local('Ahem')", {});
-document.fonts.add(fontFace);
-fontFace.load();
-
-shouldBe("item1.getBoundingClientRect().width", "48");
-shouldNotBe("item2.getBoundingClientRect().width", "48");
-shouldNotBe("item3.getBoundingClientRect().width", "48");
-shouldNotBe("item4.getBoundingClientRect().width", "48");
-shouldNotBe("item5.getBoundingClientRect().width", "48");
-shouldNotBe("item6.getBoundingClientRect().width", "48");
-
-var styleSheet = document.getElementById("styleElement").sheet;
-styleSheet.insertRule("@font-face { font-family: 'WebFont2'; src: local('Ahem'); }", 0);
-
-shouldBe("item1.getBoundingClientRect().width", "48");
-shouldBe("item2.getBoundingClientRect().width", "48");
-shouldNotBe("item3.getBoundingClientRect().width", "48");
-shouldNotBe("item4.getBoundingClientRect().width", "48");
-shouldNotBe("item5.getBoundingClientRect().width", "48");
-shouldNotBe("item6.getBoundingClientRect().width", "48");
-
-styleSheet.insertRule("@font-face { font-family: 'WebFont3'; src: local('Ahem'); }", 0);
-
-shouldBe("item1.getBoundingClientRect().width", "48");
-shouldBe("item2.getBoundingClientRect().width", "48");
-shouldBe("item3.getBoundingClientRect().width", "48");
-shouldNotBe("item4.getBoundingClientRect().width", "48");
-shouldNotBe("item5.getBoundingClientRect().width", "48");
-shouldNotBe("item6.getBoundingClientRect().width", "48");
-
-styleSheet.deleteRule(0);
-
-shouldBe("item1.getBoundingClientRect().width", "48");
-shouldBe("item2.getBoundingClientRect().width", "48");
-shouldNotBe("item3.getBoundingClientRect().width", "48");
-shouldNotBe("item4.getBoundingClientRect().width", "48");
-shouldNotBe("item5.getBoundingClientRect().width", "48");
-shouldNotBe("item6.getBoundingClientRect().width", "48");
-
-var connectedFontFace = document.fonts.keys().next().value;
-shouldBeEqualToString("connectedFontFace.family", "WebFont2");
-
-styleSheet.cssRules[0].style.fontFamily = "WebFont5";
-
-shouldBeEqualToString("connectedFontFace.family", "WebFont5");
-
-shouldBe("item1.getBoundingClientRect().width", "48");
-shouldNotBe("item2.getBoundingClientRect().width", "48");
-shouldNotBe("item3.getBoundingClientRect().width", "48");
-shouldNotBe("item4.getBoundingClientRect().width", "48");
-shouldBe("item5.getBoundingClientRect().width", "48");
-shouldNotBe("item6.getBoundingClientRect().width", "48");
-
-connectedFontFace.family = "WebFont6";
-
-shouldBeEqualToString("styleSheet.cssRules[0].style.fontFamily", "WebFont6");
-
-shouldBe("item1.getBoundingClientRect().width", "48");
-shouldNotBe("item2.getBoundingClientRect().width", "48");
-shouldNotBe("item3.getBoundingClientRect().width", "48");
-shouldNotBe("item4.getBoundingClientRect().width", "48");
-shouldNotBe("item5.getBoundingClientRect().width", "48");
-shouldBe("item6.getBoundingClientRect().width", "48");
-
-</script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-<html>
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/ChangeLog        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-06-09 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r201887.
+ https://bugs.webkit.org/show_bug.cgi?id=158610
+
+ This change caused LayoutTest crashes under GuardMalloc and
+ ASan (Requested by ryanhaddad on #webkit).
+
+ Reverted changeset:
+
+ "Deleting a CSSOM style rule invalidates any previously-added
+ FontFaces"
+ https://bugs.webkit.org/show_bug.cgi?id=158450
+ http://trac.webkit.org/changeset/201887
+
</ins><span class="cx"> 2016-06-09 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Address Darin's review comment on r201898.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFace.cpp (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFace.cpp        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/css/CSSFontFace.cpp        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -94,7 +94,6 @@
</span><span class="cx"> , m_cssConnection(cssConnection)
</span><span class="cx"> , m_wrapper(wrapper ? wrapper->createWeakPtr() : WeakPtr<FontFace>())
</span><span class="cx"> , m_isLocalFallback(isLocalFallback)
</span><del>- , m_mayBePurged(!wrapper)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -114,9 +113,6 @@
</span><span class="cx"> RefPtr<CSSValueList> oldFamilies = m_families;
</span><span class="cx"> m_families = &familyList;
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontFamily, &family);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this, oldFamilies.get());
</span><span class="cx"> });
</span><span class="lines">@@ -147,9 +143,6 @@
</span><span class="cx"> if (auto mask = calculateStyleMask(style)) {
</span><span class="cx"> m_traitsMask = static_cast<FontTraitsMask>((static_cast<unsigned>(m_traitsMask) & (~FontStyleMask)) | mask.value());
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontStyle, &style);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -199,9 +192,6 @@
</span><span class="cx"> if (auto mask = calculateWeightMask(weight)) {
</span><span class="cx"> m_traitsMask = static_cast<FontTraitsMask>((static_cast<unsigned>(m_traitsMask) & (~FontWeightMask)) | mask.value());
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontWeight, &weight);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -224,9 +214,6 @@
</span><span class="cx"> m_ranges.append({ range.from(), range.to() });
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyUnicodeRange, &unicodeRange);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -243,9 +230,6 @@
</span><span class="cx"> m_variantSettings.historicalLigatures = ligatures.historicalLigatures;
</span><span class="cx"> m_variantSettings.contextualAlternates = ligatures.contextualAlternates;
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantLigatures, &variantLigatures);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -260,9 +244,6 @@
</span><span class="cx">
</span><span class="cx"> m_variantSettings.position = downcast<CSSPrimitiveValue>(variantPosition);
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantPosition, &variantPosition);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -277,9 +258,6 @@
</span><span class="cx">
</span><span class="cx"> m_variantSettings.caps = downcast<CSSPrimitiveValue>(variantCaps);
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantCaps, &variantCaps);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -297,9 +275,6 @@
</span><span class="cx"> m_variantSettings.numericOrdinal = numeric.ordinal;
</span><span class="cx"> m_variantSettings.numericSlashedZero = numeric.slashedZero;
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantNumeric, &variantNumeric);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -314,9 +289,6 @@
</span><span class="cx">
</span><span class="cx"> m_variantSettings.alternates = downcast<CSSPrimitiveValue>(variantAlternates);
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantAlternates, &variantAlternates);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -332,9 +304,6 @@
</span><span class="cx"> m_variantSettings.eastAsianWidth = eastAsian.width;
</span><span class="cx"> m_variantSettings.eastAsianRuby = eastAsian.ruby;
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontVariantEastAsian, &variantEastAsian);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -362,9 +331,6 @@
</span><span class="cx">
</span><span class="cx"> m_featureSettings = WTFMove(settings);
</span><span class="cx">
</span><del>- if (m_cssConnection)
- m_cssConnection->mutableProperties().setProperty(CSSPropertyFontFeatureSettings, &featureSettings);
-
</del><span class="cx"> iterateClients(m_clients, [&](Client& client) {
</span><span class="cx"> client.fontPropertyChanged(*this);
</span><span class="cx"> });
</span><span class="lines">@@ -415,47 +381,35 @@
</span><span class="cx"> m_clients.remove(&client);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSFontFace::initializeWrapper()
</del><ins>+Ref<FontFace> CSSFontFace::wrapper()
</ins><span class="cx"> {
</span><ins>+ if (m_wrapper)
+ return Ref<FontFace>(*m_wrapper.get());
+
+ Ref<FontFace> wrapper = FontFace::create(*this);
</ins><span class="cx"> switch (m_status) {
</span><span class="cx"> case Status::Pending:
</span><span class="cx"> break;
</span><span class="cx"> case Status::Loading:
</span><del>- m_wrapper->fontStateChanged(*this, Status::Pending, Status::Loading);
</del><ins>+ wrapper->fontStateChanged(*this, Status::Pending, Status::Loading);
</ins><span class="cx"> break;
</span><span class="cx"> case Status::TimedOut:
</span><del>- m_wrapper->fontStateChanged(*this, Status::Pending, Status::Loading);
- m_wrapper->fontStateChanged(*this, Status::Loading, Status::TimedOut);
</del><ins>+ wrapper->fontStateChanged(*this, Status::Pending, Status::Loading);
+ wrapper->fontStateChanged(*this, Status::Loading, Status::TimedOut);
</ins><span class="cx"> break;
</span><span class="cx"> case Status::Success:
</span><del>- m_wrapper->fontStateChanged(*this, Status::Pending, Status::Loading);
- m_wrapper->fontStateChanged(*this, Status::Pending, Status::Success);
</del><ins>+ wrapper->fontStateChanged(*this, Status::Pending, Status::Loading);
+ wrapper->fontStateChanged(*this, Status::Pending, Status::Success);
</ins><span class="cx"> break;
</span><span class="cx"> case Status::Failure:
</span><del>- m_wrapper->fontStateChanged(*this, Status::Pending, Status::Loading);
- m_wrapper->fontStateChanged(*this, Status::Pending, Status::Failure);
</del><ins>+ wrapper->fontStateChanged(*this, Status::Pending, Status::Loading);
+ wrapper->fontStateChanged(*this, Status::Pending, Status::Failure);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><del>-}
-
-Ref<FontFace> CSSFontFace::wrapper()
-{
- if (m_wrapper)
- return *m_wrapper.get();
-
- auto wrapper = FontFace::create(*this);
</del><span class="cx"> m_wrapper = wrapper->createWeakPtr();
</span><del>- initializeWrapper();
- m_mayBePurged = false;
</del><span class="cx"> return wrapper;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSFontFace::setWrapper(FontFace& newWrapper)
-{
- m_wrapper = newWrapper.createWeakPtr();
- initializeWrapper();
-}
-
</del><span class="cx"> void CSSFontFace::adoptSource(std::unique_ptr<CSSFontFaceSource>&& source)
</span><span class="cx"> {
</span><span class="cx"> m_sources.append(WTFMove(source));
</span><span class="lines">@@ -598,17 +552,6 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSFontFace::purgeable() const
-{
- return cssConnection() && m_mayBePurged;
-}
-
-void CSSFontFace::updateStyleIfNeeded()
-{
- if (m_fontSelector && m_fontSelector->document())
- m_fontSelector->document()->updateStyleIfNeeded();
-}
-
</del><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx"> bool CSSFontFace::hasSVGFontFaceSource() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFace.h (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFace.h        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/css/CSSFontFace.h        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -135,15 +135,9 @@
</span><span class="cx">
</span><span class="cx"> // We don't guarantee that the FontFace wrapper will be the same every time you ask for it.
</span><span class="cx"> Ref<FontFace> wrapper();
</span><del>- void setWrapper(FontFace&);
- FontFace* existingWrapper() { return m_wrapper.get(); }
</del><span class="cx">
</span><span class="cx"> bool webFontsShouldAlwaysFallBack() const;
</span><span class="cx">
</span><del>- bool purgeable() const;
-
- void updateStyleIfNeeded();
-
</del><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx"> bool hasSVGFontFaceSource() const;
</span><span class="cx"> #endif
</span><span class="lines">@@ -155,8 +149,6 @@
</span><span class="cx"> void setStatus(Status);
</span><span class="cx"> void notifyClientsOfFontPropertyChange();
</span><span class="cx">
</span><del>- void initializeWrapper();
-
</del><span class="cx"> void fontLoadEventOccurred();
</span><span class="cx"> void timeoutFired();
</span><span class="cx">
</span><span class="lines">@@ -174,7 +166,6 @@
</span><span class="cx"> Status m_status { Status::Pending };
</span><span class="cx"> bool m_isLocalFallback { false };
</span><span class="cx"> bool m_sourcesPopulated { false };
</span><del>- bool m_mayBePurged { true };
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.cpp (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -95,10 +95,9 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered(const String& familyName)
</del><ins>+void CSSFontFaceSet::registerLocalFontFacesForFamily(const String& familyName)
</ins><span class="cx"> {
</span><del>- if (m_locallyInstalledFacesLookupTable.contains(familyName))
- return;
</del><ins>+ ASSERT(!m_locallyInstalledFacesLookupTable.contains(familyName));
</ins><span class="cx">
</span><span class="cx"> Vector<FontTraitsMask> traitsMasks = FontCache::singleton().getTraitsInFamily(familyName);
</span><span class="cx"> if (traitsMasks.isEmpty())
</span><span class="lines">@@ -161,7 +160,7 @@
</span><span class="cx"> if (addResult.isNewEntry) {
</span><span class="cx"> // m_locallyInstalledFontFaces grows without bound, eventually encorporating every font installed on the system.
</span><span class="cx"> // This is by design.
</span><del>- ensureLocalFontFacesForFamilyRegistered(familyName);
</del><ins>+ registerLocalFontFacesForFamily(familyName);
</ins><span class="cx"> familyFontFaces = { };
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -188,11 +187,6 @@
</span><span class="cx">
</span><span class="cx"> if (face.status() == CSSFontFace::Status::Loading || face.status() == CSSFontFace::Status::TimedOut)
</span><span class="cx"> incrementActiveCount();
</span><del>-
- if (face.cssConnection()) {
- auto addResult = m_constituentCSSConnections.add(face.cssConnection(), &face);
- ASSERT_UNUSED(addResult, addResult.isNewEntry);
- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSFontFaceSet::removeFromFacesLookupTable(const CSSFontFace& face, const CSSValueList& familiesToSearchFor)
</span><span class="lines">@@ -228,11 +222,6 @@
</span><span class="cx"> if (face.families())
</span><span class="cx"> removeFromFacesLookupTable(face, *face.families());
</span><span class="cx">
</span><del>- if (face.cssConnection()) {
- bool removed = m_constituentCSSConnections.remove(face.cssConnection());
- ASSERT_UNUSED(removed, removed);
- }
-
</del><span class="cx"> for (size_t i = 0; i < m_faces.size(); ++i) {
</span><span class="cx"> if (m_faces[i].ptr() == &face) {
</span><span class="cx"> if (i < m_facesPartitionIndex)
</span><span class="lines">@@ -247,23 +236,6 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CSSFontFace* CSSFontFaceSet::lookupByCSSConnection(StyleRuleFontFace& target)
-{
- return m_constituentCSSConnections.get(&target);
-}
-
-void CSSFontFaceSet::purge()
-{
- Vector<std::reference_wrapper<CSSFontFace>> toRemove;
- for (auto& face : m_faces) {
- if (face->purgeable())
- toRemove.append(face.get());
- }
-
- for (auto& item : toRemove)
- remove(item.get());
-}
-
</del><span class="cx"> void CSSFontFaceSet::clear()
</span><span class="cx"> {
</span><span class="cx"> for (auto& face : m_faces)
</span><span class="lines">@@ -272,7 +244,6 @@
</span><span class="cx"> m_facesLookupTable.clear();
</span><span class="cx"> m_locallyInstalledFacesLookupTable.clear();
</span><span class="cx"> m_cache.clear();
</span><del>- m_constituentCSSConnections.clear();
</del><span class="cx"> m_facesPartitionIndex = 0;
</span><span class="cx"> m_status = Status::Loaded;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.h (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.h        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.h        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -60,12 +60,9 @@
</span><span class="cx"> size_t faceCount() const { return m_faces.size(); }
</span><span class="cx"> void add(CSSFontFace&);
</span><span class="cx"> void remove(const CSSFontFace&);
</span><del>- void purge();
</del><span class="cx"> void clear();
</span><span class="cx"> CSSFontFace& operator[](size_t i);
</span><span class="cx">
</span><del>- CSSFontFace* lookupByCSSConnection(StyleRuleFontFace&);
-
</del><span class="cx"> bool check(const String& font, const String& text, ExceptionCode&);
</span><span class="cx">
</span><span class="cx"> CSSSegmentedFontFace* getFontFace(FontTraitsMask, const AtomicString& family);
</span><span class="lines">@@ -94,7 +91,7 @@
</span><span class="cx"> void fontStateChanged(CSSFontFace&, CSSFontFace::Status oldState, CSSFontFace::Status newState) override;
</span><span class="cx"> void fontPropertyChanged(CSSFontFace&, CSSValueList* oldFamilies = nullptr) override;
</span><span class="cx">
</span><del>- void ensureLocalFontFacesForFamilyRegistered(const String&);
</del><ins>+ void registerLocalFontFacesForFamily(const String&);
</ins><span class="cx">
</span><span class="cx"> static String familyNameFromPrimitive(const CSSPrimitiveValue&);
</span><span class="cx">
</span><span class="lines">@@ -103,7 +100,6 @@
</span><span class="cx"> HashMap<String, Vector<Ref<CSSFontFace>>, ASCIICaseInsensitiveHash> m_facesLookupTable;
</span><span class="cx"> HashMap<String, Vector<Ref<CSSFontFace>>, ASCIICaseInsensitiveHash> m_locallyInstalledFacesLookupTable;
</span><span class="cx"> HashMap<String, HashMap<unsigned, RefPtr<CSSSegmentedFontFace>>, ASCIICaseInsensitiveHash> m_cache;
</span><del>- HashMap<StyleRuleFontFace*, CSSFontFace*> m_constituentCSSConnections;
</del><span class="cx"> size_t m_facesPartitionIndex { 0 }; // All entries in m_faces before this index are CSS-connected.
</span><span class="cx"> Status m_status { Status::Loaded };
</span><span class="cx"> HashSet<CSSFontFaceSetClient*> m_clients;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "Font.h"
</span><span class="cx"> #include "FontCache.h"
</span><del>-#include "FontFace.h"
</del><span class="cx"> #include "FontFaceSet.h"
</span><span class="cx"> #include "FontSelectorClient.h"
</span><span class="cx"> #include "FontVariantBuilder.h"
</span><span class="lines">@@ -102,17 +101,7 @@
</span><span class="cx"> void CSSFontSelector::buildStarted()
</span><span class="cx"> {
</span><span class="cx"> m_buildIsUnderway = true;
</span><del>- m_stagingArea.clear();
- m_cssFontFaceSet->purge();
</del><span class="cx"> ++m_version;
</span><del>-
- m_cssConnectionsPossiblyToRemove.clear();
- m_cssConnectionsEncounteredDuringBuild.clear();
- for (size_t i = 0; i < m_cssFontFaceSet->faceCount(); ++i) {
- CSSFontFace& face = m_cssFontFaceSet.get()[i];
- if (face.cssConnection())
- m_cssConnectionsPossiblyToRemove.add(&face);
- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSFontSelector::buildCompleted()
</span><span class="lines">@@ -122,13 +111,7 @@
</span><span class="cx">
</span><span class="cx"> m_buildIsUnderway = false;
</span><span class="cx">
</span><del>- // Some font faces weren't re-added during the build process.
- for (auto& face : m_cssConnectionsPossiblyToRemove) {
- auto* connection = face->cssConnection();
- ASSERT(connection);
- if (!m_cssConnectionsEncounteredDuringBuild.contains(connection))
- m_cssFontFaceSet->remove(*face);
- }
</del><ins>+ m_cssFontFaceSet->clear();
</ins><span class="cx">
</span><span class="cx"> for (auto& item : m_stagingArea)
</span><span class="cx"> addFontFaceRule(item.styleRuleFontFace, item.isInitiatingElementInUserAgentShadowTree);
</span><span class="lines">@@ -138,7 +121,6 @@
</span><span class="cx"> void CSSFontSelector::addFontFaceRule(StyleRuleFontFace& fontFaceRule, bool isInitiatingElementInUserAgentShadowTree)
</span><span class="cx"> {
</span><span class="cx"> if (m_buildIsUnderway) {
</span><del>- m_cssConnectionsEncounteredDuringBuild.add(&fontFaceRule);
</del><span class="cx"> m_stagingArea.append({fontFaceRule, isInitiatingElementInUserAgentShadowTree});
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -205,12 +187,6 @@
</span><span class="cx"> if (fontFace->allSourcesFailed())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (RefPtr<CSSFontFace> existingFace = m_cssFontFaceSet->lookupByCSSConnection(fontFaceRule)) {
- m_cssFontFaceSet->remove(*existingFace);
- if (auto* existingWrapper = existingFace->existingWrapper())
- existingWrapper->adopt(fontFace.get());
- }
-
</del><span class="cx"> m_cssFontFaceSet->add(fontFace.get());
</span><span class="cx"> m_creatingFont = false;
</span><span class="cx"> ++m_version;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.h (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.h        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/css/CSSFontSelector.h        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -105,8 +105,6 @@
</span><span class="cx"> HashSet<FontSelectorClient*> m_clients;
</span><span class="cx">
</span><span class="cx"> Vector<CachedResourceHandle<CachedFont>> m_fontsToBeginLoading;
</span><del>- HashSet<RefPtr<CSSFontFace>> m_cssConnectionsPossiblyToRemove;
- HashSet<RefPtr<StyleRuleFontFace>> m_cssConnectionsEncounteredDuringBuild;
</del><span class="cx"> Timer m_beginLoadingTimer;
</span><span class="cx">
</span><span class="cx"> unsigned m_uniqueId;
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.cpp (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.cpp        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/css/FontFace.cpp        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -270,13 +270,11 @@
</span><span class="cx">
</span><span class="cx"> String FontFace::family() const
</span><span class="cx"> {
</span><del>- const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
</del><span class="cx"> return m_backing->families()->cssText();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String FontFace::style() const
</span><span class="cx"> {
</span><del>- const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
</del><span class="cx"> switch (m_backing->traitsMask() & FontStyleMask) {
</span><span class="cx"> case FontStyleNormalMask:
</span><span class="cx"> return String("normal", String::ConstructFromLiteral);
</span><span class="lines">@@ -289,7 +287,6 @@
</span><span class="cx">
</span><span class="cx"> String FontFace::weight() const
</span><span class="cx"> {
</span><del>- const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
</del><span class="cx"> switch (m_backing->traitsMask() & FontWeightMask) {
</span><span class="cx"> case FontWeight100Mask:
</span><span class="cx"> return String("100", String::ConstructFromLiteral);
</span><span class="lines">@@ -321,7 +318,6 @@
</span><span class="cx">
</span><span class="cx"> String FontFace::unicodeRange() const
</span><span class="cx"> {
</span><del>- const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
</del><span class="cx"> if (!m_backing->ranges().size())
</span><span class="cx"> return "U+0-10FFFF";
</span><span class="cx"> RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
</span><span class="lines">@@ -332,13 +328,11 @@
</span><span class="cx">
</span><span class="cx"> String FontFace::variant() const
</span><span class="cx"> {
</span><del>- const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
</del><span class="cx"> return computeFontVariant(m_backing->variantSettings())->cssText();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String FontFace::featureSettings() const
</span><span class="cx"> {
</span><del>- const_cast<CSSFontFace&>(m_backing.get()).updateStyleIfNeeded();
</del><span class="cx"> if (!m_backing->featureSettings().size())
</span><span class="cx"> return "normal";
</span><span class="cx"> RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
</span><span class="lines">@@ -365,15 +359,6 @@
</span><span class="cx"> return LoadStatus::Error;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FontFace::adopt(CSSFontFace& newFace)
-{
- m_promise = Nullopt;
- m_backing->removeClient(*this);
- m_backing = newFace;
- m_backing->addClient(*this);
- newFace.setWrapper(*this);
-}
-
</del><span class="cx"> void FontFace::fontStateChanged(CSSFontFace& face, CSSFontFace::Status, CSSFontFace::Status newState)
</span><span class="cx"> {
</span><span class="cx"> ASSERT_UNUSED(face, &face == m_backing.ptr());
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.h (201905 => 201906)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.h        2016-06-10 05:17:48 UTC (rev 201905)
+++ trunk/Source/WebCore/css/FontFace.h        2016-06-10 05:24:46 UTC (rev 201906)
</span><span class="lines">@@ -69,8 +69,6 @@
</span><span class="cx"> Optional<Promise>& promise() { return m_promise; }
</span><span class="cx"> void registerLoaded(Promise&&);
</span><span class="cx">
</span><del>- void adopt(CSSFontFace&);
-
</del><span class="cx"> void load();
</span><span class="cx">
</span><span class="cx"> CSSFontFace& backing() { return m_backing; }
</span></span></pre>
</div>
</div>
</body>
</html>