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

Unified Diff: Source/core/css/FontFace.cpp

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed LICENSE and windows build Created 6 years, 5 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: Source/core/css/FontFace.cpp
diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp
index cbb007713ef9c224d7c0925a56571101b22ca816..9cada912a0fd051fb18de21538261f3a712e0b1d 100644
--- a/Source/core/css/FontFace.cpp
+++ b/Source/core/css/FontFace.cpp
@@ -32,6 +32,7 @@
#include "core/css/FontFace.h"
#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/DictionaryHelper.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "bindings/core/v8/ScriptState.h"
@@ -110,32 +111,32 @@ static bool initFontFace(FontFace* fontFace, ExecutionContext* context, const At
return false;
String value;
- if (descriptors.get("style", value)) {
+ if (DictionaryHelper::get(descriptors, "style", value)) {
fontFace->setStyle(context, value, exceptionState);
if (exceptionState.hadException())
return false;
}
- if (descriptors.get("weight", value)) {
+ if (DictionaryHelper::get(descriptors, "weight", value)) {
fontFace->setWeight(context, value, exceptionState);
if (exceptionState.hadException())
return false;
}
- if (descriptors.get("stretch", value)) {
+ if (DictionaryHelper::get(descriptors, "stretch", value)) {
fontFace->setStretch(context, value, exceptionState);
if (exceptionState.hadException())
return false;
}
- if (descriptors.get("unicodeRange", value)) {
+ if (DictionaryHelper::get(descriptors, "unicodeRange", value)) {
fontFace->setUnicodeRange(context, value, exceptionState);
if (exceptionState.hadException())
return false;
}
- if (descriptors.get("variant", value)) {
+ if (DictionaryHelper::get(descriptors, "variant", value)) {
fontFace->setVariant(context, value, exceptionState);
if (exceptionState.hadException())
return false;
}
- if (descriptors.get("featureSettings", value)) {
+ if (DictionaryHelper::get(descriptors, "featureSettings", value)) {
fontFace->setFeatureSettings(context, value, exceptionState);
if (exceptionState.hadException())
return false;

Powered by Google App Engine
This is Rietveld 408576698