18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 28e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Copyright (C) 1997 Martin Jones (mjones@kde.org) 38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1997 Torben Weis (weis@kde.org) 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1998 Waldo Bastian (bastian@kde.org) 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1999 Lars Knoll (knoll@kde.org) 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1999 Antti Koivisto (koivisto@kde.org) 78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * This library is free software; you can redistribute it and/or 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modify it under the terms of the GNU Library General Public 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * License as published by the Free Software Foundation; either 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * version 2 of the License, or (at your option) any later version. 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * This library is distributed in the hope that it will be useful, 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * but WITHOUT ANY WARRANTY; without even the implied warranty of 168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Library General Public License for more details. 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * You should have received a copy of the GNU Library General Public License 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * along with this library; see the file COPYING.LIB. If not, write to 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Boston, MA 02110-1301, USA. 238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */ 258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef HTMLTableElement_h 278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define HTMLTableElement_h 288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "HTMLElement.h" 308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore { 328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass HTMLCollection; 348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass HTMLTableCaptionElement; 358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass HTMLTableSectionElement; 368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass HTMLTableElement : public HTMLElement { 388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectpublic: 395af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke static PassRefPtr<HTMLTableElement> create(Document*); 405af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke static PassRefPtr<HTMLTableElement> create(const QualifiedName&, Document*); 418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HTMLTableCaptionElement* caption() const; 438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setCaption(PassRefPtr<HTMLTableCaptionElement>, ExceptionCode&); 448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HTMLTableSectionElement* tHead() const; 468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setTHead(PassRefPtr<HTMLTableSectionElement>, ExceptionCode&); 478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HTMLTableSectionElement* tFoot() const; 498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setTFoot(PassRefPtr<HTMLTableSectionElement>, ExceptionCode&); 508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project PassRefPtr<HTMLElement> createTHead(); 528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void deleteTHead(); 538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project PassRefPtr<HTMLElement> createTFoot(); 548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void deleteTFoot(); 558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project PassRefPtr<HTMLElement> createCaption(); 568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void deleteCaption(); 578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project PassRefPtr<HTMLElement> insertRow(int index, ExceptionCode&); 588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void deleteRow(int index, ExceptionCode&); 598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project PassRefPtr<HTMLCollection> rows(); 618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project PassRefPtr<HTMLCollection> tBodies(); 628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project String rules() const; 648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project String summary() const; 658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 665af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke virtual void attach(); 675af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 685af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke void addSharedCellDecls(Vector<CSSMutableStyleDeclaration*>&); 695af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke void addSharedGroupDecls(bool rows, Vector<CSSMutableStyleDeclaration*>&); 705af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 715af96e2c7b73ebc627c6894727826a7576d31758Leon Clarkeprivate: 725af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke HTMLTableElement(const QualifiedName&, Document*); 735af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 748e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const; 75e78cbe89e6f337f2f1fe40315be88f742b547151Steve Block virtual void parseMappedAttribute(Attribute*); 768e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool isURLAttribute(Attribute*) const; 778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 788e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // Used to obtain either a solid or outset border decl and to deal with the frame 798e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // and rules attributes. 808e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool canHaveAdditionalAttributeStyleDecls() const { return true; } 818e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&); 828e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 83635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; 848e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 858e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void addSharedCellBordersDecl(Vector<CSSMutableStyleDeclaration*>&); 868e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void addSharedCellPaddingDecl(Vector<CSSMutableStyleDeclaration*>&); 878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project enum TableRules { UnsetRules, NoneRules, GroupsRules, RowsRules, ColsRules, AllRules }; 898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project enum CellBorders { NoBorders, SolidBorders, InsetBorders, SolidBordersColsOnly, SolidBordersRowsOnly }; 908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project CellBorders cellBorders() const; 928e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 938e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project HTMLTableSectionElement* lastBody() const; 948e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 958e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool m_borderAttr; // Sets a precise border width and creates an outset border for the table and for its cells. 968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool m_borderColorAttr; // Overrides the outset border and makes it solid for the table and cells instead. 978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool m_frameAttr; // Implies a thin border width if no border is set and then a certain set of solid/hidden borders based off the value. 988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project TableRules m_rulesAttr; // Implies a thin border width, a collapsing border model, and all borders on the table becoming set to hidden (if frame/border 998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // are present, to none otherwise). 1005af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 1018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project unsigned short m_padding; 1028e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project RefPtr<CSSMappedAttributeDeclaration> m_paddingDecl; 1038e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}; 1048e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} //namespace 1068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 108