| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann |
| 3 * <zimmermann@kde.org> | 3 * <zimmermann@kde.org> |
| 4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 5 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 6 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 6 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 7 * Copyright (C) 2012 University of Szeged | 7 * Copyright (C) 2012 University of Szeged |
| 8 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> | 8 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 height_->CurrentValue()->IsRelative()) | 669 height_->CurrentValue()->IsRelative()) |
| 670 return true; | 670 return true; |
| 671 | 671 |
| 672 if (!target_element_instance_) | 672 if (!target_element_instance_) |
| 673 return false; | 673 return false; |
| 674 | 674 |
| 675 return target_element_instance_->HasRelativeLengths(); | 675 return target_element_instance_->HasRelativeLengths(); |
| 676 } | 676 } |
| 677 | 677 |
| 678 FloatRect SVGUseElement::GetBBox() { | 678 FloatRect SVGUseElement::GetBBox() { |
| 679 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 679 DCHECK(GetLayoutObject()); |
| 680 | |
| 681 if (!GetLayoutObject()) | |
| 682 return FloatRect(); | |
| 683 | |
| 684 LayoutSVGTransformableContainer& transformable_container = | 680 LayoutSVGTransformableContainer& transformable_container = |
| 685 ToLayoutSVGTransformableContainer(*GetLayoutObject()); | 681 ToLayoutSVGTransformableContainer(*GetLayoutObject()); |
| 686 // Don't apply the additional translation if the oBB is invalid. | 682 // Don't apply the additional translation if the oBB is invalid. |
| 687 if (!transformable_container.IsObjectBoundingBoxValid()) | 683 if (!transformable_container.IsObjectBoundingBoxValid()) |
| 688 return FloatRect(); | 684 return FloatRect(); |
| 689 | 685 |
| 690 // TODO(fs): Preferably this would just use objectBoundingBox() (and hence | 686 // TODO(fs): Preferably this would just use objectBoundingBox() (and hence |
| 691 // don't need to override SVGGraphicsElement::getBBox at all) and be | 687 // don't need to override SVGGraphicsElement::getBBox at all) and be |
| 692 // correct without additional work. That will not work out ATM without | 688 // correct without additional work. That will not work out ATM without |
| 693 // additional quirks. The problem stems from including the additional | 689 // additional quirks. The problem stems from including the additional |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 | 746 |
| 751 if (resource_) | 747 if (resource_) |
| 752 resource_->RemoveClient(this); | 748 resource_->RemoveClient(this); |
| 753 | 749 |
| 754 resource_ = resource; | 750 resource_ = resource; |
| 755 if (resource_) | 751 if (resource_) |
| 756 resource_->AddClient(this); | 752 resource_->AddClient(this); |
| 757 } | 753 } |
| 758 | 754 |
| 759 } // namespace blink | 755 } // namespace blink |
| OLD | NEW |