| OLD | NEW |
| 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, 2008, 2010, 2011 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 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 25 matching lines...) Expand all Loading... |
| 36 #include "core/dom/ElementTraversal.h" | 36 #include "core/dom/ElementTraversal.h" |
| 37 #include "core/dom/ExceptionCode.h" | 37 #include "core/dom/ExceptionCode.h" |
| 38 #include "core/dom/NodeListsNodeData.h" | 38 #include "core/dom/NodeListsNodeData.h" |
| 39 #include "core/dom/StyleChangeReason.h" | 39 #include "core/dom/StyleChangeReason.h" |
| 40 #include "core/html/HTMLTableCaptionElement.h" | 40 #include "core/html/HTMLTableCaptionElement.h" |
| 41 #include "core/html/HTMLTableCellElement.h" | 41 #include "core/html/HTMLTableCellElement.h" |
| 42 #include "core/html/HTMLTableRowElement.h" | 42 #include "core/html/HTMLTableRowElement.h" |
| 43 #include "core/html/HTMLTableRowsCollection.h" | 43 #include "core/html/HTMLTableRowsCollection.h" |
| 44 #include "core/html/HTMLTableSectionElement.h" | 44 #include "core/html/HTMLTableSectionElement.h" |
| 45 #include "core/html/parser/HTMLParserIdioms.h" | 45 #include "core/html/parser/HTMLParserIdioms.h" |
| 46 #include "core/layout/LayoutTable.h" | |
| 47 #include "platform/weborigin/Referrer.h" | 46 #include "platform/weborigin/Referrer.h" |
| 48 #include "wtf/StdLibExtras.h" | 47 #include "wtf/StdLibExtras.h" |
| 49 | 48 |
| 50 namespace blink { | 49 namespace blink { |
| 51 | 50 |
| 52 using namespace HTMLNames; | 51 using namespace HTMLNames; |
| 53 | 52 |
| 54 inline HTMLTableElement::HTMLTableElement(Document& document) | 53 inline HTMLTableElement::HTMLTableElement(Document& document) |
| 55 : HTMLElement(tableTag, document) | 54 : HTMLElement(tableTag, document) |
| 56 , m_borderAttr(false) | 55 , m_borderAttr(false) |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 else if (equalIgnoringCase(value, "groups")) | 368 else if (equalIgnoringCase(value, "groups")) |
| 370 m_rulesAttr = GroupsRules; | 369 m_rulesAttr = GroupsRules; |
| 371 else if (equalIgnoringCase(value, "rows")) | 370 else if (equalIgnoringCase(value, "rows")) |
| 372 m_rulesAttr = RowsRules; | 371 m_rulesAttr = RowsRules; |
| 373 else if (equalIgnoringCase(value, "cols")) | 372 else if (equalIgnoringCase(value, "cols")) |
| 374 m_rulesAttr = ColsRules; | 373 m_rulesAttr = ColsRules; |
| 375 else if (equalIgnoringCase(value, "all")) | 374 else if (equalIgnoringCase(value, "all")) |
| 376 m_rulesAttr = AllRules; | 375 m_rulesAttr = AllRules; |
| 377 } else if (name == cellpaddingAttr) { | 376 } else if (name == cellpaddingAttr) { |
| 378 if (!value.isEmpty()) | 377 if (!value.isEmpty()) |
| 379 m_padding = max(0, value.toInt()); | 378 m_padding = std::max(0, value.toInt()); |
| 380 else | 379 else |
| 381 m_padding = 1; | 380 m_padding = 1; |
| 382 } else if (name == colsAttr) { | 381 } else if (name == colsAttr) { |
| 383 // ### | 382 // ### |
| 384 } else { | 383 } else { |
| 385 HTMLElement::parseAttribute(name, oldValue, value); | 384 HTMLElement::parseAttribute(name, oldValue, value); |
| 386 } | 385 } |
| 387 | 386 |
| 388 if (bordersBefore != getCellBorders() || oldPadding != m_padding) { | 387 if (bordersBefore != getCellBorders() || oldPadding != m_padding) { |
| 389 m_sharedCellStyle = nullptr; | 388 m_sharedCellStyle = nullptr; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 return getAttribute(summaryAttr); | 558 return getAttribute(summaryAttr); |
| 560 } | 559 } |
| 561 | 560 |
| 562 DEFINE_TRACE(HTMLTableElement) | 561 DEFINE_TRACE(HTMLTableElement) |
| 563 { | 562 { |
| 564 visitor->trace(m_sharedCellStyle); | 563 visitor->trace(m_sharedCellStyle); |
| 565 HTMLElement::trace(visitor); | 564 HTMLElement::trace(visitor); |
| 566 } | 565 } |
| 567 | 566 |
| 568 } // namespace blink | 567 } // namespace blink |
| OLD | NEW |