| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 case TABLE_CAPTION: | 91 case TABLE_CAPTION: |
| 92 return BLOCK; | 92 return BLOCK; |
| 93 case NONE: | 93 case NONE: |
| 94 ASSERT_NOT_REACHED(); | 94 ASSERT_NOT_REACHED(); |
| 95 return NONE; | 95 return NONE; |
| 96 } | 96 } |
| 97 ASSERT_NOT_REACHED(); | 97 ASSERT_NOT_REACHED(); |
| 98 return BLOCK; | 98 return BLOCK; |
| 99 } | 99 } |
| 100 | 100 |
| 101 static bool isOutermostSVGElement(const Element* e) |
| 102 { |
| 103 return e && e->isSVGElement() && toSVGElement(*e).isOutermostSVGSVGElement()
; |
| 104 } |
| 105 |
| 101 // CSS requires text-decoration to be reset at each DOM element for tables, | 106 // CSS requires text-decoration to be reset at each DOM element for tables, |
| 102 // inline blocks, inline tables, shadow DOM crossings, floating elements, | 107 // inline blocks, inline tables, shadow DOM crossings, floating elements, |
| 103 // and absolute or relatively positioned elements. | 108 // and absolute or relatively positioned elements. Outermost <svg> roots are |
| 109 // considered to be atomic inline-level. |
| 104 static bool doesNotInheritTextDecoration(const ComputedStyle& style, const Eleme
nt* e) | 110 static bool doesNotInheritTextDecoration(const ComputedStyle& style, const Eleme
nt* e) |
| 105 { | 111 { |
| 106 return style.display() == TABLE || style.display() == INLINE_TABLE | 112 return style.display() == TABLE || style.display() == INLINE_TABLE |
| 107 || style.display() == INLINE_BLOCK || style.display() == INLINE_BOX || i
sAtShadowBoundary(e) | 113 || style.display() == INLINE_BLOCK || style.display() == INLINE_BOX || i
sAtShadowBoundary(e) |
| 108 || style.isFloating() || style.hasOutOfFlowPosition(); | 114 || style.isFloating() || style.hasOutOfFlowPosition() || isOutermostSVGE
lement(e); |
| 109 } | 115 } |
| 110 | 116 |
| 111 // FIXME: This helper is only needed because pseudoStyleForElement passes a null | 117 // FIXME: This helper is only needed because pseudoStyleForElement passes a null |
| 112 // element to adjustComputedStyle, so we can't just use element->isInTopLayer(). | 118 // element to adjustComputedStyle, so we can't just use element->isInTopLayer(). |
| 113 static bool isInTopLayer(const Element* element, const ComputedStyle& style) | 119 static bool isInTopLayer(const Element* element, const ComputedStyle& style) |
| 114 { | 120 { |
| 115 return (element && element->isInTopLayer()) || style.styleType() == BACKDROP
; | 121 return (element && element->isInTopLayer()) || style.styleType() == BACKDROP
; |
| 116 } | 122 } |
| 117 | 123 |
| 118 static bool parentStyleForcesZIndexToCreateStackingContext(const ComputedStyle&
parentStyle) | 124 static bool parentStyleForcesZIndexToCreateStackingContext(const ComputedStyle&
parentStyle) |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 if (style.writingMode() != TopToBottomWritingMode && (style.display() == BOX
|| style.display() == INLINE_BOX)) | 488 if (style.writingMode() != TopToBottomWritingMode && (style.display() == BOX
|| style.display() == INLINE_BOX)) |
| 483 style.setWritingMode(TopToBottomWritingMode); | 489 style.setWritingMode(TopToBottomWritingMode); |
| 484 | 490 |
| 485 if (parentStyle.isDisplayFlexibleOrGridBox()) { | 491 if (parentStyle.isDisplayFlexibleOrGridBox()) { |
| 486 style.setFloating(NoFloat); | 492 style.setFloating(NoFloat); |
| 487 style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloatin
g(), !m_useQuirksModeStyles)); | 493 style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloatin
g(), !m_useQuirksModeStyles)); |
| 488 } | 494 } |
| 489 } | 495 } |
| 490 | 496 |
| 491 } | 497 } |
| OLD | NEW |