| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 m_propertySet->ref(); | 342 m_propertySet->ref(); |
| 343 #endif | 343 #endif |
| 344 } | 344 } |
| 345 | 345 |
| 346 DEFINE_TRACE(StyleRuleCSSStyleDeclaration) | 346 DEFINE_TRACE(StyleRuleCSSStyleDeclaration) |
| 347 { | 347 { |
| 348 visitor->trace(m_parentRule); | 348 visitor->trace(m_parentRule); |
| 349 PropertySetCSSStyleDeclaration::trace(visitor); | 349 PropertySetCSSStyleDeclaration::trace(visitor); |
| 350 } | 350 } |
| 351 | 351 |
| 352 InlineCSSStyleDeclaration::InlineCSSStyleDeclaration(Element* parentElement) | |
| 353 : m_parentElement(parentElement) | |
| 354 { | |
| 355 } | |
| 356 | |
| 357 MutableStylePropertySet& InlineCSSStyleDeclaration::propertySet() const | 352 MutableStylePropertySet& InlineCSSStyleDeclaration::propertySet() const |
| 358 { | 353 { |
| 359 return m_parentElement->ensureMutableInlineStyle(); | 354 return m_parentElement->ensureMutableInlineStyle(); |
| 360 } | 355 } |
| 361 | 356 |
| 362 void InlineCSSStyleDeclaration::didMutate(MutationType type) | 357 void InlineCSSStyleDeclaration::didMutate(MutationType type) |
| 363 { | 358 { |
| 364 if (type == NoChanges) | 359 if (type == NoChanges) |
| 365 return; | 360 return; |
| 366 | 361 |
| 367 if (!m_parentElement) | 362 if (!m_parentElement) |
| 368 return; | 363 return; |
| 369 | 364 |
| 370 m_parentElement->clearMutableInlineStyleIfEmpty(); | 365 m_parentElement->clearMutableInlineStyleIfEmpty(); |
| 371 m_parentElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForT
racing::create(StyleChangeReason::InlineCSSStyleMutated)); | 366 m_parentElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForT
racing::create(StyleChangeReason::InlineCSSStyleMutated)); |
| 372 m_parentElement->invalidateStyleAttribute(); | 367 m_parentElement->invalidateStyleAttribute(); |
| 373 StyleAttributeMutationScope(this).didInvalidateStyleAttr(); | 368 StyleAttributeMutationScope(this).didInvalidateStyleAttr(); |
| 374 } | 369 } |
| 375 | 370 |
| 376 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const | 371 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const |
| 377 { | 372 { |
| 378 return m_parentElement ? &m_parentElement->document().elementSheet() : nullp
tr; | 373 return m_parentElement ? &m_parentElement->document().elementSheet() : nullp
tr; |
| 379 } | 374 } |
| 380 | 375 |
| 381 Element* InlineCSSStyleDeclaration::parentElement() const | |
| 382 { | |
| 383 return m_parentElement; | |
| 384 } | |
| 385 | |
| 386 #if !ENABLE(OILPAN) | 376 #if !ENABLE(OILPAN) |
| 387 void InlineCSSStyleDeclaration::ref() | 377 void InlineCSSStyleDeclaration::ref() |
| 388 { | 378 { |
| 389 m_parentElement->ref(); | 379 m_parentElement->ref(); |
| 390 } | 380 } |
| 391 | 381 |
| 392 void InlineCSSStyleDeclaration::deref() | 382 void InlineCSSStyleDeclaration::deref() |
| 393 { | 383 { |
| 394 m_parentElement->deref(); | 384 m_parentElement->deref(); |
| 395 } | 385 } |
| 396 #endif | 386 #endif |
| 397 | 387 |
| 398 DEFINE_TRACE(InlineCSSStyleDeclaration) | 388 DEFINE_TRACE(InlineCSSStyleDeclaration) |
| 399 { | 389 { |
| 400 visitor->trace(m_parentElement); | 390 visitor->trace(m_parentElement); |
| 401 AbstractPropertySetCSSStyleDeclaration::trace(visitor); | 391 AbstractPropertySetCSSStyleDeclaration::trace(visitor); |
| 402 } | 392 } |
| 403 | 393 |
| 404 } // namespace blink | 394 } // namespace blink |
| OLD | NEW |