diff options
Diffstat (limited to 'extensions/common/image_util.cc')
-rw-r--r-- | extensions/common/image_util.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/common/image_util.cc b/extensions/common/image_util.cc index efad19b..6a8e13a 100644 --- a/extensions/common/image_util.cc +++ b/extensions/common/image_util.cc @@ -13,6 +13,7 @@ #include "base/strings/stringprintf.h" #include "third_party/re2/src/re2/re2.h" #include "third_party/skia/include/core/SkColor.h" +#include "third_party/skia/include/utils/SkParse.h" #include "ui/gfx/color_utils.h" namespace extensions { @@ -29,6 +30,11 @@ bool ParseCssColorString(const std::string& color_string, SkColor* result) { NOTIMPLEMENTED(); return false; } + if (SkParse::FindNamedColor(color_string.c_str(), color_string.size(), + result) != nullptr) { + return true; + } + return false; } |