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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSImageValue.h

Issue 2710113002: DO NOT SUBMIT really old prototype of sprite recognition for image replacement
Patch Set: Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef CSSImageValue_h 21 #ifndef CSSImageValue_h
22 #define CSSImageValue_h 22 #define CSSImageValue_h
23 23
24 #include "core/CoreExport.h" 24 #include "core/CoreExport.h"
25 #include "core/css/CSSValue.h" 25 #include "core/css/CSSValue.h"
26 #include "core/fetch/ImageResource.h"
26 #include "platform/CrossOriginAttributeValue.h" 27 #include "platform/CrossOriginAttributeValue.h"
27 #include "platform/weborigin/Referrer.h" 28 #include "platform/weborigin/Referrer.h"
28 #include "wtf/RefPtr.h" 29 #include "wtf/RefPtr.h"
29 30
30 namespace blink { 31 namespace blink {
31 32
32 class Document; 33 class Document;
33 class KURL; 34 class KURL;
34 class StyleImage; 35 class StyleImage;
35 class LayoutObject; 36 class LayoutObject;
(...skipping 13 matching lines...) Expand all
49 return new CSSImageValue(rawValue, url, image); 50 return new CSSImageValue(rawValue, url, image);
50 } 51 }
51 static CSSImageValue* create(const AtomicString& absoluteURL) 52 static CSSImageValue* create(const AtomicString& absoluteURL)
52 { 53 {
53 return new CSSImageValue(absoluteURL); 54 return new CSSImageValue(absoluteURL);
54 } 55 }
55 ~CSSImageValue(); 56 ~CSSImageValue();
56 57
57 bool isCachePending() const { return !m_cachedImage; } 58 bool isCachePending() const { return !m_cachedImage; }
58 StyleImage* cachedImage() const { ASSERT(!isCachePending()); return m_cached Image.get(); } 59 StyleImage* cachedImage() const { ASSERT(!isCachePending()); return m_cached Image.get(); }
59 StyleImage* cacheImage(const Document&, CrossOriginAttributeValue = CrossOri ginAttributeNotSet); 60
61 StyleImage* cacheImage(const Document&, CrossOriginAttributeValue = CrossOri ginAttributeNotSet, ImageResource::PlaceholderRequestType = ImageResource::Place holderRequestType::DisallowPlaceholder);
60 62
61 const String& url() const { return m_absoluteURL; } 63 const String& url() const { return m_absoluteURL; }
62 64
63 void setReferrer(const Referrer& referrer) { m_referrer = referrer; } 65 void setReferrer(const Referrer& referrer) { m_referrer = referrer; }
64 const Referrer& referrer() const { return m_referrer; } 66 const Referrer& referrer() const { return m_referrer; }
65 67
66 void reResolveURL(const Document&) const; 68 void reResolveURL(const Document&) const;
67 69
68 String customCSSText() const; 70 String customCSSText() const;
69 71
(...skipping 24 matching lines...) Expand all
94 // Cached image data. 96 // Cached image data.
95 mutable AtomicString m_absoluteURL; 97 mutable AtomicString m_absoluteURL;
96 mutable Member<StyleImage> m_cachedImage; 98 mutable Member<StyleImage> m_cachedImage;
97 }; 99 };
98 100
99 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageValue, isImageValue()); 101 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageValue, isImageValue());
100 102
101 } // namespace blink 103 } // namespace blink
102 104
103 #endif // CSSImageValue_h 105 #endif // CSSImageValue_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSImageSetValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSImageValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698