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

Unified Diff: third_party/WebKit/Source/core/css/CSSURIValue.h

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/CSSURIValue.h
diff --git a/third_party/WebKit/Source/core/css/CSSURIValue.h b/third_party/WebKit/Source/core/css/CSSURIValue.h
index 500686c13d0966a11350c7fe42dbcd704cb0c277..80118f6584fd3329482d5dca9ce41770c09ff173 100644
--- a/third_party/WebKit/Source/core/css/CSSURIValue.h
+++ b/third_party/WebKit/Source/core/css/CSSURIValue.h
@@ -11,30 +11,43 @@
namespace blink {
class Document;
+class KURL;
class SVGElementProxy;
class CSSURIValue : public CSSValue {
public:
- static CSSURIValue* create(const String& str) { return new CSSURIValue(str); }
+ static CSSURIValue* create(const String& relativeUrl, const KURL& url) {
+ return new CSSURIValue(AtomicString(relativeUrl), url);
+ }
+ static CSSURIValue* create(const AtomicString& absoluteUrl) {
+ return new CSSURIValue(absoluteUrl, absoluteUrl);
+ }
~CSSURIValue();
- SVGElementProxy& ensureElementProxy(Document&) const;
+ SVGElementProxy& ensureElementProxy(const Document&) const;
+ void reResolveUrl(const Document&) const;
- const String& value() const { return m_url; }
- const String& url() const { return m_url; }
+ const String& value() const { return m_relativeUrl; }
String customCSSText() const;
+ bool isLocal(const Document&) const;
bool equals(const CSSURIValue&) const;
DECLARE_TRACE_AFTER_DISPATCH();
private:
- explicit CSSURIValue(const String&);
+ CSSURIValue(const AtomicString&, const KURL&);
+ CSSURIValue(const AtomicString& relativeUrl, const AtomicString& absoluteUrl);
- String m_url;
+ KURL absoluteUrl() const;
+ AtomicString fragmentIdentifier() const;
+
+ AtomicString m_relativeUrl;
+ bool m_isLocal;
mutable Member<SVGElementProxy> m_proxy;
+ mutable AtomicString m_absoluteUrl;
};
DEFINE_CSS_VALUE_TYPE_CASTS(CSSURIValue, isURIValue());
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp ('k') | third_party/WebKit/Source/core/css/CSSURIValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698