| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008 Rob Buis <buis@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 if (!extensions->hasPendingResources(resourceId)) | 382 if (!extensions->hasPendingResources(resourceId)) |
| 383 return; | 383 return; |
| 384 | 384 |
| 385 OwnPtr<SVGDocumentExtensions::SVGPendingElements> clients(extensions->remove
PendingResource(resourceId)); | 385 OwnPtr<SVGDocumentExtensions::SVGPendingElements> clients(extensions->remove
PendingResource(resourceId)); |
| 386 ASSERT(!clients->isEmpty()); | 386 ASSERT(!clients->isEmpty()); |
| 387 | 387 |
| 388 const SVGDocumentExtensions::SVGPendingElements::const_iterator end = client
s->end(); | 388 const SVGDocumentExtensions::SVGPendingElements::const_iterator end = client
s->end(); |
| 389 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients-
>begin(); it != end; ++it) { | 389 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients-
>begin(); it != end; ++it) { |
| 390 ASSERT((*it)->hasPendingResources()); | 390 ASSERT((*it)->hasPendingResources()); |
| 391 (*it)->buildPendingResource(); | 391 (*it)->buildPendingResource(); |
| 392 (*it)->setHasPendingResources(false); | 392 (*it)->clearHasPendingResourcesIfPossible(); |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 | 395 |
| 396 void SVGStyledElement::removedFromDocument() | 396 void SVGStyledElement::removedFromDocument() |
| 397 { | 397 { |
| 398 updateRelativeLengthsInformation(false, this); | 398 updateRelativeLengthsInformation(false, this); |
| 399 SVGElement::removedFromDocument(); | 399 SVGElement::removedFromDocument(); |
| 400 SVGElementInstance::invalidateAllInstancesOfElement(this); | 400 SVGElementInstance::invalidateAllInstancesOfElement(this); |
| 401 | 401 |
| 402 Document* document = this->document(); | 402 Document* document = this->document(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 { | 449 { |
| 450 if (hasRareSVGData()) | 450 if (hasRareSVGData()) |
| 451 rareSVGData()->setInstanceUpdatesBlocked(value); | 451 rareSVGData()->setInstanceUpdatesBlocked(value); |
| 452 } | 452 } |
| 453 | 453 |
| 454 bool SVGStyledElement::hasPendingResources() const | 454 bool SVGStyledElement::hasPendingResources() const |
| 455 { | 455 { |
| 456 return hasRareSVGData() && rareSVGData()->hasPendingResources(); | 456 return hasRareSVGData() && rareSVGData()->hasPendingResources(); |
| 457 } | 457 } |
| 458 | 458 |
| 459 void SVGStyledElement::setHasPendingResources(bool value) | 459 void SVGStyledElement::setHasPendingResources() |
| 460 { | 460 { |
| 461 ensureRareSVGData()->setHasPendingResources(value); | 461 ensureRareSVGData()->setHasPendingResources(true); |
| 462 } |
| 463 |
| 464 void SVGStyledElement::clearHasPendingResourcesIfPossible() |
| 465 { |
| 466 if (!document()->accessSVGExtensions()->isElementInPendingResources(this)) |
| 467 ensureRareSVGData()->setHasPendingResources(false); |
| 462 } | 468 } |
| 463 | 469 |
| 464 AffineTransform SVGStyledElement::localCoordinateSpaceTransform(SVGLocatable::CT
MScope) const | 470 AffineTransform SVGStyledElement::localCoordinateSpaceTransform(SVGLocatable::CT
MScope) const |
| 465 { | 471 { |
| 466 // To be overriden by SVGStyledLocatableElement/SVGStyledTransformableElemen
t (or as special case SVGTextElement) | 472 // To be overriden by SVGStyledLocatableElement/SVGStyledTransformableElemen
t (or as special case SVGTextElement) |
| 467 ASSERT_NOT_REACHED(); | 473 ASSERT_NOT_REACHED(); |
| 468 return AffineTransform(); | 474 return AffineTransform(); |
| 469 } | 475 } |
| 470 | 476 |
| 471 void SVGStyledElement::updateRelativeLengthsInformation(bool hasRelativeLengths,
SVGStyledElement* element) | 477 void SVGStyledElement::updateRelativeLengthsInformation(bool hasRelativeLengths,
SVGStyledElement* element) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 } | 522 } |
| 517 | 523 |
| 518 bool SVGStyledElement::isKeyboardFocusable(KeyboardEvent*) const | 524 bool SVGStyledElement::isKeyboardFocusable(KeyboardEvent*) const |
| 519 { | 525 { |
| 520 return isMouseFocusable(); | 526 return isMouseFocusable(); |
| 521 } | 527 } |
| 522 | 528 |
| 523 } | 529 } |
| 524 | 530 |
| 525 #endif // ENABLE(SVG) | 531 #endif // ENABLE(SVG) |
| OLD | NEW |