| 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 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 if (add) { | 827 if (add) { |
| 828 appendContent(ContentData::create(image)); | 828 appendContent(ContentData::create(image)); |
| 829 return; | 829 return; |
| 830 } | 830 } |
| 831 | 831 |
| 832 rareNonInheritedData.access()->m_content = ContentData::create(image); | 832 rareNonInheritedData.access()->m_content = ContentData::create(image); |
| 833 } | 833 } |
| 834 | 834 |
| 835 void ComputedStyle::setContent(const String& string, bool add) | 835 void ComputedStyle::setContent(const String& string, bool add) |
| 836 { | 836 { |
| 837 ASSERT(!string.isNull()); |
| 837 OwnPtrWillBePersistent<ContentData>& content = rareNonInheritedData.access()
->m_content; | 838 OwnPtrWillBePersistent<ContentData>& content = rareNonInheritedData.access()
->m_content; |
| 838 if (add) { | 839 if (add) { |
| 839 ContentData* lastContent = content.get(); | 840 ContentData* lastContent = content.get(); |
| 840 while (lastContent && lastContent->next()) | 841 while (lastContent && lastContent->next()) |
| 841 lastContent = lastContent->next(); | 842 lastContent = lastContent->next(); |
| 842 | 843 |
| 843 if (lastContent) { | 844 if (lastContent) { |
| 844 // We attempt to merge with the last ContentData if possible. | 845 // We attempt to merge with the last ContentData if possible. |
| 845 if (lastContent->isText()) { | 846 if (lastContent->isText()) { |
| 846 TextContentData* textContent = toTextContentData(lastContent); | 847 TextContentData* textContent = toTextContentData(lastContent); |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1829 } | 1830 } |
| 1830 | 1831 |
| 1831 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) | 1832 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) |
| 1832 { | 1833 { |
| 1833 setEmptyState(other.emptyState()); | 1834 setEmptyState(other.emptyState()); |
| 1834 if (other.hasExplicitlyInheritedProperties()) | 1835 if (other.hasExplicitlyInheritedProperties()) |
| 1835 setHasExplicitlyInheritedProperties(); | 1836 setHasExplicitlyInheritedProperties(); |
| 1836 } | 1837 } |
| 1837 | 1838 |
| 1838 } // namespace blink | 1839 } // namespace blink |
| OLD | NEW |