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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 232 |
233 StyleRule::StyleRule(const StyleRule& o) | 233 StyleRule::StyleRule(const StyleRule& o) |
234 : StyleRuleBase(o), | 234 : StyleRuleBase(o), |
235 selector_list_(o.selector_list_.Copy()), | 235 selector_list_(o.selector_list_.Copy()), |
236 properties_(o.Properties().MutableCopy()), | 236 properties_(o.Properties().MutableCopy()), |
237 should_consider_for_matching_rules_(kConsiderIfNonEmpty) {} | 237 should_consider_for_matching_rules_(kConsiderIfNonEmpty) {} |
238 | 238 |
239 StyleRule::~StyleRule() {} | 239 StyleRule::~StyleRule() {} |
240 | 240 |
241 MutableStylePropertySet& StyleRule::MutableProperties() { | 241 MutableStylePropertySet& StyleRule::MutableProperties() { |
242 // Ensure m_properties is initialized. | 242 // Ensure properties_ is initialized. |
243 if (!Properties().IsMutable()) | 243 if (!Properties().IsMutable()) |
244 properties_ = properties_->MutableCopy(); | 244 properties_ = properties_->MutableCopy(); |
245 return *ToMutableStylePropertySet(properties_.Get()); | 245 return *ToMutableStylePropertySet(properties_.Get()); |
246 } | 246 } |
247 | 247 |
248 bool StyleRule::PropertiesHaveFailedOrCanceledSubresources() const { | 248 bool StyleRule::PropertiesHaveFailedOrCanceledSubresources() const { |
249 return properties_ && properties_->HasFailedOrCanceledSubresources(); | 249 return properties_ && properties_->HasFailedOrCanceledSubresources(); |
250 } | 250 } |
251 | 251 |
252 bool StyleRule::ShouldConsiderForMatchingRules(bool include_empty_rules) const { | 252 bool StyleRule::ShouldConsiderForMatchingRules(bool include_empty_rules) const { |
253 DCHECK(should_consider_for_matching_rules_ == kAlwaysConsider || properties_); | 253 DCHECK(should_consider_for_matching_rules_ == kAlwaysConsider || properties_); |
254 return include_empty_rules || | 254 return include_empty_rules || |
255 should_consider_for_matching_rules_ == kAlwaysConsider || | 255 should_consider_for_matching_rules_ == kAlwaysConsider || |
256 !properties_->IsEmpty(); | 256 !properties_->IsEmpty(); |
257 } | 257 } |
258 | 258 |
259 bool StyleRule::HasParsedProperties() const { | 259 bool StyleRule::HasParsedProperties() const { |
260 // StyleRule should only have one of {m_lazyPropertyParser, m_properties} set. | 260 // StyleRule should only have one of {lazy_property_parser_, properties_} set. |
261 DCHECK(lazy_property_parser_ || properties_); | 261 DCHECK(lazy_property_parser_ || properties_); |
262 DCHECK(!lazy_property_parser_ || !properties_); | 262 DCHECK(!lazy_property_parser_ || !properties_); |
263 return !lazy_property_parser_; | 263 return !lazy_property_parser_; |
264 } | 264 } |
265 | 265 |
266 DEFINE_TRACE_AFTER_DISPATCH(StyleRule) { | 266 DEFINE_TRACE_AFTER_DISPATCH(StyleRule) { |
267 visitor->Trace(properties_); | 267 visitor->Trace(properties_); |
268 visitor->Trace(lazy_property_parser_); | 268 visitor->Trace(lazy_property_parser_); |
269 StyleRuleBase::TraceAfterDispatch(visitor); | 269 StyleRuleBase::TraceAfterDispatch(visitor); |
270 } | 270 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 properties_ = properties_->MutableCopy(); | 393 properties_ = properties_->MutableCopy(); |
394 return *ToMutableStylePropertySet(properties_); | 394 return *ToMutableStylePropertySet(properties_); |
395 } | 395 } |
396 | 396 |
397 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) { | 397 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) { |
398 visitor->Trace(properties_); | 398 visitor->Trace(properties_); |
399 StyleRuleBase::TraceAfterDispatch(visitor); | 399 StyleRuleBase::TraceAfterDispatch(visitor); |
400 } | 400 } |
401 | 401 |
402 } // namespace blink | 402 } // namespace blink |
OLD | NEW |