| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 291 |
| 292 void StyleRuleGroup::wrapperRemoveRule(unsigned index) { | 292 void StyleRuleGroup::wrapperRemoveRule(unsigned index) { |
| 293 m_childRules.remove(index); | 293 m_childRules.remove(index); |
| 294 } | 294 } |
| 295 | 295 |
| 296 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleGroup) { | 296 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleGroup) { |
| 297 visitor->trace(m_childRules); | 297 visitor->trace(m_childRules); |
| 298 StyleRuleBase::traceAfterDispatch(visitor); | 298 StyleRuleBase::traceAfterDispatch(visitor); |
| 299 } | 299 } |
| 300 | 300 |
| 301 StyleRuleCondition::StyleRuleCondition( |
| 302 RuleType type, |
| 303 HeapVector<Member<StyleRuleBase>>& adoptRules) |
| 304 : StyleRuleGroup(type, adoptRules) {} |
| 305 |
| 306 StyleRuleCondition::StyleRuleCondition( |
| 307 RuleType type, |
| 308 const String& conditionText, |
| 309 HeapVector<Member<StyleRuleBase>>& adoptRules) |
| 310 : StyleRuleGroup(type, adoptRules), m_conditionText(conditionText) {} |
| 311 |
| 312 StyleRuleCondition::StyleRuleCondition(const StyleRuleCondition& condition) |
| 313 : StyleRuleGroup(condition), m_conditionText(condition.m_conditionText) {} |
| 314 |
| 301 StyleRuleMedia::StyleRuleMedia(MediaQuerySet* media, | 315 StyleRuleMedia::StyleRuleMedia(MediaQuerySet* media, |
| 302 HeapVector<Member<StyleRuleBase>>& adoptRules) | 316 HeapVector<Member<StyleRuleBase>>& adoptRules) |
| 303 : StyleRuleGroup(Media, adoptRules), m_mediaQueries(media) {} | 317 : StyleRuleCondition(Media, adoptRules), m_mediaQueries(media) {} |
| 304 | 318 |
| 305 StyleRuleMedia::StyleRuleMedia(const StyleRuleMedia& o) : StyleRuleGroup(o) { | 319 StyleRuleMedia::StyleRuleMedia(const StyleRuleMedia& media) |
| 306 if (o.m_mediaQueries) | 320 : StyleRuleCondition(media) { |
| 307 m_mediaQueries = o.m_mediaQueries->copy(); | 321 if (media.m_mediaQueries) |
| 322 m_mediaQueries = media.m_mediaQueries->copy(); |
| 308 } | 323 } |
| 309 | 324 |
| 310 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleMedia) { | 325 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleMedia) { |
| 311 visitor->trace(m_mediaQueries); | 326 visitor->trace(m_mediaQueries); |
| 312 StyleRuleGroup::traceAfterDispatch(visitor); | 327 StyleRuleCondition::traceAfterDispatch(visitor); |
| 313 } | 328 } |
| 314 | 329 |
| 315 StyleRuleSupports::StyleRuleSupports( | 330 StyleRuleSupports::StyleRuleSupports( |
| 316 const String& conditionText, | 331 const String& conditionText, |
| 317 bool conditionIsSupported, | 332 bool conditionIsSupported, |
| 318 HeapVector<Member<StyleRuleBase>>& adoptRules) | 333 HeapVector<Member<StyleRuleBase>>& adoptRules) |
| 319 : StyleRuleGroup(Supports, adoptRules), | 334 : StyleRuleCondition(Supports, conditionText, adoptRules), |
| 320 m_conditionText(conditionText), | |
| 321 m_conditionIsSupported(conditionIsSupported) {} | 335 m_conditionIsSupported(conditionIsSupported) {} |
| 322 | 336 |
| 323 StyleRuleSupports::StyleRuleSupports(const StyleRuleSupports& o) | 337 StyleRuleSupports::StyleRuleSupports(const StyleRuleSupports& supports) |
| 324 : StyleRuleGroup(o), | 338 : StyleRuleCondition(supports), |
| 325 m_conditionText(o.m_conditionText), | 339 m_conditionIsSupported(supports.m_conditionIsSupported) {} |
| 326 m_conditionIsSupported(o.m_conditionIsSupported) {} | |
| 327 | 340 |
| 328 StyleRuleViewport::StyleRuleViewport(StylePropertySet* properties) | 341 StyleRuleViewport::StyleRuleViewport(StylePropertySet* properties) |
| 329 : StyleRuleBase(Viewport), m_properties(properties) {} | 342 : StyleRuleBase(Viewport), m_properties(properties) {} |
| 330 | 343 |
| 331 StyleRuleViewport::StyleRuleViewport(const StyleRuleViewport& o) | 344 StyleRuleViewport::StyleRuleViewport(const StyleRuleViewport& o) |
| 332 : StyleRuleBase(o), m_properties(o.m_properties->mutableCopy()) {} | 345 : StyleRuleBase(o), m_properties(o.m_properties->mutableCopy()) {} |
| 333 | 346 |
| 334 StyleRuleViewport::~StyleRuleViewport() {} | 347 StyleRuleViewport::~StyleRuleViewport() {} |
| 335 | 348 |
| 336 MutableStylePropertySet& StyleRuleViewport::mutableProperties() { | 349 MutableStylePropertySet& StyleRuleViewport::mutableProperties() { |
| 337 if (!m_properties->isMutable()) | 350 if (!m_properties->isMutable()) |
| 338 m_properties = m_properties->mutableCopy(); | 351 m_properties = m_properties->mutableCopy(); |
| 339 return *toMutableStylePropertySet(m_properties); | 352 return *toMutableStylePropertySet(m_properties); |
| 340 } | 353 } |
| 341 | 354 |
| 342 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) { | 355 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) { |
| 343 visitor->trace(m_properties); | 356 visitor->trace(m_properties); |
| 344 StyleRuleBase::traceAfterDispatch(visitor); | 357 StyleRuleBase::traceAfterDispatch(visitor); |
| 345 } | 358 } |
| 346 | 359 |
| 347 } // namespace blink | 360 } // namespace blink |
| OLD | NEW |