| 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 13 matching lines...) Expand all Loading... |
| 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 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 PassOwnPtrWillBeRawPtr<ContentData> ContentData::create(PassRefPtrWillBeRawPtr<S
tyleImage> image) | 34 RawPtr<ContentData> ContentData::create(RawPtr<StyleImage> image) |
| 35 { | 35 { |
| 36 return adoptPtrWillBeNoop(new ImageContentData(image)); | 36 return new ImageContentData(image); |
| 37 } | 37 } |
| 38 | 38 |
| 39 PassOwnPtrWillBeRawPtr<ContentData> ContentData::create(const String& text) | 39 RawPtr<ContentData> ContentData::create(const String& text) |
| 40 { | 40 { |
| 41 return adoptPtrWillBeNoop(new TextContentData(text)); | 41 return new TextContentData(text); |
| 42 } | 42 } |
| 43 | 43 |
| 44 PassOwnPtrWillBeRawPtr<ContentData> ContentData::create(PassOwnPtr<CounterConten
t> counter) | 44 RawPtr<ContentData> ContentData::create(PassOwnPtr<CounterContent> counter) |
| 45 { | 45 { |
| 46 return adoptPtrWillBeNoop(new CounterContentData(counter)); | 46 return new CounterContentData(counter); |
| 47 } | 47 } |
| 48 | 48 |
| 49 PassOwnPtrWillBeRawPtr<ContentData> ContentData::create(QuoteType quote) | 49 RawPtr<ContentData> ContentData::create(QuoteType quote) |
| 50 { | 50 { |
| 51 return adoptPtrWillBeNoop(new QuoteContentData(quote)); | 51 return new QuoteContentData(quote); |
| 52 } | 52 } |
| 53 | 53 |
| 54 PassOwnPtrWillBeRawPtr<ContentData> ContentData::clone() const | 54 RawPtr<ContentData> ContentData::clone() const |
| 55 { | 55 { |
| 56 OwnPtrWillBeRawPtr<ContentData> result = cloneInternal(); | 56 RawPtr<ContentData> result = cloneInternal(); |
| 57 | 57 |
| 58 ContentData* lastNewData = result.get(); | 58 ContentData* lastNewData = result.get(); |
| 59 for (const ContentData* contentData = next(); contentData; contentData = con
tentData->next()) { | 59 for (const ContentData* contentData = next(); contentData; contentData = con
tentData->next()) { |
| 60 OwnPtrWillBeRawPtr<ContentData> newData = contentData->cloneInternal(); | 60 RawPtr<ContentData> newData = contentData->cloneInternal(); |
| 61 lastNewData->setNext(newData.release()); | 61 lastNewData->setNext(newData.release()); |
| 62 lastNewData = lastNewData->next(); | 62 lastNewData = lastNewData->next(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 return result.release(); | 65 return result.release(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 DEFINE_TRACE(ContentData) | 68 DEFINE_TRACE(ContentData) |
| 69 { | 69 { |
| 70 visitor->trace(m_next); | 70 visitor->trace(m_next); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 102 } |
| 103 | 103 |
| 104 LayoutObject* QuoteContentData::createLayoutObject(Document& doc, ComputedStyle&
pseudoStyle) const | 104 LayoutObject* QuoteContentData::createLayoutObject(Document& doc, ComputedStyle&
pseudoStyle) const |
| 105 { | 105 { |
| 106 LayoutObject* layoutObject = new LayoutQuote(&doc, m_quote); | 106 LayoutObject* layoutObject = new LayoutQuote(&doc, m_quote); |
| 107 layoutObject->setPseudoStyle(&pseudoStyle); | 107 layoutObject->setPseudoStyle(&pseudoStyle); |
| 108 return layoutObject; | 108 return layoutObject; |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace blink | 111 } // namespace blink |
| OLD | NEW |