| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
| 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2011 Research In Motion Limited. 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 PassRefPtr<MutableStylePropertySet> PropertySetCSSStyleDeclaration::copyProperti
es() const | 305 PassRefPtr<MutableStylePropertySet> PropertySetCSSStyleDeclaration::copyProperti
es() const |
| 306 { | 306 { |
| 307 return m_propertySet->mutableCopy(); | 307 return m_propertySet->mutableCopy(); |
| 308 } | 308 } |
| 309 | 309 |
| 310 bool PropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID
, const CSSValue* propertyValue) const | 310 bool PropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID
, const CSSValue* propertyValue) const |
| 311 { | 311 { |
| 312 return m_propertySet->propertyMatches(propertyID, propertyValue); | 312 return m_propertySet->propertyMatches(propertyID, propertyValue); |
| 313 } | 313 } |
| 314 | 314 |
| 315 StyleRuleCSSStyleDeclaration::StyleRuleCSSStyleDeclaration(StylePropertySet* pro
pertySet, CSSRule* parentRule) | 315 StyleRuleCSSStyleDeclaration::StyleRuleCSSStyleDeclaration(MutableStylePropertyS
et* propertySet, CSSRule* parentRule) |
| 316 : PropertySetCSSStyleDeclaration(propertySet) | 316 : PropertySetCSSStyleDeclaration(propertySet) |
| 317 , m_refCount(1) | 317 , m_refCount(1) |
| 318 , m_parentRule(parentRule) | 318 , m_parentRule(parentRule) |
| 319 { | 319 { |
| 320 m_propertySet->ref(); | 320 m_propertySet->ref(); |
| 321 } | 321 } |
| 322 | 322 |
| 323 StyleRuleCSSStyleDeclaration::~StyleRuleCSSStyleDeclaration() | 323 StyleRuleCSSStyleDeclaration::~StyleRuleCSSStyleDeclaration() |
| 324 { | 324 { |
| 325 m_propertySet->deref(); | 325 m_propertySet->deref(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 351 // Style sheet mutation needs to be signaled even if the change failed. will
MutateRules/didMutateRules must pair. | 351 // Style sheet mutation needs to be signaled even if the change failed. will
MutateRules/didMutateRules must pair. |
| 352 if (m_parentRule && m_parentRule->parentStyleSheet()) | 352 if (m_parentRule && m_parentRule->parentStyleSheet()) |
| 353 m_parentRule->parentStyleSheet()->didMutateRules(); | 353 m_parentRule->parentStyleSheet()->didMutateRules(); |
| 354 } | 354 } |
| 355 | 355 |
| 356 CSSStyleSheet* StyleRuleCSSStyleDeclaration::parentStyleSheet() const | 356 CSSStyleSheet* StyleRuleCSSStyleDeclaration::parentStyleSheet() const |
| 357 { | 357 { |
| 358 return m_parentRule ? m_parentRule->parentStyleSheet() : 0; | 358 return m_parentRule ? m_parentRule->parentStyleSheet() : 0; |
| 359 } | 359 } |
| 360 | 360 |
| 361 void StyleRuleCSSStyleDeclaration::reattach(StylePropertySet* propertySet) | 361 void StyleRuleCSSStyleDeclaration::reattach(MutableStylePropertySet* propertySet
) |
| 362 { | 362 { |
| 363 ASSERT(propertySet); | 363 ASSERT(propertySet); |
| 364 m_propertySet->deref(); | 364 m_propertySet->deref(); |
| 365 m_propertySet = propertySet; | 365 m_propertySet = propertySet; |
| 366 m_propertySet->ref(); | 366 m_propertySet->ref(); |
| 367 } | 367 } |
| 368 | 368 |
| 369 void StyleRuleCSSStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObj
ectInfo) const | 369 void StyleRuleCSSStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObj
ectInfo) const |
| 370 { | 370 { |
| 371 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 371 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 394 m_parentElement->invalidateStyleAttribute(); | 394 m_parentElement->invalidateStyleAttribute(); |
| 395 StyleAttributeMutationScope(this).didInvalidateStyleAttr(); | 395 StyleAttributeMutationScope(this).didInvalidateStyleAttr(); |
| 396 } | 396 } |
| 397 | 397 |
| 398 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const | 398 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const |
| 399 { | 399 { |
| 400 return m_parentElement ? m_parentElement->document()->elementSheet() : 0; | 400 return m_parentElement ? m_parentElement->document()->elementSheet() : 0; |
| 401 } | 401 } |
| 402 | 402 |
| 403 } // namespace WebCore | 403 } // namespace WebCore |
| OLD | NEW |