Diff
Modified: trunk/LayoutTests/ChangeLog (171885 => 171886)
--- trunk/LayoutTests/ChangeLog 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/ChangeLog 2014-07-31 21:38:27 UTC (rev 171886)
@@ -1,3 +1,24 @@
+2014-07-31 Bear Travis <[email protected]>
+
+ [CSS Font Loading] Rename document.fontloader to document.fonts
+ https://bugs.webkit.org/show_bug.cgi?id=135393
+
+ Reviewed by Bem Jones-Bey.
+
+ Update tests to use the new document.fonts name.
+
+ * fast/css/fontloader-download-error.html:
+ * fast/css/fontloader-events.html:
+ * fast/css/fontloader-loadingdone.html:
+ * fast/css/fontloader-multiple-faces-download-error-expected.txt:
+ * fast/css/fontloader-multiple-faces-download-error.html:
+ * fast/css/fontloader-multiple-faces-expected.txt:
+ * fast/css/fontloader-multiple-faces.html:
+ * fast/css/fontloader-multiple-families-expected.txt:
+ * fast/css/fontloader-multiple-families.html:
+ * http/tests/webfont/fontloader-loading-attribute-expected.txt:
+ * http/tests/webfont/fontloader-loading-attribute.html:
+
2014-07-31 Andrei Bucur <[email protected]>
REGRESSION: Search highlight is broken in RTL multicolumn content
Modified: trunk/LayoutTests/fast/css/fontloader-download-error.html (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-download-error.html 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-download-error.html 2014-07-31 21:38:27 UTC (rev 171886)
@@ -47,11 +47,11 @@
}
function runTests() {
- document.fontloader.addEventListener('loadstart', logEvent);
- document.fontloader.addEventListener('load', logEvent);
- document.fontloader.addEventListener('error', logEvent);
+ document.fonts.addEventListener('loadstart', logEvent);
+ document.fonts.addEventListener('load', logEvent);
+ document.fonts.addEventListener('error', logEvent);
- document.fontloader.notifyWhenFontsReady(function() {
+ document.fonts.notifyWhenFontsReady(function() {
shouldBe("events['myfont1']", "['loadstart', 'error']");
shouldBe("events['myfont2']", "['loadstart', 'error']");
shouldBe("events['myfont3']", "['loadstart', 'error']");
@@ -61,10 +61,10 @@
});
}
-if (document.fontloader)
+if (document.fonts)
runTests();
else {
- testFailed('document.fontloader does not exist');
+ testFailed('document.fonts does not exist');
finishJSTest();
}
</script>
Modified: trunk/LayoutTests/fast/css/fontloader-events.html (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-events.html 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-events.html 2014-07-31 21:38:27 UTC (rev 171886)
@@ -22,22 +22,22 @@
}
function runTests() {
- document.fontloader._onloading_ = handleEvent;
- document.fontloader._onloadingdone_ = handleEvent;
- document.fontloader._onloadstart_ = handleEvent;
- document.fontloader._onload_ = handleEvent;
- document.fontloader._onerror_ = handleEvent;
+ document.fonts._onloading_ = handleEvent;
+ document.fonts._onloadingdone_ = handleEvent;
+ document.fonts._onloadstart_ = handleEvent;
+ document.fonts._onload_ = handleEvent;
+ document.fonts._onerror_ = handleEvent;
- document.fontloader.notifyWhenFontsReady(function() {
+ document.fonts.notifyWhenFontsReady(function() {
shouldBe('numberOfEvents', '4');
finishJSTest();
});
}
-if (document.fontloader)
+if (document.fonts)
runTests();
else {
- testFailed('document.fontloader does not exist');
+ testFailed('document.fonts does not exist');
finishJSTest();
}
</script>
Modified: trunk/LayoutTests/fast/css/fontloader-loadingdone.html (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-loadingdone.html 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-loadingdone.html 2014-07-31 21:38:27 UTC (rev 171886)
@@ -22,23 +22,23 @@
window.jsTestIsAsync = true;
function runTests() {
- document.fontloader._onloadingdone_ = function() {
+ document.fonts._onloadingdone_ = function() {
debug('loadingdone');
testDiv = document.getElementById('test');
shouldBeEqualToString('window.getComputedStyle(testDiv, 0).width', '48px');
};
- document.fontloader.notifyWhenFontsReady(function() {
+ document.fonts.notifyWhenFontsReady(function() {
debug('notifyWhenFontsReady() callback');
shouldBeEqualToString('window.getComputedStyle(testDiv, 0).width', '48px');
finishJSTest();
});
}
-if (document.fontloader)
+if (document.fonts)
runTests();
else {
- testFailed('document.fontloader does not exist');
+ testFailed('document.fonts does not exist');
finishJSTest();
}
</script>
Modified: trunk/LayoutTests/fast/css/fontloader-multiple-faces-download-error-expected.txt (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-multiple-faces-download-error-expected.txt 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-multiple-faces-download-error-expected.txt 2014-07-31 21:38:27 UTC (rev 171886)
@@ -8,7 +8,7 @@
PASS events['load'] is 1
PASS events['error'] is 1
PASS events['loadingdone'] is undefined
-PASS document.fontloader.checkFont('10px TestFont') is false
+PASS document.fonts.checkFont('10px TestFont') is false
PASS events['loadingdone'] is 1
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/css/fontloader-multiple-faces-download-error.html (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-multiple-faces-download-error.html 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-multiple-faces-download-error.html 2014-07-31 21:38:27 UTC (rev 171886)
@@ -27,14 +27,14 @@
}
function runTests() {
- document.fontloader.addEventListener('loading', countEvent);
- document.fontloader.addEventListener('loadstart', countEvent);
- document.fontloader.addEventListener('load', countEvent);
- document.fontloader.addEventListener('error', countEvent);
- document.fontloader.addEventListener('loadingdone', countEvent);
+ document.fonts.addEventListener('loading', countEvent);
+ document.fonts.addEventListener('loadstart', countEvent);
+ document.fonts.addEventListener('load', countEvent);
+ document.fonts.addEventListener('error', countEvent);
+ document.fonts.addEventListener('loadingdone', countEvent);
- document.fontloader.loadFont({ font: '10px TestFont', onsuccess: onsuccess, onerror: onerror });
- document.fontloader.notifyWhenFontsReady(verify);
+ document.fonts.loadFont({ font: '10px TestFont', onsuccess: onsuccess, onerror: onerror });
+ document.fonts.notifyWhenFontsReady(verify);
}
function onsuccess() {
@@ -48,7 +48,7 @@
shouldBe("events['load']", "1");
shouldBe("events['error']", "1");
shouldBe("events['loadingdone']", "undefined");
- shouldBe("document.fontloader.checkFont('10px TestFont')", "false");
+ shouldBe("document.fonts.checkFont('10px TestFont')", "false");
}
function verify() {
@@ -56,10 +56,10 @@
finishJSTest();
}
-if (document.fontloader)
+if (document.fonts)
runTests();
else {
- testFailed('document.fontloader does not exist');
+ testFailed('document.fonts does not exist');
finishJSTest();
}
</script>
Modified: trunk/LayoutTests/fast/css/fontloader-multiple-faces-expected.txt (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-multiple-faces-expected.txt 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-multiple-faces-expected.txt 2014-07-31 21:38:27 UTC (rev 171886)
@@ -8,7 +8,7 @@
PASS events['load'] is 2
PASS events['error'] is undefined
PASS events['loadingdone'] is undefined
-PASS document.fontloader.checkFont('10px TestFont') is true
+PASS document.fonts.checkFont('10px TestFont') is true
PASS events['loadingdone'] is 1
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/css/fontloader-multiple-faces.html (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-multiple-faces.html 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-multiple-faces.html 2014-07-31 21:38:27 UTC (rev 171886)
@@ -27,14 +27,14 @@
}
function runTests() {
- document.fontloader.addEventListener('loading', countEvent);
- document.fontloader.addEventListener('loadstart', countEvent);
- document.fontloader.addEventListener('load', countEvent);
- document.fontloader.addEventListener('error', countEvent);
- document.fontloader.addEventListener('loadingdone', countEvent);
+ document.fonts.addEventListener('loading', countEvent);
+ document.fonts.addEventListener('loadstart', countEvent);
+ document.fonts.addEventListener('load', countEvent);
+ document.fonts.addEventListener('error', countEvent);
+ document.fonts.addEventListener('loadingdone', countEvent);
- document.fontloader.loadFont({ font: '10px TestFont', onsuccess: onsuccess, onerror: onerror });
- document.fontloader.notifyWhenFontsReady(verify);
+ document.fonts.loadFont({ font: '10px TestFont', onsuccess: onsuccess, onerror: onerror });
+ document.fonts.notifyWhenFontsReady(verify);
}
function onsuccess() {
@@ -43,7 +43,7 @@
shouldBe("events['load']", "2");
shouldBe("events['error']", "undefined");
shouldBe("events['loadingdone']", "undefined");
- shouldBe("document.fontloader.checkFont('10px TestFont')", "true");
+ shouldBe("document.fonts.checkFont('10px TestFont')", "true");
}
function onerror() {
@@ -56,10 +56,10 @@
finishJSTest();
}
-if (document.fontloader)
+if (document.fonts)
runTests();
else {
- testFailed('document.fontloader does not exist');
+ testFailed('document.fonts does not exist');
finishJSTest();
}
</script>
Modified: trunk/LayoutTests/fast/css/fontloader-multiple-families-expected.txt (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-multiple-families-expected.txt 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-multiple-families-expected.txt 2014-07-31 21:38:27 UTC (rev 171886)
@@ -8,7 +8,7 @@
PASS events['load'] is 2
PASS events['error'] is undefined
PASS events['loadingdone'] is undefined
-PASS document.fontloader.checkFont('10px TestFont1, TestFont2') is true
+PASS document.fonts.checkFont('10px TestFont1, TestFont2') is true
PASS events['loadingdone'] is 1
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/css/fontloader-multiple-families.html (171885 => 171886)
--- trunk/LayoutTests/fast/css/fontloader-multiple-families.html 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/fast/css/fontloader-multiple-families.html 2014-07-31 21:38:27 UTC (rev 171886)
@@ -27,14 +27,14 @@
}
function runTests() {
- document.fontloader.addEventListener('loading', countEvent);
- document.fontloader.addEventListener('loadstart', countEvent);
- document.fontloader.addEventListener('load', countEvent);
- document.fontloader.addEventListener('error', countEvent);
- document.fontloader.addEventListener('loadingdone', countEvent);
+ document.fonts.addEventListener('loading', countEvent);
+ document.fonts.addEventListener('loadstart', countEvent);
+ document.fonts.addEventListener('load', countEvent);
+ document.fonts.addEventListener('error', countEvent);
+ document.fonts.addEventListener('loadingdone', countEvent);
- document.fontloader.loadFont({ font: '10px TestFont1, TestFont2', onsuccess: onsuccess, onerror: onerror });
- document.fontloader.notifyWhenFontsReady(verify);
+ document.fonts.loadFont({ font: '10px TestFont1, TestFont2', onsuccess: onsuccess, onerror: onerror });
+ document.fonts.notifyWhenFontsReady(verify);
}
function onsuccess() {
@@ -43,7 +43,7 @@
shouldBe("events['load']", "2");
shouldBe("events['error']", "undefined");
shouldBe("events['loadingdone']", "undefined");
- shouldBe("document.fontloader.checkFont('10px TestFont1, TestFont2')", "true");
+ shouldBe("document.fonts.checkFont('10px TestFont1, TestFont2')", "true");
}
function onerror() {
@@ -55,10 +55,10 @@
finishJSTest();
}
-if (document.fontloader)
+if (document.fonts)
runTests();
else {
- testFailed('document.fontloader does not exist');
+ testFailed('document.fonts does not exist');
finishJSTest();
}
</script>
Modified: trunk/LayoutTests/http/tests/webfont/fontloader-loading-attribute-expected.txt (171885 => 171886)
--- trunk/LayoutTests/http/tests/webfont/fontloader-loading-attribute-expected.txt 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/http/tests/webfont/fontloader-loading-attribute-expected.txt 2014-07-31 21:38:27 UTC (rev 171886)
@@ -3,11 +3,11 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.fontloader.checkFont('10px TestFont') is false
-PASS document.fontloader.loading is false
-PASS document.fontloader.loading is true
-PASS document.fontloader.checkFont('10px TestFont') is true
-PASS document.fontloader.loading is false
+PASS document.fonts.checkFont('10px TestFont') is false
+PASS document.fonts.loading is false
+PASS document.fonts.loading is true
+PASS document.fonts.checkFont('10px TestFont') is true
+PASS document.fonts.loading is false
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/webfont/fontloader-loading-attribute.html (171885 => 171886)
--- trunk/LayoutTests/http/tests/webfont/fontloader-loading-attribute.html 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/LayoutTests/http/tests/webfont/fontloader-loading-attribute.html 2014-07-31 21:38:27 UTC (rev 171886)
@@ -13,22 +13,22 @@
window.jsTestIsAsync = true;
function runTests() {
- shouldBe("document.fontloader.checkFont('10px TestFont')", "false");
- shouldBe("document.fontloader.loading", "false");
- document.fontloader.loadFont({ font: '10px TestFont', onsuccess: onsuccess });
- shouldBe("document.fontloader.loading", "true");
+ shouldBe("document.fonts.checkFont('10px TestFont')", "false");
+ shouldBe("document.fonts.loading", "false");
+ document.fonts.loadFont({ font: '10px TestFont', onsuccess: onsuccess });
+ shouldBe("document.fonts.loading", "true");
}
function onsuccess() {
- shouldBe("document.fontloader.checkFont('10px TestFont')", "true");
- shouldBe("document.fontloader.loading", "false");
+ shouldBe("document.fonts.checkFont('10px TestFont')", "true");
+ shouldBe("document.fonts.loading", "false");
finishJSTest();
}
-if (document.fontloader)
+if (document.fonts)
runTests();
else {
- testFailed('document.fontloader does not exist');
+ testFailed('document.fonts does not exist');
finishJSTest();
}
</script>
Modified: trunk/Source/WebCore/ChangeLog (171885 => 171886)
--- trunk/Source/WebCore/ChangeLog 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/Source/WebCore/ChangeLog 2014-07-31 21:38:27 UTC (rev 171886)
@@ -1,3 +1,28 @@
+2014-07-31 Bear Travis <[email protected]>
+
+ [CSS Font Loading] Rename document.fontloader to document.fonts
+ https://bugs.webkit.org/show_bug.cgi?id=135393
+
+ Reviewed by Bem Jones-Bey.
+
+ The most recent version of the specification has renamed
+ document.fontloader to document.fonts. This change updates the
+ names in WebCore and LayoutTests.
+
+ Fixed up existing tests under LayoutTests/fast/css/fontloader-*
+ and LayoutTests/http/webfont/fontloader-*
+
+ * css/CSSFontFace.cpp:
+ (WebCore::CSSFontFace::notifyFontLoader):
+ (WebCore::CSSFontFace::notifyLoadingDone):
+ * dom/Document.cpp:
+ (WebCore::Document::fonts):
+ (WebCore::Document::fontloader): Deleted.
+ * dom/Document.h:
+ * dom/Document.idl:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::performPostLayoutTasks):
+
2014-07-31 Andrei Bucur <[email protected]>
REGRESSION: Search highlight is broken in RTL multicolumn content
Modified: trunk/Source/WebCore/css/CSSFontFace.cpp (171885 => 171886)
--- trunk/Source/WebCore/css/CSSFontFace.cpp 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/Source/WebCore/css/CSSFontFace.cpp 2014-07-31 21:38:27 UTC (rev 171886)
@@ -156,13 +156,13 @@
switch (newState) {
case Loading:
- document->fontloader()->beginFontLoading(m_rule.get());
+ document->fonts()->beginFontLoading(m_rule.get());
break;
case Loaded:
- document->fontloader()->fontLoaded(m_rule.get());
+ document->fonts()->fontLoaded(m_rule.get());
break;
case Error:
- document->fontloader()->loadError(m_rule.get(), m_activeSource);
+ document->fonts()->loadError(m_rule.get(), m_activeSource);
break;
default:
break;
@@ -173,7 +173,7 @@
{
Document* document = (*m_segmentedFontFaces.begin())->fontSelector()->document();
if (document)
- document->fontloader()->loadingDone();
+ document->fonts()->loadingDone();
}
#endif
Modified: trunk/Source/WebCore/dom/Document.cpp (171885 => 171886)
--- trunk/Source/WebCore/dom/Document.cpp 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/Source/WebCore/dom/Document.cpp 2014-07-31 21:38:27 UTC (rev 171886)
@@ -6074,7 +6074,7 @@
#endif
#if ENABLE(FONT_LOAD_EVENTS)
-PassRefPtr<FontLoader> Document::fontloader()
+PassRefPtr<FontLoader> Document::fonts()
{
if (!m_fontloader)
m_fontloader = FontLoader::create(this);
Modified: trunk/Source/WebCore/dom/Document.h (171885 => 171886)
--- trunk/Source/WebCore/dom/Document.h 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/Source/WebCore/dom/Document.h 2014-07-31 21:38:27 UTC (rev 171886)
@@ -1265,7 +1265,7 @@
virtual SecurityOrigin* topOrigin() const override;
#if ENABLE(FONT_LOAD_EVENTS)
- PassRefPtr<FontLoader> fontloader();
+ PassRefPtr<FontLoader> fonts();
#endif
void ensurePlugInsInjectedScript(DOMWrapperWorld&);
Modified: trunk/Source/WebCore/dom/Document.idl (171885 => 171886)
--- trunk/Source/WebCore/dom/Document.idl 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/Source/WebCore/dom/Document.idl 2014-07-31 21:38:27 UTC (rev 171886)
@@ -238,7 +238,7 @@
[Conditional=CSS_REGIONS] DOMNamedFlowCollection webkitGetNamedFlows();
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
- [Conditional=FONT_LOAD_EVENTS] readonly attribute FontLoader fontloader;
+ [Conditional=FONT_LOAD_EVENTS] readonly attribute FontLoader fonts;
#endif
#if (!defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C) && (!defined(LANGUAGE_GOBJECT) || !LANGUAGE_GOBJECT)
Modified: trunk/Source/WebCore/page/FrameView.cpp (171885 => 171886)
--- trunk/Source/WebCore/page/FrameView.cpp 2014-07-31 21:00:45 UTC (rev 171885)
+++ trunk/Source/WebCore/page/FrameView.cpp 2014-07-31 21:38:27 UTC (rev 171886)
@@ -2831,7 +2831,7 @@
#if ENABLE(FONT_LOAD_EVENTS)
if (RuntimeEnabledFeatures::sharedFeatures().fontLoadEventsEnabled())
- frame().document()->fontloader()->didLayout();
+ frame().document()->fonts()->didLayout();
#endif
// FIXME: We should consider adding DidLayout as a LayoutMilestone. That would let us merge this