| 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 StylePropertySet* HTMLTableElement::createSharedCellStyle() | 450 StylePropertySet* HTMLTableElement::createSharedCellStyle() |
| 451 { | 451 { |
| 452 MutableStylePropertySet* style = MutableStylePropertySet::create(HTMLQuirksM
ode); | 452 MutableStylePropertySet* style = MutableStylePropertySet::create(HTMLQuirksM
ode); |
| 453 | 453 |
| 454 switch (getCellBorders()) { | 454 switch (getCellBorders()) { |
| 455 case SolidBordersColsOnly: | 455 case SolidBordersColsOnly: |
| 456 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin); | 456 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin); |
| 457 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); | 457 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); |
| 458 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); | 458 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); |
| 459 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); | 459 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); |
| 460 style->setProperty(CSSPropertyBorderColor, CSSInheritedValue::create()); | 460 style->setProperty(CSSPropertyBorderColor, *CSSInheritedValue::create())
; |
| 461 break; | 461 break; |
| 462 case SolidBordersRowsOnly: | 462 case SolidBordersRowsOnly: |
| 463 style->setProperty(CSSPropertyBorderTopWidth, CSSValueThin); | 463 style->setProperty(CSSPropertyBorderTopWidth, CSSValueThin); |
| 464 style->setProperty(CSSPropertyBorderBottomWidth, CSSValueThin); | 464 style->setProperty(CSSPropertyBorderBottomWidth, CSSValueThin); |
| 465 style->setProperty(CSSPropertyBorderTopStyle, CSSValueSolid); | 465 style->setProperty(CSSPropertyBorderTopStyle, CSSValueSolid); |
| 466 style->setProperty(CSSPropertyBorderBottomStyle, CSSValueSolid); | 466 style->setProperty(CSSPropertyBorderBottomStyle, CSSValueSolid); |
| 467 style->setProperty(CSSPropertyBorderColor, CSSInheritedValue::create()); | 467 style->setProperty(CSSPropertyBorderColor, *CSSInheritedValue::create())
; |
| 468 break; | 468 break; |
| 469 case SolidBorders: | 469 case SolidBorders: |
| 470 style->setProperty(CSSPropertyBorderWidth, CSSPrimitiveValue::create(1,
CSSPrimitiveValue::UnitType::Pixels)); | 470 style->setProperty(CSSPropertyBorderWidth, *CSSPrimitiveValue::create(1,
CSSPrimitiveValue::UnitType::Pixels)); |
| 471 style->setProperty(CSSPropertyBorderStyle, CSSPrimitiveValue::createIden
tifier(CSSValueSolid)); | 471 style->setProperty(CSSPropertyBorderStyle, *CSSPrimitiveValue::createIde
ntifier(CSSValueSolid)); |
| 472 style->setProperty(CSSPropertyBorderColor, CSSInheritedValue::create()); | 472 style->setProperty(CSSPropertyBorderColor, *CSSInheritedValue::create())
; |
| 473 break; | 473 break; |
| 474 case InsetBorders: | 474 case InsetBorders: |
| 475 style->setProperty(CSSPropertyBorderWidth, CSSPrimitiveValue::create(1,
CSSPrimitiveValue::UnitType::Pixels)); | 475 style->setProperty(CSSPropertyBorderWidth, *CSSPrimitiveValue::create(1,
CSSPrimitiveValue::UnitType::Pixels)); |
| 476 style->setProperty(CSSPropertyBorderStyle, CSSPrimitiveValue::createIden
tifier(CSSValueInset)); | 476 style->setProperty(CSSPropertyBorderStyle, *CSSPrimitiveValue::createIde
ntifier(CSSValueInset)); |
| 477 style->setProperty(CSSPropertyBorderColor, CSSInheritedValue::create()); | 477 style->setProperty(CSSPropertyBorderColor, *CSSInheritedValue::create())
; |
| 478 break; | 478 break; |
| 479 case NoBorders: | 479 case NoBorders: |
| 480 // If 'rules=none' then allow any borders set at cell level to take effe
ct. | 480 // If 'rules=none' then allow any borders set at cell level to take effe
ct. |
| 481 break; | 481 break; |
| 482 } | 482 } |
| 483 | 483 |
| 484 if (m_padding) | 484 if (m_padding) |
| 485 style->setProperty(CSSPropertyPadding, CSSPrimitiveValue::create(m_paddi
ng, CSSPrimitiveValue::UnitType::Pixels)); | 485 style->setProperty(CSSPropertyPadding, *CSSPrimitiveValue::create(m_padd
ing, CSSPrimitiveValue::UnitType::Pixels)); |
| 486 | 486 |
| 487 return style; | 487 return style; |
| 488 } | 488 } |
| 489 | 489 |
| 490 const StylePropertySet* HTMLTableElement::additionalCellStyle() | 490 const StylePropertySet* HTMLTableElement::additionalCellStyle() |
| 491 { | 491 { |
| 492 if (!m_sharedCellStyle) | 492 if (!m_sharedCellStyle) |
| 493 m_sharedCellStyle = createSharedCellStyle(); | 493 m_sharedCellStyle = createSharedCellStyle(); |
| 494 return m_sharedCellStyle.get(); | 494 return m_sharedCellStyle.get(); |
| 495 } | 495 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 return getAttribute(summaryAttr); | 559 return getAttribute(summaryAttr); |
| 560 } | 560 } |
| 561 | 561 |
| 562 DEFINE_TRACE(HTMLTableElement) | 562 DEFINE_TRACE(HTMLTableElement) |
| 563 { | 563 { |
| 564 visitor->trace(m_sharedCellStyle); | 564 visitor->trace(m_sharedCellStyle); |
| 565 HTMLElement::trace(visitor); | 565 HTMLElement::trace(visitor); |
| 566 } | 566 } |
| 567 | 567 |
| 568 } // namespace blink | 568 } // namespace blink |
| OLD | NEW |