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

Side by Side Diff: third_party/WebKit/Source/core/css/StyleRule.cpp

Issue 2459843002: Copy m_namespaceRules when copying StyleSheetContents to avoid crashing. (Closed)
Patch Set: Rename test, move comment Created 4 years, 1 month 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 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 case Supports: 143 case Supports:
144 return toStyleRuleSupports(this)->copy(); 144 return toStyleRuleSupports(this)->copy();
145 case Import: 145 case Import:
146 // FIXME: Copy import rules. 146 // FIXME: Copy import rules.
147 ASSERT_NOT_REACHED(); 147 ASSERT_NOT_REACHED();
148 return nullptr; 148 return nullptr;
149 case Keyframes: 149 case Keyframes:
150 return toStyleRuleKeyframes(this)->copy(); 150 return toStyleRuleKeyframes(this)->copy();
151 case Viewport: 151 case Viewport:
152 return toStyleRuleViewport(this)->copy(); 152 return toStyleRuleViewport(this)->copy();
153 case Namespace:
154 return toStyleRuleNamespace(this)->copy();
153 case Charset: 155 case Charset:
154 case Keyframe: 156 case Keyframe:
155 case Namespace:
156 ASSERT_NOT_REACHED(); 157 ASSERT_NOT_REACHED();
157 return nullptr; 158 return nullptr;
158 } 159 }
159 ASSERT_NOT_REACHED(); 160 ASSERT_NOT_REACHED();
160 return nullptr; 161 return nullptr;
161 } 162 }
162 163
163 CSSRule* StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet, 164 CSSRule* StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet,
164 CSSRule* parentRule) const { 165 CSSRule* parentRule) const {
165 CSSRule* rule = nullptr; 166 CSSRule* rule = nullptr;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 m_properties = m_properties->mutableCopy(); 381 m_properties = m_properties->mutableCopy();
381 return *toMutableStylePropertySet(m_properties); 382 return *toMutableStylePropertySet(m_properties);
382 } 383 }
383 384
384 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) { 385 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) {
385 visitor->trace(m_properties); 386 visitor->trace(m_properties);
386 StyleRuleBase::traceAfterDispatch(visitor); 387 StyleRuleBase::traceAfterDispatch(visitor);
387 } 388 }
388 389
389 } // namespace blink 390 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698