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

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

Issue 1306283006: BackgroundImage incorrectly returns empty url() when created on-the-fly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/CSSImageValue.cpp
diff --git a/Source/core/css/CSSImageValue.cpp b/Source/core/css/CSSImageValue.cpp
index c4c6b7908d4f683764658f06c2e0ec6c29f2ac86..84b3ef63f15cd4e3aec873d5fbe75a5b6d5df766 100644
--- a/Source/core/css/CSSImageValue.cpp
+++ b/Source/core/css/CSSImageValue.cpp
@@ -108,7 +108,11 @@ bool CSSImageValue::equals(const CSSImageValue& other) const
String CSSImageValue::customCSSText() const
{
- return "url(" + quoteCSSURLIfNeeded(m_absoluteURL) + ")";
+ if (m_absoluteURL.length())
rune 2015/09/08 23:57:28 Gecko is using the relative URL. Looking at the CS
nainar 2015/09/09 00:30:30 Done.
+ return "url(" + quoteCSSURLIfNeeded(m_absoluteURL) + ")";
+ if (m_relativeURL.length())
+ return "url(" + quoteCSSURLIfNeeded(m_relativeURL) + ")";
+ return "url()";
}
bool CSSImageValue::knownToBeOpaque(const LayoutObject* layoutObject) const
« LayoutTests/fast/css/css-imagevalue-url.html ('K') | « LayoutTests/fast/css/css-imagevalue-url.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698