Chromium Code Reviews| Index: Source/core/dom/Document.cpp |
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
| index 02613ffb62168ff2fce5286458324ac3915ce6b6..74310e8aa4369c6440bcb9758a6d1729378dde0e 100644 |
| --- a/Source/core/dom/Document.cpp |
| +++ b/Source/core/dom/Document.cpp |
| @@ -52,6 +52,7 @@ |
| #include "core/css/StyleSheetContents.h" |
| #include "core/css/StyleSheetList.h" |
| #include "core/css/invalidation/StyleInvalidator.h" |
| +#include "core/css/parser/CSSPropertyParser.h" |
| #include "core/css/resolver/FontBuilder.h" |
| #include "core/css/resolver/StyleResolver.h" |
| #include "core/css/resolver/StyleResolverStats.h" |
| @@ -4735,6 +4736,16 @@ Vector<IconURL> Document::iconURLs(int iconTypesMask) |
| return iconURLs; |
| } |
| +Color Document::brandColor() const |
| +{ |
| + for (HTMLMetaElement* metaElement = head() ? Traversal<HTMLMetaElement>::firstChild(*head()) : 0; metaElement; metaElement = Traversal<HTMLMetaElement>::nextSibling(*metaElement)) { |
| + RGBA32 rgb; |
| + if (equalIgnoringCase(metaElement->name(), "brand-color") && CSSPropertyParser::fastParseColor(rgb, metaElement->content().string(), true)) |
|
michaelbai
2014/06/12 23:47:58
Knew I shouldn't use CSSPropertyParser::fastParseC
abarth-chromium
2014/06/13 05:40:41
fastParseColor is fine. Do you want to strip lead
michaelbai
2014/06/13 19:56:51
Striped the spaces, and added test
|
| + return Color(rgb); |
| + } |
| + return Color(); |
| +} |
| + |
| HTMLLinkElement* Document::linkManifest() const |
| { |
| HTMLHeadElement* head = this->head(); |