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

Side by Side Diff: WebCore/css/CSSRuleList.cpp

Issue 6139003: Merge 75193 - Merge 75168 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 9 years, 11 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc. 4 * Copyright (C) 2002, 2005, 2006 Apple Computer, Inc.
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void CSSRuleList::deleteRule(unsigned index) 70 void CSSRuleList::deleteRule(unsigned index)
71 { 71 {
72 ASSERT(!m_list); 72 ASSERT(!m_list);
73 73
74 if (index >= m_lstCSSRules.size()) { 74 if (index >= m_lstCSSRules.size()) {
75 // FIXME: Should we throw an INDEX_SIZE_ERR exception here? 75 // FIXME: Should we throw an INDEX_SIZE_ERR exception here?
76 return; 76 return;
77 } 77 }
78 78
79 m_lstCSSRules[index]->setParent(0);
79 m_lstCSSRules.remove(index); 80 m_lstCSSRules.remove(index);
80 } 81 }
81 82
82 void CSSRuleList::append(CSSRule* rule) 83 void CSSRuleList::append(CSSRule* rule)
83 { 84 {
84 ASSERT(!m_list); 85 ASSERT(!m_list);
85 if (!rule) { 86 if (!rule) {
86 // FIXME: Should we throw an exception? 87 // FIXME: Should we throw an exception?
87 return; 88 return;
88 } 89 }
(...skipping 12 matching lines...) Expand all
101 if (index > m_lstCSSRules.size()) { 102 if (index > m_lstCSSRules.size()) {
102 // FIXME: Should we throw an INDEX_SIZE_ERR exception here? 103 // FIXME: Should we throw an INDEX_SIZE_ERR exception here?
103 return 0; 104 return 0;
104 } 105 }
105 106
106 m_lstCSSRules.insert(index, rule); 107 m_lstCSSRules.insert(index, rule);
107 return index; 108 return index;
108 } 109 }
109 110
110 } // namespace WebCore 111 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698