Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
| 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 return SVGLayoutSupport::hasFilterResource(*this); | 104 return SVGLayoutSupport::hasFilterResource(*this); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void LayoutSVGContainer::styleDidChange(StyleDifference diff, | 107 void LayoutSVGContainer::styleDidChange(StyleDifference diff, |
| 108 const ComputedStyle* oldStyle) { | 108 const ComputedStyle* oldStyle) { |
| 109 LayoutSVGModelObject::styleDidChange(diff, oldStyle); | 109 LayoutSVGModelObject::styleDidChange(diff, oldStyle); |
| 110 | 110 |
| 111 bool hadIsolation = | 111 bool hadIsolation = |
| 112 oldStyle && !isSVGHiddenContainer() && | 112 oldStyle && !isSVGHiddenContainer() && |
| 113 SVGLayoutSupport::willIsolateBlendingDescendantsForStyle(*oldStyle); | 113 SVGLayoutSupport::willIsolateBlendingDescendantsForStyle(*oldStyle); |
| 114 | |
| 115 bool willIsolateBlendingDescendantsForObject = | |
|
Xianzhu
2016/12/28 23:22:58
Nit: s/willIsolateBlendingDescendantsForObject/wil
chrishtr
2016/12/28 23:30:28
Done.
| |
| 116 SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this); | |
| 117 | |
| 114 bool isolationChanged = | 118 bool isolationChanged = |
| 115 hadIsolation == | 119 hadIsolation == !willIsolateBlendingDescendantsForObject; |
|
Xianzhu
2016/12/28 23:22:58
Nit: s/== !/!=/
chrishtr
2016/12/28 23:30:28
Done.
| |
| 116 !SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this); | 120 |
| 121 if (isolationChanged) | |
| 122 setNeedsPaintPropertyUpdate(); | |
| 117 | 123 |
| 118 if (!parent() || !isolationChanged) | 124 if (!parent() || !isolationChanged) |
| 119 return; | 125 return; |
| 120 | 126 |
| 121 if (hasNonIsolatedBlendingDescendants()) | 127 if (hasNonIsolatedBlendingDescendants()) { |
| 122 parent()->descendantIsolationRequirementsChanged( | 128 parent()->descendantIsolationRequirementsChanged( |
| 123 SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this) | 129 willIsolateBlendingDescendantsForObject ? DescendantIsolationNeedsUpdate |
| 124 ? DescendantIsolationNeedsUpdate | 130 : DescendantIsolationRequired); |
| 125 : DescendantIsolationRequired); | 131 } |
| 126 } | 132 } |
| 127 | 133 |
| 128 bool LayoutSVGContainer::hasNonIsolatedBlendingDescendants() const { | 134 bool LayoutSVGContainer::hasNonIsolatedBlendingDescendants() const { |
| 129 if (m_hasNonIsolatedBlendingDescendantsDirty) { | 135 if (m_hasNonIsolatedBlendingDescendantsDirty) { |
| 130 m_hasNonIsolatedBlendingDescendants = | 136 m_hasNonIsolatedBlendingDescendants = |
| 131 SVGLayoutSupport::computeHasNonIsolatedBlendingDescendants(this); | 137 SVGLayoutSupport::computeHasNonIsolatedBlendingDescendants(this); |
| 132 m_hasNonIsolatedBlendingDescendantsDirty = false; | 138 m_hasNonIsolatedBlendingDescendantsDirty = false; |
| 133 } | 139 } |
| 134 return m_hasNonIsolatedBlendingDescendants; | 140 return m_hasNonIsolatedBlendingDescendants; |
| 135 } | 141 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 // under the pointer (i.e., there is no target element), the event is not | 219 // under the pointer (i.e., there is no target element), the event is not |
| 214 // dispatched." | 220 // dispatched." |
| 215 return false; | 221 return false; |
| 216 } | 222 } |
| 217 | 223 |
| 218 SVGTransformChange LayoutSVGContainer::calculateLocalTransform() { | 224 SVGTransformChange LayoutSVGContainer::calculateLocalTransform() { |
| 219 return SVGTransformChange::None; | 225 return SVGTransformChange::None; |
| 220 } | 226 } |
| 221 | 227 |
| 222 } // namespace blink | 228 } // namespace blink |
| OLD | NEW |