Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp

Issue 2607003002: Set needs paint property update for changes of SVG isolation and blending. (Closed)
Patch Set: none Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698