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

Side by Side Diff: sky/engine/core/rendering/style/ContentData.cpp

Issue 709213002: Remove ContentData. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
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
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 *
20 */
21
22 #include "config.h"
23 #include "core/rendering/style/ContentData.h"
24
25 #include "core/rendering/RenderImage.h"
26 #include "core/rendering/RenderImageResource.h"
27 #include "core/rendering/RenderImageResourceStyleImage.h"
28 #include "core/rendering/style/RenderStyle.h"
29
30 namespace blink {
31
32 PassOwnPtr<ContentData> ContentData::create(PassRefPtr<StyleImage> image)
33 {
34 return adoptPtr(new ImageContentData(image));
35 }
36
37 PassOwnPtr<ContentData> ContentData::create(const String& text)
38 {
39 return adoptPtr(new TextContentData(text));
40 }
41
42 PassOwnPtr<ContentData> ContentData::clone() const
43 {
44 OwnPtr<ContentData> result = cloneInternal();
45
46 ContentData* lastNewData = result.get();
47 for (const ContentData* contentData = next(); contentData; contentData = con tentData->next()) {
48 OwnPtr<ContentData> newData = contentData->cloneInternal();
49 lastNewData->setNext(newData.release());
50 lastNewData = lastNewData->next();
51 }
52
53 return result.release();
54 }
55
56 RenderObject* ImageContentData::createRenderer(Document& doc, RenderStyle* pseud oStyle) const
57 {
58 return 0;
59 }
60
61 RenderObject* TextContentData::createRenderer(Document& doc, RenderStyle* pseudo Style) const
62 {
63 return 0;
64 }
65
66 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/style/ContentData.h ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698