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

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

Issue 327133002: Intorudce DECLARE/DEFINE_ELEMENT_FACTORY_WITH_TAGNAME macros. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a duplicated symbol issue Created 6 years, 6 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 30 matching lines...) Expand all
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 PassRefPtrWillBeRawPtr<HTMLTableCellElement> HTMLTableCellElement::create(const QualifiedName& tagName, Document& document) 51 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableCellElement)
52 {
53 return adoptRefWillBeRefCountedGarbageCollected(new HTMLTableCellElement(tag Name, document));
54 }
55 52
56 int HTMLTableCellElement::colSpan() const 53 int HTMLTableCellElement::colSpan() const
57 { 54 {
58 const AtomicString& colSpanValue = fastGetAttribute(colspanAttr); 55 const AtomicString& colSpanValue = fastGetAttribute(colspanAttr);
59 return max(1, colSpanValue.toInt()); 56 return max(1, colSpanValue.toInt());
60 } 57 }
61 58
62 int HTMLTableCellElement::rowSpan() const 59 int HTMLTableCellElement::rowSpan() const
63 { 60 {
64 const AtomicString& rowSpanValue = fastGetAttribute(rowspanAttr); 61 const AtomicString& rowSpanValue = fastGetAttribute(rowspanAttr);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 175
179 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); 176 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer);
180 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t ableCellRenderer); 177 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t ableCellRenderer);
181 if (!cellAboveRenderer) 178 if (!cellAboveRenderer)
182 return 0; 179 return 0;
183 180
184 return toHTMLTableCellElement(cellAboveRenderer->node()); 181 return toHTMLTableCellElement(cellAboveRenderer->node());
185 } 182 }
186 183
187 } // namespace WebCore 184 } // 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