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

Side by Side Diff: sky/engine/core/css/CSSImageValue.cpp

Issue 799113003: Remove hasFailedOrCanceledSubresources. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/CSSImageValue.h ('k') | sky/engine/core/css/CSSValue.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 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,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return; 78 return;
79 79
80 ImageResource* resource = m_image->cachedImage(); 80 ImageResource* resource = m_image->cachedImage();
81 if (!resource) 81 if (!resource)
82 return; 82 return;
83 83
84 FetchRequest request(ResourceRequest(m_absoluteURL), m_initiatorName.isEmpty () ? FetchInitiatorTypeNames::css : m_initiatorName, resource->options()); 84 FetchRequest request(ResourceRequest(m_absoluteURL), m_initiatorName.isEmpty () ? FetchInitiatorTypeNames::css : m_initiatorName, resource->options());
85 document.fetcher()->requestLoadStarted(resource, request, ResourceFetcher::R esourceLoadingFromCache); 85 document.fetcher()->requestLoadStarted(resource, request, ResourceFetcher::R esourceLoadingFromCache);
86 } 86 }
87 87
88 bool CSSImageValue::hasFailedOrCanceledSubresources() const
89 {
90 if (!m_image || !m_image->isImageResource())
91 return false;
92 if (Resource* cachedResource = toStyleFetchedImage(m_image)->cachedImage())
93 return cachedResource->loadFailedOrCanceled();
94 return true;
95 }
96
97 bool CSSImageValue::equals(const CSSImageValue& other) const 88 bool CSSImageValue::equals(const CSSImageValue& other) const
98 { 89 {
99 return m_absoluteURL == other.m_absoluteURL; 90 return m_absoluteURL == other.m_absoluteURL;
100 } 91 }
101 92
102 String CSSImageValue::customCSSText() const 93 String CSSImageValue::customCSSText() const
103 { 94 {
104 return "url(" + quoteCSSURLIfNeeded(m_absoluteURL) + ")"; 95 return "url(" + quoteCSSURLIfNeeded(m_absoluteURL) + ")";
105 } 96 }
106 97
(...skipping 14 matching lines...) Expand all
121 { 112 {
122 KURL url = document.completeURL(m_relativeURL); 113 KURL url = document.completeURL(m_relativeURL);
123 if (url == m_absoluteURL) 114 if (url == m_absoluteURL)
124 return; 115 return;
125 m_absoluteURL = url.string(); 116 m_absoluteURL = url.string();
126 m_accessedImage = false; 117 m_accessedImage = false;
127 m_image.clear(); 118 m_image.clear();
128 } 119 }
129 120
130 } // namespace blink 121 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSImageValue.h ('k') | sky/engine/core/css/CSSValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698