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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLTableCellElement.h ('k') | Source/core/html/HTMLTableColElement.h » ('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, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
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 24 matching lines...) Expand all
35 using std::max; 35 using std::max;
36 using std::min; 36 using std::min;
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 // Clamp rowspan at 8k to match Firefox. 40 // Clamp rowspan at 8k to match Firefox.
41 static const int maxRowspan = 8190; 41 static const int maxRowspan = 8190;
42 42
43 using namespace HTMLNames; 43 using namespace HTMLNames;
44 44
45 inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName, Document* document) 45 inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName, Document& document)
46 : HTMLTablePartElement(tagName, document) 46 : HTMLTablePartElement(tagName, document)
47 { 47 {
48 ScriptWrappable::init(this); 48 ScriptWrappable::init(this);
49 } 49 }
50 50
51 PassRefPtr<HTMLTableCellElement> HTMLTableCellElement::create(const QualifiedNam e& tagName, Document* document) 51 PassRefPtr<HTMLTableCellElement> HTMLTableCellElement::create(const QualifiedNam e& tagName, Document& document)
52 { 52 {
53 return adoptRef(new HTMLTableCellElement(tagName, document)); 53 return adoptRef(new HTMLTableCellElement(tagName, document));
54 } 54 }
55 55
56 int HTMLTableCellElement::colSpan() const 56 int HTMLTableCellElement::colSpan() const
57 { 57 {
58 const AtomicString& colSpanValue = fastGetAttribute(colspanAttr); 58 const AtomicString& colSpanValue = fastGetAttribute(colspanAttr);
59 return max(1, colSpanValue.toInt()); 59 return max(1, colSpanValue.toInt());
60 } 60 }
61 61
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); 178 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer);
179 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t ableCellRenderer); 179 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t ableCellRenderer);
180 if (!cellAboveRenderer) 180 if (!cellAboveRenderer)
181 return 0; 181 return 0;
182 182
183 return toHTMLTableCellElement(cellAboveRenderer->node()); 183 return toHTMLTableCellElement(cellAboveRenderer->node());
184 } 184 }
185 185
186 } // namespace WebCore 186 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTableCellElement.h ('k') | Source/core/html/HTMLTableColElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698