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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
339 } else if (name == rulesAttr) { | 339 } else if (name == rulesAttr) { |
340 // The presence of a valid rules attribute causes border collapsing to b e enabled. | 340 // The presence of a valid rules attribute causes border collapsing to b e enabled. |
341 if (m_rulesAttr != UnsetRules) | 341 if (m_rulesAttr != UnsetRules) |
342 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderColl apse, CSSValueCollapse); | 342 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderColl apse, CSSValueCollapse); |
343 } else if (name == frameAttr) { | 343 } else if (name == frameAttr) { |
344 bool borderTop; | 344 bool borderTop; |
345 bool borderRight; | 345 bool borderRight; |
346 bool borderBottom; | 346 bool borderBottom; |
347 bool borderLeft; | 347 bool borderLeft; |
348 if (getBordersFromFrameAttributeValue(value, borderTop, borderRight, bor derBottom, borderLeft)) { | 348 if (getBordersFromFrameAttributeValue(value, borderTop, borderRight, bor derBottom, borderLeft)) { |
349 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidt h, CSSValueThin); | |
Julien - ping for review
2014/08/05 19:22:43
I would rather fix the whole logic to avoid having
| |
350 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderTopS tyle, borderTop ? CSSValueSolid : CSSValueHidden); | 349 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderTopS tyle, borderTop ? CSSValueSolid : CSSValueHidden); |
351 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderBott omStyle, borderBottom ? CSSValueSolid : CSSValueHidden); | 350 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderBott omStyle, borderBottom ? CSSValueSolid : CSSValueHidden); |
352 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderLeft Style, borderLeft ? CSSValueSolid : CSSValueHidden); | 351 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderLeft Style, borderLeft ? CSSValueSolid : CSSValueHidden); |
353 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderRigh tStyle, borderRight ? CSSValueSolid : CSSValueHidden); | 352 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderRigh tStyle, borderRight ? CSSValueSolid : CSSValueHidden); |
354 } | 353 } |
355 } else | 354 } else |
356 HTMLElement::collectStyleForPresentationAttribute(name, value, style); | 355 HTMLElement::collectStyleForPresentationAttribute(name, value, style); |
357 } | 356 } |
358 | 357 |
359 bool HTMLTableElement::isPresentationAttribute(const QualifiedName& name) const | 358 bool HTMLTableElement::isPresentationAttribute(const QualifiedName& name) const |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
413 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(); | 412 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(); |
414 style->setProperty(CSSPropertyBorderTopStyle, value); | 413 style->setProperty(CSSPropertyBorderTopStyle, value); |
415 style->setProperty(CSSPropertyBorderBottomStyle, value); | 414 style->setProperty(CSSPropertyBorderBottomStyle, value); |
416 style->setProperty(CSSPropertyBorderLeftStyle, value); | 415 style->setProperty(CSSPropertyBorderLeftStyle, value); |
417 style->setProperty(CSSPropertyBorderRightStyle, value); | 416 style->setProperty(CSSPropertyBorderRightStyle, value); |
418 return style.release(); | 417 return style.release(); |
419 } | 418 } |
420 | 419 |
421 const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle() | 420 const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle() |
422 { | 421 { |
423 if (m_frameAttr) | 422 if (m_frameAttr) { |
424 return 0; | 423 if (!equalIgnoringCase(getAttribute(frameAttr), "border") && !equalIgnor ingCase(getAttribute(frameAttr), "box")) |
424 return 0; | |
425 } | |
425 | 426 |
426 if (!m_borderAttr && !m_borderColorAttr) { | 427 if (!m_borderAttr && !m_borderColorAttr) { |
427 // Setting the border to 'hidden' allows it to win over any border | 428 // Setting the border to 'hidden' allows it to win over any border |
428 // set on the table's cells during border-conflict resolution. | 429 // set on the table's cells during border-conflict resolution. |
429 if (m_rulesAttr != UnsetRules) { | 430 if (m_rulesAttr != UnsetRules) { |
430 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderSt yle, (createBorderStyle(CSSValueHidden))); | 431 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderSt yle, (createBorderStyle(CSSValueHidden))); |
431 return solidBorderStyle; | 432 return solidBorderStyle; |
432 } | 433 } |
433 return 0; | 434 return 0; |
434 } | 435 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
576 return getAttribute(summaryAttr); | 577 return getAttribute(summaryAttr); |
577 } | 578 } |
578 | 579 |
579 void HTMLTableElement::trace(Visitor* visitor) | 580 void HTMLTableElement::trace(Visitor* visitor) |
580 { | 581 { |
581 visitor->trace(m_sharedCellStyle); | 582 visitor->trace(m_sharedCellStyle); |
582 HTMLElement::trace(visitor); | 583 HTMLElement::trace(visitor); |
583 } | 584 } |
584 | 585 |
585 } | 586 } |
OLD | NEW |