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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImage.cpp

Issue 2474093003: Don't use url from ImageResource for computed style. (Closed)
Patch Set: Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-backgroundImage-expected.txt ('k') | no next file » | 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 WrappedImagePtr StyleFetchedImage::data() const { 50 WrappedImagePtr StyleFetchedImage::data() const {
51 return m_image.get(); 51 return m_image.get();
52 } 52 }
53 53
54 ImageResource* StyleFetchedImage::cachedImage() const { 54 ImageResource* StyleFetchedImage::cachedImage() const {
55 return m_image.get(); 55 return m_image.get();
56 } 56 }
57 57
58 CSSValue* StyleFetchedImage::cssValue() const { 58 CSSValue* StyleFetchedImage::cssValue() const {
59 return CSSImageValue::create(m_image->url(), 59 return CSSImageValue::create(m_url, const_cast<StyleFetchedImage*>(this));
60 const_cast<StyleFetchedImage*>(this));
61 } 60 }
62 61
63 CSSValue* StyleFetchedImage::computedCSSValue() const { 62 CSSValue* StyleFetchedImage::computedCSSValue() const {
64 return cssValue(); 63 return cssValue();
65 } 64 }
66 65
67 bool StyleFetchedImage::canRender() const { 66 bool StyleFetchedImage::canRender() const {
68 return !m_image->errorOccurred() && !m_image->getImage()->isNull(); 67 return !m_image->errorOccurred() && !m_image->getImage()->isNull();
69 } 68 }
70 69
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 135 }
137 136
138 DEFINE_TRACE(StyleFetchedImage) { 137 DEFINE_TRACE(StyleFetchedImage) {
139 visitor->trace(m_image); 138 visitor->trace(m_image);
140 visitor->trace(m_document); 139 visitor->trace(m_document);
141 StyleImage::trace(visitor); 140 StyleImage::trace(visitor);
142 ResourceClient::trace(visitor); 141 ResourceClient::trace(visitor);
143 } 142 }
144 143
145 } // namespace blink 144 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-backgroundImage-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698