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

Side by Side Diff: Source/core/html/HTMLTableRowElement.cpp

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLTableElement.cpp ('k') | Source/core/html/HTMLTableSectionElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserv ed.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 do { 105 do {
106 n = n->previousSibling(); 106 n = n->previousSibling();
107 if (n && n->hasTagName(trTag)) 107 if (n && n->hasTagName(trTag))
108 rIndex++; 108 rIndex++;
109 } 109 }
110 while (n); 110 while (n);
111 111
112 return rIndex; 112 return rIndex;
113 } 113 }
114 114
115 PassRefPtr<HTMLElement> HTMLTableRowElement::insertCell(int index, ExceptionStat e& es) 115 PassRefPtr<HTMLElement> HTMLTableRowElement::insertCell(int index, ExceptionStat e& exceptionState)
116 { 116 {
117 RefPtr<HTMLCollection> children = cells(); 117 RefPtr<HTMLCollection> children = cells();
118 int numCells = children ? children->length() : 0; 118 int numCells = children ? children->length() : 0;
119 if (index < -1 || index > numCells) { 119 if (index < -1 || index > numCells) {
120 es.throwUninformativeAndGenericDOMException(IndexSizeError); 120 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError);
121 return 0; 121 return 0;
122 } 122 }
123 123
124 RefPtr<HTMLTableCellElement> cell = HTMLTableCellElement::create(tdTag, docu ment()); 124 RefPtr<HTMLTableCellElement> cell = HTMLTableCellElement::create(tdTag, docu ment());
125 if (index < 0 || index >= numCells) 125 if (index < 0 || index >= numCells)
126 appendChild(cell, es); 126 appendChild(cell, exceptionState);
127 else { 127 else {
128 Node* n; 128 Node* n;
129 if (index < 1) 129 if (index < 1)
130 n = firstChild(); 130 n = firstChild();
131 else 131 else
132 n = children->item(index); 132 n = children->item(index);
133 insertBefore(cell, n, es); 133 insertBefore(cell, n, exceptionState);
134 } 134 }
135 return cell.release(); 135 return cell.release();
136 } 136 }
137 137
138 void HTMLTableRowElement::deleteCell(int index, ExceptionState& es) 138 void HTMLTableRowElement::deleteCell(int index, ExceptionState& exceptionState)
139 { 139 {
140 RefPtr<HTMLCollection> children = cells(); 140 RefPtr<HTMLCollection> children = cells();
141 int numCells = children ? children->length() : 0; 141 int numCells = children ? children->length() : 0;
142 if (index == -1) 142 if (index == -1)
143 index = numCells-1; 143 index = numCells-1;
144 if (index >= 0 && index < numCells) { 144 if (index >= 0 && index < numCells) {
145 RefPtr<Node> cell = children->item(index); 145 RefPtr<Node> cell = children->item(index);
146 HTMLElement::removeChild(cell.get(), es); 146 HTMLElement::removeChild(cell.get(), exceptionState);
147 } else { 147 } else {
148 es.throwUninformativeAndGenericDOMException(IndexSizeError); 148 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError);
149 } 149 }
150 } 150 }
151 151
152 PassRefPtr<HTMLCollection> HTMLTableRowElement::cells() 152 PassRefPtr<HTMLCollection> HTMLTableRowElement::cells()
153 { 153 {
154 return ensureCachedHTMLCollection(TRCells); 154 return ensureCachedHTMLCollection(TRCells);
155 } 155 }
156 156
157 void HTMLTableRowElement::setCells(HTMLCollection*, ExceptionState& es) 157 void HTMLTableRowElement::setCells(HTMLCollection*, ExceptionState& exceptionSta te)
158 { 158 {
159 es.throwUninformativeAndGenericDOMException(NoModificationAllowedError); 159 exceptionState.throwUninformativeAndGenericDOMException(NoModificationAllowe dError);
160 } 160 }
161 161
162 } 162 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTableElement.cpp ('k') | Source/core/html/HTMLTableSectionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698