| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 HTMLElement::parseAttribute(name, value); | 393 HTMLElement::parseAttribute(name, value); |
| 394 | 394 |
| 395 if (bordersBefore != cellBorders() || oldPadding != m_padding) { | 395 if (bordersBefore != cellBorders() || oldPadding != m_padding) { |
| 396 m_sharedCellStyle = nullptr; | 396 m_sharedCellStyle = nullptr; |
| 397 setNeedsTableStyleRecalc(); | 397 setNeedsTableStyleRecalc(); |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 | 400 |
| 401 static PassRefPtr<StylePropertySet> createBorderStyle(CSSValueID value) | 401 static PassRefPtr<StylePropertySet> createBorderStyle(CSSValueID value) |
| 402 { | 402 { |
| 403 RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(); | 403 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(); |
| 404 style->setProperty(CSSPropertyBorderTopStyle, value); | 404 style->setProperty(CSSPropertyBorderTopStyle, value); |
| 405 style->setProperty(CSSPropertyBorderBottomStyle, value); | 405 style->setProperty(CSSPropertyBorderBottomStyle, value); |
| 406 style->setProperty(CSSPropertyBorderLeftStyle, value); | 406 style->setProperty(CSSPropertyBorderLeftStyle, value); |
| 407 style->setProperty(CSSPropertyBorderRightStyle, value); | 407 style->setProperty(CSSPropertyBorderRightStyle, value); |
| 408 return style.release(); | 408 return style.release(); |
| 409 } | 409 } |
| 410 | 410 |
| 411 const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle() | 411 const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle() |
| 412 { | 412 { |
| 413 if (m_frameAttr) | 413 if (m_frameAttr) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 if (m_borderColorAttr) | 449 if (m_borderColorAttr) |
| 450 return SolidBorders; | 450 return SolidBorders; |
| 451 return InsetBorders; | 451 return InsetBorders; |
| 452 } | 452 } |
| 453 ASSERT_NOT_REACHED(); | 453 ASSERT_NOT_REACHED(); |
| 454 return NoBorders; | 454 return NoBorders; |
| 455 } | 455 } |
| 456 | 456 |
| 457 PassRefPtr<StylePropertySet> HTMLTableElement::createSharedCellStyle() | 457 PassRefPtr<StylePropertySet> HTMLTableElement::createSharedCellStyle() |
| 458 { | 458 { |
| 459 RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(); | 459 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(); |
| 460 | 460 |
| 461 switch (cellBorders()) { | 461 switch (cellBorders()) { |
| 462 case SolidBordersColsOnly: | 462 case SolidBordersColsOnly: |
| 463 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin); | 463 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin); |
| 464 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); | 464 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); |
| 465 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); | 465 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); |
| 466 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); | 466 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); |
| 467 style->setProperty(CSSPropertyBorderColor, cssValuePool().createInherite
dValue()); | 467 style->setProperty(CSSPropertyBorderColor, cssValuePool().createInherite
dValue()); |
| 468 break; | 468 break; |
| 469 case SolidBordersRowsOnly: | 469 case SolidBordersRowsOnly: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 496 | 496 |
| 497 const StylePropertySet* HTMLTableElement::additionalCellStyle() | 497 const StylePropertySet* HTMLTableElement::additionalCellStyle() |
| 498 { | 498 { |
| 499 if (!m_sharedCellStyle) | 499 if (!m_sharedCellStyle) |
| 500 m_sharedCellStyle = createSharedCellStyle(); | 500 m_sharedCellStyle = createSharedCellStyle(); |
| 501 return m_sharedCellStyle.get(); | 501 return m_sharedCellStyle.get(); |
| 502 } | 502 } |
| 503 | 503 |
| 504 static PassRefPtr<StylePropertySet> createGroupBorderStyle(int rows) | 504 static PassRefPtr<StylePropertySet> createGroupBorderStyle(int rows) |
| 505 { | 505 { |
| 506 RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(); | 506 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(); |
| 507 if (rows) { | 507 if (rows) { |
| 508 style->setProperty(CSSPropertyBorderTopWidth, CSSValueThin); | 508 style->setProperty(CSSPropertyBorderTopWidth, CSSValueThin); |
| 509 style->setProperty(CSSPropertyBorderBottomWidth, CSSValueThin); | 509 style->setProperty(CSSPropertyBorderBottomWidth, CSSValueThin); |
| 510 style->setProperty(CSSPropertyBorderTopStyle, CSSValueSolid); | 510 style->setProperty(CSSPropertyBorderTopStyle, CSSValueSolid); |
| 511 style->setProperty(CSSPropertyBorderBottomStyle, CSSValueSolid); | 511 style->setProperty(CSSPropertyBorderBottomStyle, CSSValueSolid); |
| 512 } else { | 512 } else { |
| 513 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin); | 513 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin); |
| 514 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); | 514 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); |
| 515 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); | 515 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); |
| 516 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); | 516 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 { | 555 { |
| 556 return getAttribute(rulesAttr); | 556 return getAttribute(rulesAttr); |
| 557 } | 557 } |
| 558 | 558 |
| 559 const AtomicString& HTMLTableElement::summary() const | 559 const AtomicString& HTMLTableElement::summary() const |
| 560 { | 560 { |
| 561 return getAttribute(summaryAttr); | 561 return getAttribute(summaryAttr); |
| 562 } | 562 } |
| 563 | 563 |
| 564 } | 564 } |
| OLD | NEW |