| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 432 |
| 433 Element::copyNonAttributeProperties(sourceElement); | 433 Element::copyNonAttributeProperties(sourceElement); |
| 434 } | 434 } |
| 435 | 435 |
| 436 void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const | 436 void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const |
| 437 { | 437 { |
| 438 if (CSSMutableStyleDeclaration* style = inlineStyleDecl()) | 438 if (CSSMutableStyleDeclaration* style = inlineStyleDecl()) |
| 439 style->addSubresourceStyleURLs(urls); | 439 style->addSubresourceStyleURLs(urls); |
| 440 } | 440 } |
| 441 | 441 |
| 442 void StyledElement::insertedIntoDocument() |
| 443 { |
| 444 Element::insertedIntoDocument(); |
| 445 |
| 446 if (m_inlineStyleDecl) |
| 447 m_inlineStyleDecl->setParent(document()->elementSheet()); |
| 448 } |
| 449 |
| 450 void StyledElement::removedFromDocument() |
| 451 { |
| 452 if (m_inlineStyleDecl) |
| 453 m_inlineStyleDecl->setParent(0); |
| 454 |
| 455 Element::removedFromDocument(); |
| 456 } |
| 442 | 457 |
| 443 void StyledElement::didMoveToNewOwnerDocument() | 458 void StyledElement::didMoveToNewOwnerDocument() |
| 444 { | 459 { |
| 445 if (m_inlineStyleDecl) | 460 if (m_inlineStyleDecl) |
| 446 m_inlineStyleDecl->setParent(document()->elementSheet()); | 461 m_inlineStyleDecl->setParent(document()->elementSheet()); |
| 447 | 462 |
| 448 Element::didMoveToNewOwnerDocument(); | 463 Element::didMoveToNewOwnerDocument(); |
| 449 } | 464 } |
| 450 | 465 |
| 451 } | 466 } |
| OLD | NEW |