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

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

Issue 23685007: Have SVGURIReference API deal with Document references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « no previous file | Source/core/css/resolver/FilterOperationResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSCursorImageValue.cpp
diff --git a/Source/core/css/CSSCursorImageValue.cpp b/Source/core/css/CSSCursorImageValue.cpp
index 5b493a28fc648a62e9e580b570b598e41ce2847c..24caef773da3770a51b37011994a0a3339594cbe 100644
--- a/Source/core/css/CSSCursorImageValue.cpp
+++ b/Source/core/css/CSSCursorImageValue.cpp
@@ -39,7 +39,7 @@
namespace WebCore {
-static inline SVGCursorElement* resourceReferencedByCursorElement(const String& url, Document* document)
+static inline SVGCursorElement* resourceReferencedByCursorElement(const String& url, Document& document)
{
Element* element = SVGURIReference::targetElementFromIRIString(url, document);
if (element && element->hasTagName(SVGNames::cursorTag))
@@ -69,7 +69,7 @@ CSSCursorImageValue::~CSSCursorImageValue()
for (; it != end; ++it) {
SVGElement* referencedElement = *it;
referencedElement->cursorImageValueRemoved();
- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, &referencedElement->document()))
+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, referencedElement->document()))
cursorElement->removeClient(referencedElement);
}
}
@@ -96,7 +96,7 @@ bool CSSCursorImageValue::updateIfSVGCursorIsUsed(Element* element)
return false;
String url = toCSSImageValue(m_imageValue.get())->url();
- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, &element->document())) {
+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, element->document())) {
// FIXME: This will override hot spot specified in CSS, which is probably incorrect.
SVGLengthContext lengthContext(0);
m_hasHotSpot = true;
@@ -133,7 +133,7 @@ StyleImage* CSSCursorImageValue::cachedImage(ResourceFetcher* loader, float devi
if (isSVGCursor() && loader && loader->document()) {
RefPtr<CSSImageValue> imageValue = toCSSImageValue(m_imageValue.get());
// FIXME: This will fail if the <cursor> element is in a shadow DOM (bug 59827)
- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(imageValue->url(), loader->document())) {
+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(imageValue->url(), *loader->document())) {
RefPtr<CSSImageValue> svgImageValue = CSSImageValue::create(cursorElement->hrefCurrentValue());
StyleFetchedImage* cachedImage = svgImageValue->cachedImage(loader);
m_image = cachedImage;
« no previous file with comments | « no previous file | Source/core/css/resolver/FilterOperationResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698