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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 if (!page_specification.IsEmpty()) | 51 if (!page_specification.IsEmpty()) |
52 text.Append(page_specification); | 52 text.Append(page_specification); |
53 } | 53 } |
54 return text.ToString(); | 54 return text.ToString(); |
55 } | 55 } |
56 | 56 |
57 void CSSPageRule::setSelectorText(const String& selector_text) { | 57 void CSSPageRule::setSelectorText(const String& selector_text) { |
58 CSSParserContext* context = | 58 CSSParserContext* context = |
59 CSSParserContext::Create(ParserContext(), nullptr); | 59 CSSParserContext::Create(ParserContext(), nullptr); |
60 CSSSelectorList selector_list = CSSParser::ParsePageSelector( | 60 CSSSelectorList selector_list = CSSParser::ParsePageSelector( |
61 context, parentStyleSheet() ? parentStyleSheet()->Contents() : nullptr, | 61 *context, parentStyleSheet() ? parentStyleSheet()->Contents() : nullptr, |
62 selector_text); | 62 selector_text); |
63 if (!selector_list.IsValid()) | 63 if (!selector_list.IsValid()) |
64 return; | 64 return; |
65 | 65 |
66 CSSStyleSheet::RuleMutationScope mutation_scope(this); | 66 CSSStyleSheet::RuleMutationScope mutation_scope(this); |
67 | 67 |
68 page_rule_->WrapperAdoptSelectorList(std::move(selector_list)); | 68 page_rule_->WrapperAdoptSelectorList(std::move(selector_list)); |
69 } | 69 } |
70 | 70 |
71 String CSSPageRule::cssText() const { | 71 String CSSPageRule::cssText() const { |
(...skipping 19 matching lines...) Expand all Loading... |
91 properties_cssom_wrapper_->Reattach(page_rule_->MutableProperties()); | 91 properties_cssom_wrapper_->Reattach(page_rule_->MutableProperties()); |
92 } | 92 } |
93 | 93 |
94 DEFINE_TRACE(CSSPageRule) { | 94 DEFINE_TRACE(CSSPageRule) { |
95 visitor->Trace(page_rule_); | 95 visitor->Trace(page_rule_); |
96 visitor->Trace(properties_cssom_wrapper_); | 96 visitor->Trace(properties_cssom_wrapper_); |
97 CSSRule::Trace(visitor); | 97 CSSRule::Trace(visitor); |
98 } | 98 } |
99 | 99 |
100 } // namespace blink | 100 } // namespace blink |
OLD | NEW |