Chromium Code Reviews| 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. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 return ruleSetsCustomProperty; | 139 return ruleSetsCustomProperty; |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace | 142 } // namespace |
| 143 | 143 |
| 144 using namespace HTMLNames; | 144 using namespace HTMLNames; |
| 145 | 145 |
| 146 ComputedStyle* StyleResolver::s_styleNotYetAvailable; | 146 ComputedStyle* StyleResolver::s_styleNotYetAvailable; |
| 147 | 147 |
| 148 static StylePropertySet* leftToRightDeclaration() { | 148 static StylePropertySet* leftToRightDeclaration() { |
| 149 // |MutableStylePropertySet::m_cssomWrapper| is a |ScriptWrappable|, | |
| 150 // which must not leak between contexts via this singleton. That | |
| 151 // cannot happen as that field will not be instantiated for this | |
| 152 // particular singleton. Turn off the verification check. | |
| 149 DEFINE_STATIC_LOCAL(MutableStylePropertySet, leftToRightDecl, | 153 DEFINE_STATIC_LOCAL(MutableStylePropertySet, leftToRightDecl, |
|
haraken
2017/02/11 10:25:20
Ditto. If there's a way to avoid using DEFINE_STAT
| |
| 150 (MutableStylePropertySet::create(HTMLQuirksMode))); | 154 (MutableStylePropertySet::create(HTMLQuirksMode)), |
| 155 CheckScriptWrappable::No); | |
| 151 if (leftToRightDecl.isEmpty()) | 156 if (leftToRightDecl.isEmpty()) |
| 152 leftToRightDecl.setProperty(CSSPropertyDirection, CSSValueLtr); | 157 leftToRightDecl.setProperty(CSSPropertyDirection, CSSValueLtr); |
| 153 return &leftToRightDecl; | 158 return &leftToRightDecl; |
| 154 } | 159 } |
| 155 | 160 |
| 156 static StylePropertySet* rightToLeftDeclaration() { | 161 static StylePropertySet* rightToLeftDeclaration() { |
| 162 // See |leftToRightDeclaration()| comment on why |CheckScriptWrappable::No| | |
| 163 // is used. | |
| 157 DEFINE_STATIC_LOCAL(MutableStylePropertySet, rightToLeftDecl, | 164 DEFINE_STATIC_LOCAL(MutableStylePropertySet, rightToLeftDecl, |
| 158 (MutableStylePropertySet::create(HTMLQuirksMode))); | 165 (MutableStylePropertySet::create(HTMLQuirksMode)), |
| 166 CheckScriptWrappable::No); | |
| 159 if (rightToLeftDecl.isEmpty()) | 167 if (rightToLeftDecl.isEmpty()) |
| 160 rightToLeftDecl.setProperty(CSSPropertyDirection, CSSValueRtl); | 168 rightToLeftDecl.setProperty(CSSPropertyDirection, CSSValueRtl); |
| 161 return &rightToLeftDecl; | 169 return &rightToLeftDecl; |
| 162 } | 170 } |
| 163 | 171 |
| 164 static void collectScopedResolversForHostedShadowTrees( | 172 static void collectScopedResolversForHostedShadowTrees( |
| 165 const Element& element, | 173 const Element& element, |
| 166 HeapVector<Member<ScopedStyleResolver>, 8>& resolvers) { | 174 HeapVector<Member<ScopedStyleResolver>, 8>& resolvers) { |
| 167 ElementShadow* shadow = element.shadow(); | 175 ElementShadow* shadow = element.shadow(); |
| 168 if (!shadow) | 176 if (!shadow) |
| (...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1933 | 1941 |
| 1934 DEFINE_TRACE(StyleResolver) { | 1942 DEFINE_TRACE(StyleResolver) { |
| 1935 visitor->trace(m_matchedPropertiesCache); | 1943 visitor->trace(m_matchedPropertiesCache); |
| 1936 visitor->trace(m_selectorFilter); | 1944 visitor->trace(m_selectorFilter); |
| 1937 visitor->trace(m_styleSharingLists); | 1945 visitor->trace(m_styleSharingLists); |
| 1938 visitor->trace(m_document); | 1946 visitor->trace(m_document); |
| 1939 visitor->trace(m_tracker); | 1947 visitor->trace(m_tracker); |
| 1940 } | 1948 } |
| 1941 | 1949 |
| 1942 } // namespace blink | 1950 } // namespace blink |
| OLD | NEW |