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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp

Issue 2625873010: Resolve CSS url(...) non-<image> values against the correct base (Closed)
Patch Set: Rebase Created 3 years, 11 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/parser/CSSPropertyParserHelpers.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
index 20e37e65827ad6ff0ef1e92f28b456e38a8ff695..4b438c255c3c38532d465dcd251db3d9ab353d5b 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
@@ -376,11 +376,13 @@ StringView consumeUrlAsStringView(CSSParserTokenRange& range) {
return StringView();
}
-CSSURIValue* consumeUrl(CSSParserTokenRange& range) {
+CSSURIValue* consumeUrl(CSSParserTokenRange& range,
+ const CSSParserContext* context) {
StringView url = consumeUrlAsStringView(range);
if (url.isNull())
return nullptr;
- return CSSURIValue::create(url.toString());
+ String urlString = url.toString();
+ return CSSURIValue::create(urlString, context->completeURL(urlString));
}
static int clampRGBComponent(const CSSPrimitiveValue& value) {
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698