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

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

Issue 2450093005: Support display: contents for elements, first-line and first-letter pseudos. (Closed)
Patch Set: Support display: contents for elements, first-line and first-letter pseudos. Created 3 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/svg/SVGElementRareData.h" 5 #include "core/svg/SVGElementRareData.h"
6 6
7 #include "core/css/resolver/StyleResolver.h" 7 #include "core/css/resolver/StyleResolver.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/svg/SVGElementProxy.h" 9 #include "core/svg/SVGElementProxy.h"
10 10
(...skipping 12 matching lines...) Expand all
23 const ComputedStyle* parentStyle) { 23 const ComputedStyle* parentStyle) {
24 ASSERT(element); 24 ASSERT(element);
25 if (!m_useOverrideComputedStyle) 25 if (!m_useOverrideComputedStyle)
26 return nullptr; 26 return nullptr;
27 if (!m_overrideComputedStyle || m_needsOverrideComputedStyleUpdate) { 27 if (!m_overrideComputedStyle || m_needsOverrideComputedStyleUpdate) {
28 // The style computed here contains no CSS Animations/Transitions or SMIL 28 // The style computed here contains no CSS Animations/Transitions or SMIL
29 // induced rules - this is needed to compute the "base value" for the SMIL 29 // induced rules - this is needed to compute the "base value" for the SMIL
30 // animation sandwhich model. 30 // animation sandwhich model.
31 m_overrideComputedStyle = 31 m_overrideComputedStyle =
32 element->document().ensureStyleResolver().styleForElement( 32 element->document().ensureStyleResolver().styleForElement(
33 element, parentStyle, DisallowStyleSharing, 33 element, parentStyle, parentStyle, DisallowStyleSharing,
34 MatchAllRulesExcludingSMIL); 34 MatchAllRulesExcludingSMIL);
35 m_needsOverrideComputedStyleUpdate = false; 35 m_needsOverrideComputedStyleUpdate = false;
36 } 36 }
37 ASSERT(m_overrideComputedStyle); 37 ASSERT(m_overrideComputedStyle);
38 return m_overrideComputedStyle.get(); 38 return m_overrideComputedStyle.get();
39 } 39 }
40 40
41 DEFINE_TRACE(SVGElementRareData) { 41 DEFINE_TRACE(SVGElementRareData) {
42 visitor->trace(m_outgoingReferences); 42 visitor->trace(m_outgoingReferences);
43 visitor->trace(m_incomingReferences); 43 visitor->trace(m_incomingReferences);
44 visitor->trace(m_elementProxySet); 44 visitor->trace(m_elementProxySet);
45 visitor->trace(m_animatedSMILStyleProperties); 45 visitor->trace(m_animatedSMILStyleProperties);
46 visitor->trace(m_elementInstances); 46 visitor->trace(m_elementInstances);
47 visitor->trace(m_correspondingElement); 47 visitor->trace(m_correspondingElement);
48 visitor->trace(m_owner); 48 visitor->trace(m_owner);
49 } 49 }
50 50
51 AffineTransform* SVGElementRareData::animateMotionTransform() { 51 AffineTransform* SVGElementRareData::animateMotionTransform() {
52 return &m_animateMotionTransform; 52 return &m_animateMotionTransform;
53 } 53 }
54 54
55 SVGElementProxySet& SVGElementRareData::ensureElementProxySet() { 55 SVGElementProxySet& SVGElementRareData::ensureElementProxySet() {
56 if (!m_elementProxySet) 56 if (!m_elementProxySet)
57 m_elementProxySet = new SVGElementProxySet; 57 m_elementProxySet = new SVGElementProxySet;
58 return *m_elementProxySet; 58 return *m_elementProxySet;
59 } 59 }
60 60
61 } // namespace blink 61 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698