OLD | NEW |
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 ASSERT(!selectorTextCache().contains(this)); | 78 ASSERT(!selectorTextCache().contains(this)); |
79 String text = generateSelectorText(); | 79 String text = generateSelectorText(); |
80 selectorTextCache().set(this, text); | 80 selectorTextCache().set(this, text); |
81 setHasCachedSelectorText(true); | 81 setHasCachedSelectorText(true); |
82 return text; | 82 return text; |
83 } | 83 } |
84 | 84 |
85 void CSSStyleRule::setSelectorText(const String& selectorText) | 85 void CSSStyleRule::setSelectorText(const String& selectorText) |
86 { | 86 { |
87 CSSParserContext context(parserContext(), 0); | 87 CSSParserContext context(parserContext(), nullptr); |
88 CSSSelectorList selectorList = CSSParser::parseSelector(context, parentStyle
Sheet() ? parentStyleSheet()->contents() : nullptr, selectorText); | 88 CSSSelectorList selectorList = CSSParser::parseSelector(context, parentStyle
Sheet() ? parentStyleSheet()->contents() : nullptr, selectorText); |
89 if (!selectorList.isValid()) | 89 if (!selectorList.isValid()) |
90 return; | 90 return; |
91 | 91 |
92 CSSStyleSheet::RuleMutationScope mutationScope(this); | 92 CSSStyleSheet::RuleMutationScope mutationScope(this); |
93 | 93 |
94 m_styleRule->wrapperAdoptSelectorList(std::move(selectorList)); | 94 m_styleRule->wrapperAdoptSelectorList(std::move(selectorList)); |
95 | 95 |
96 if (hasCachedSelectorText()) { | 96 if (hasCachedSelectorText()) { |
97 selectorTextCache().remove(this); | 97 selectorTextCache().remove(this); |
(...skipping 30 matching lines...) Expand all Loading... |
128 } | 128 } |
129 | 129 |
130 DEFINE_TRACE_WRAPPERS(CSSStyleRule) | 130 DEFINE_TRACE_WRAPPERS(CSSStyleRule) |
131 { | 131 { |
132 visitor->traceWrappers(parentRule()); | 132 visitor->traceWrappers(parentRule()); |
133 visitor->traceWrappers(parentStyleSheet()); | 133 visitor->traceWrappers(parentStyleSheet()); |
134 CSSRule::traceWrappers(visitor); | 134 CSSRule::traceWrappers(visitor); |
135 } | 135 } |
136 | 136 |
137 } // namespace blink | 137 } // namespace blink |
OLD | NEW |