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

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

Issue 2795173002: Do not show image placeholders for CSS sprites (Closed)
Patch Set: Addressed kouhei comments Created 3 years, 7 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 "platform/CrossOriginAttributeValue.h" 26 #include "platform/CrossOriginAttributeValue.h"
27 #include "platform/loader/fetch/FetchParameters.h"
27 #include "platform/weborigin/Referrer.h" 28 #include "platform/weborigin/Referrer.h"
28 #include "platform/wtf/RefPtr.h" 29 #include "platform/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;
36 37
(...skipping 19 matching lines...) Expand all
56 } 57 }
57 ~CSSImageValue(); 58 ~CSSImageValue();
58 59
59 bool IsCachePending() const { return !cached_image_; } 60 bool IsCachePending() const { return !cached_image_; }
60 StyleImage* CachedImage() const { 61 StyleImage* CachedImage() const {
61 DCHECK(!IsCachePending()); 62 DCHECK(!IsCachePending());
62 return cached_image_.Get(); 63 return cached_image_.Get();
63 } 64 }
64 StyleImage* CacheImage( 65 StyleImage* CacheImage(
65 const Document&, 66 const Document&,
66 CrossOriginAttributeValue = kCrossOriginAttributeNotSet); 67 CrossOriginAttributeValue = kCrossOriginAttributeNotSet,
68 FetchParameters::PlaceholderImageRequestType =
69 FetchParameters::kDisallowPlaceholder);
kouhei (in TOK) 2017/04/28 03:50:50 same here.
Raj 2017/04/28 18:01:21 Done.
67 70
68 const String& Url() const { return absolute_url_; } 71 const String& Url() const { return absolute_url_; }
69 72
70 const Referrer& GetReferrer() const { return referrer_; } 73 const Referrer& GetReferrer() const { return referrer_; }
71 74
72 void ReResolveURL(const Document&) const; 75 void ReResolveURL(const Document&) const;
73 76
74 String CustomCSSText() const; 77 String CustomCSSText() const;
75 78
76 bool HasFailedOrCanceledSubresources() const; 79 bool HasFailedOrCanceledSubresources() const;
(...skipping 25 matching lines...) Expand all
102 // Cached image data. 105 // Cached image data.
103 mutable AtomicString absolute_url_; 106 mutable AtomicString absolute_url_;
104 mutable Member<StyleImage> cached_image_; 107 mutable Member<StyleImage> cached_image_;
105 }; 108 };
106 109
107 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageValue, IsImageValue()); 110 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageValue, IsImageValue());
108 111
109 } // namespace blink 112 } // namespace blink
110 113
111 #endif // CSSImageValue_h 114 #endif // CSSImageValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698