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

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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool isolationChanged = 114 bool isolationChanged =
115 hadIsolation == 115 hadIsolation ==
116 !SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this); 116 !SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this);
117 117
118 if (isolationChanged)
119 setNeedsPaintPropertyUpdate();
120
118 if (!parent() || !isolationChanged) 121 if (!parent() || !isolationChanged)
119 return; 122 return;
120 123
121 if (hasNonIsolatedBlendingDescendants()) 124 if (hasNonIsolatedBlendingDescendants())
122 parent()->descendantIsolationRequirementsChanged( 125 parent()->descendantIsolationRequirementsChanged(
123 SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this) 126 SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this)
Xianzhu 2016/12/28 23:14:37 Can you by the way refactor to avoid duplicated ca
chrishtr 2016/12/28 23:20:47 Done.
124 ? DescendantIsolationNeedsUpdate 127 ? DescendantIsolationNeedsUpdate
125 : DescendantIsolationRequired); 128 : DescendantIsolationRequired);
126 } 129 }
127 130
128 bool LayoutSVGContainer::hasNonIsolatedBlendingDescendants() const { 131 bool LayoutSVGContainer::hasNonIsolatedBlendingDescendants() const {
129 if (m_hasNonIsolatedBlendingDescendantsDirty) { 132 if (m_hasNonIsolatedBlendingDescendantsDirty) {
130 m_hasNonIsolatedBlendingDescendants = 133 m_hasNonIsolatedBlendingDescendants =
131 SVGLayoutSupport::computeHasNonIsolatedBlendingDescendants(this); 134 SVGLayoutSupport::computeHasNonIsolatedBlendingDescendants(this);
132 m_hasNonIsolatedBlendingDescendantsDirty = false; 135 m_hasNonIsolatedBlendingDescendantsDirty = false;
133 } 136 }
(...skipping 79 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 216 // under the pointer (i.e., there is no target element), the event is not
214 // dispatched." 217 // dispatched."
215 return false; 218 return false;
216 } 219 }
217 220
218 SVGTransformChange LayoutSVGContainer::calculateLocalTransform() { 221 SVGTransformChange LayoutSVGContainer::calculateLocalTransform() {
219 return SVGTransformChange::None; 222 return SVGTransformChange::None;
220 } 223 }
221 224
222 } // namespace blink 225 } // 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