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

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

Issue 1706083002: Split ImageResourceClient into ResourceClient and ImageResourceObserver [1/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 * 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return m_image->imageHasRelativeSize(); 109 return m_image->imageHasRelativeSize();
110 } 110 }
111 111
112 bool StyleFetchedImage::usesImageContainerSize() const 112 bool StyleFetchedImage::usesImageContainerSize() const
113 { 113 {
114 return m_image->usesImageContainerSize(); 114 return m_image->usesImageContainerSize();
115 } 115 }
116 116
117 void StyleFetchedImage::addClient(LayoutObject* layoutObject) 117 void StyleFetchedImage::addClient(LayoutObject* layoutObject)
118 { 118 {
119 m_image->addClient(layoutObject); 119 m_image->addObserver(layoutObject);
120 } 120 }
121 121
122 void StyleFetchedImage::removeClient(LayoutObject* layoutObject) 122 void StyleFetchedImage::removeClient(LayoutObject* layoutObject)
123 { 123 {
124 m_image->removeClient(layoutObject); 124 m_image->removeObserver(layoutObject);
125 } 125 }
126 126
127 void StyleFetchedImage::notifyFinished(Resource* resource) 127 void StyleFetchedImage::notifyFinished(Resource* resource)
128 { 128 {
129 if (m_document && m_image && m_image->getImage() && m_image->getImage()->isS VGImage()) 129 if (m_document && m_image && m_image->getImage() && m_image->getImage()->isS VGImage())
130 toSVGImage(m_image->getImage())->updateUseCounters(*m_document); 130 toSVGImage(m_image->getImage())->updateUseCounters(*m_document);
131 // Oilpan: do not prolong the Document's lifetime. 131 // Oilpan: do not prolong the Document's lifetime.
132 m_document.clear(); 132 m_document.clear();
133 } 133 }
134 134
(...skipping 12 matching lines...) Expand all
147 } 147 }
148 148
149 DEFINE_TRACE(StyleFetchedImage) 149 DEFINE_TRACE(StyleFetchedImage)
150 { 150 {
151 visitor->trace(m_image); 151 visitor->trace(m_image);
152 visitor->trace(m_document); 152 visitor->trace(m_document);
153 StyleImage::trace(visitor); 153 StyleImage::trace(visitor);
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImage.h ('k') | third_party/WebKit/Source/core/style/StyleFetchedImageSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698