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

Side by Side Diff: Source/core/css/CSSCursorImageValue.cpp

Issue 130623002: Clean up static_cast<SVGFooElement*> by using toSVGFoo() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/svg/SVGAltGlyphDefElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Rob Buis <buis@kde.org> 2 * Copyright (C) 2006 Rob Buis <buis@kde.org>
3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 24 matching lines...) Expand all
35 #include "core/svg/SVGURIReference.h" 35 #include "core/svg/SVGURIReference.h"
36 #include "wtf/MathExtras.h" 36 #include "wtf/MathExtras.h"
37 #include "wtf/text/WTFString.h" 37 #include "wtf/text/WTFString.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 static inline SVGCursorElement* resourceReferencedByCursorElement(const String& url, Document& document) 41 static inline SVGCursorElement* resourceReferencedByCursorElement(const String& url, Document& document)
42 { 42 {
43 Element* element = SVGURIReference::targetElementFromIRIString(url, document ); 43 Element* element = SVGURIReference::targetElementFromIRIString(url, document );
44 if (element && element->hasTagName(SVGNames::cursorTag)) 44 if (element && element->hasTagName(SVGNames::cursorTag))
45 return static_cast<SVGCursorElement*>(element); 45 return toSVGCursorElement(element);
46 46
47 return 0; 47 return 0;
48 } 48 }
49 49
50 CSSCursorImageValue::CSSCursorImageValue(PassRefPtr<CSSValue> imageValue, bool h asHotSpot, const IntPoint& hotSpot) 50 CSSCursorImageValue::CSSCursorImageValue(PassRefPtr<CSSValue> imageValue, bool h asHotSpot, const IntPoint& hotSpot)
51 : CSSValue(CursorImageClass) 51 : CSSValue(CursorImageClass)
52 , m_imageValue(imageValue) 52 , m_imageValue(imageValue)
53 , m_hasHotSpot(hasHotSpot) 53 , m_hasHotSpot(hasHotSpot)
54 , m_hotSpot(hotSpot) 54 , m_hotSpot(hotSpot)
55 , m_accessedImage(false) 55 , m_accessedImage(false)
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 m_referencedElements.remove(element); 189 m_referencedElements.remove(element);
190 } 190 }
191 191
192 bool CSSCursorImageValue::equals(const CSSCursorImageValue& other) const 192 bool CSSCursorImageValue::equals(const CSSCursorImageValue& other) const
193 { 193 {
194 return m_hasHotSpot ? other.m_hasHotSpot && m_hotSpot == other.m_hotSpot : ! other.m_hasHotSpot 194 return m_hasHotSpot ? other.m_hasHotSpot && m_hotSpot == other.m_hotSpot : ! other.m_hasHotSpot
195 && compareCSSValuePtr(m_imageValue, other.m_imageValue); 195 && compareCSSValuePtr(m_imageValue, other.m_imageValue);
196 } 196 }
197 197
198 } // namespace WebCore 198 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGAltGlyphDefElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698