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

Unified Diff: third_party/WebKit/Source/core/css/FontFaceSet.cpp

Issue 1406153003: CSS Font Loading: drop readonly to use Setlike functionalities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@font_face_set
Patch Set: insert <br> Created 5 years, 2 months 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: third_party/WebKit/Source/core/css/FontFaceSet.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
index f6ef411b9aab5f2111f514ff2531249dfee2bf7b..19b6746d09ff18493db64546111d63a6458a9c54 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
@@ -257,19 +257,19 @@ ScriptPromise FontFaceSet::ready(ScriptState* scriptState)
return m_ready->promise(scriptState->world());
}
-void FontFaceSet::add(FontFace* fontFace, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<FontFaceSet> FontFaceSet::addForBinding(ScriptState*, FontFace* fontFace, ExceptionState& exceptionState)
{
if (!inActiveDocumentContext())
- return;
+ return this;
if (!fontFace) {
exceptionState.throwTypeError("The argument is not a FontFace.");
- return;
+ return this;
}
if (m_nonCSSConnectedFaces.contains(fontFace))
- return;
+ return this;
if (isCSSConnectedFontFace(fontFace)) {
exceptionState.throwDOMException(InvalidModificationError, "Cannot add a CSS-connected FontFace.");
- return;
+ return this;
}
CSSFontSelector* fontSelector = document()->styleEngine().fontSelector();
m_nonCSSConnectedFaces.add(fontFace);
@@ -277,9 +277,10 @@ void FontFaceSet::add(FontFace* fontFace, ExceptionState& exceptionState)
if (fontFace->loadStatus() == FontFace::Loading)
addToLoadingFonts(fontFace);
fontSelector->fontFaceInvalidated();
+ return this;
}
-void FontFaceSet::clear()
+void FontFaceSet::clearForBinding(ScriptState*, ExceptionState&)
{
if (!inActiveDocumentContext() || m_nonCSSConnectedFaces.isEmpty())
return;
@@ -294,7 +295,7 @@ void FontFaceSet::clear()
fontSelector->fontFaceInvalidated();
}
-bool FontFaceSet::remove(FontFace* fontFace, ExceptionState& exceptionState)
+bool FontFaceSet::deleteForBinding(ScriptState*, FontFace* fontFace, ExceptionState& exceptionState)
{
if (!inActiveDocumentContext())
return false;
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFaceSet.h ('k') | third_party/WebKit/Source/core/css/FontFaceSet.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698