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

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

Issue 2718273002: Resolve background image's url if absolute url is empty (Closed)
Patch Set: Resolve background image url before use Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/backgrounds/background-image-relative-url-in-iframe-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSImageValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSImageValue.cpp b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
index 74b63bc1ad9ccc5080eca784cf6f9f77d682e66b..24aed39f22c80831b316c7c7491facc5950e197c 100644
--- a/third_party/WebKit/Source/core/css/CSSImageValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
@@ -53,6 +53,8 @@ CSSImageValue::~CSSImageValue() {}
StyleImage* CSSImageValue::cacheImage(const Document& document,
CrossOriginAttributeValue crossOrigin) {
if (!m_cachedImage) {
+ if (m_absoluteURL.isEmpty())
+ reResolveURL(document);
FetchRequest request(ResourceRequest(m_absoluteURL),
m_initiatorName.isEmpty()
? FetchInitiatorTypeNames::css
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/backgrounds/background-image-relative-url-in-iframe-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698