OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 10 matching lines...) Expand all Loading... |
21 | 21 |
22 #include "core/style/ContentData.h" | 22 #include "core/style/ContentData.h" |
23 | 23 |
24 #include "core/layout/LayoutCounter.h" | 24 #include "core/layout/LayoutCounter.h" |
25 #include "core/layout/LayoutImage.h" | 25 #include "core/layout/LayoutImage.h" |
26 #include "core/layout/LayoutImageResource.h" | 26 #include "core/layout/LayoutImageResource.h" |
27 #include "core/layout/LayoutImageResourceStyleImage.h" | 27 #include "core/layout/LayoutImageResourceStyleImage.h" |
28 #include "core/layout/LayoutQuote.h" | 28 #include "core/layout/LayoutQuote.h" |
29 #include "core/layout/LayoutTextFragment.h" | 29 #include "core/layout/LayoutTextFragment.h" |
30 #include "core/style/ComputedStyle.h" | 30 #include "core/style/ComputedStyle.h" |
31 #include <memory> | |
32 | 31 |
33 namespace blink { | 32 namespace blink { |
34 | 33 |
35 ContentData* ContentData::create(StyleImage* image) | 34 ContentData* ContentData::create(StyleImage* image) |
36 { | 35 { |
37 return new ImageContentData(image); | 36 return new ImageContentData(image); |
38 } | 37 } |
39 | 38 |
40 ContentData* ContentData::create(const String& text) | 39 ContentData* ContentData::create(const String& text) |
41 { | 40 { |
42 return new TextContentData(text); | 41 return new TextContentData(text); |
43 } | 42 } |
44 | 43 |
45 ContentData* ContentData::create(std::unique_ptr<CounterContent> counter) | 44 ContentData* ContentData::create(PassOwnPtr<CounterContent> counter) |
46 { | 45 { |
47 return new CounterContentData(std::move(counter)); | 46 return new CounterContentData(std::move(counter)); |
48 } | 47 } |
49 | 48 |
50 ContentData* ContentData::create(QuoteType quote) | 49 ContentData* ContentData::create(QuoteType quote) |
51 { | 50 { |
52 return new QuoteContentData(quote); | 51 return new QuoteContentData(quote); |
53 } | 52 } |
54 | 53 |
55 ContentData* ContentData::clone() const | 54 ContentData* ContentData::clone() const |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 102 } |
104 | 103 |
105 LayoutObject* QuoteContentData::createLayoutObject(Document& doc, ComputedStyle&
pseudoStyle) const | 104 LayoutObject* QuoteContentData::createLayoutObject(Document& doc, ComputedStyle&
pseudoStyle) const |
106 { | 105 { |
107 LayoutObject* layoutObject = new LayoutQuote(&doc, m_quote); | 106 LayoutObject* layoutObject = new LayoutQuote(&doc, m_quote); |
108 layoutObject->setPseudoStyle(&pseudoStyle); | 107 layoutObject->setPseudoStyle(&pseudoStyle); |
109 return layoutObject; | 108 return layoutObject; |
110 } | 109 } |
111 | 110 |
112 } // namespace blink | 111 } // namespace blink |
OLD | NEW |