| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2014 Google, Inc. | 5 * Copyright (C) 2014 Google, Inc. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 void CommitChange() override { | 124 void CommitChange() override { |
| 125 DCHECK(contextElement()); | 125 DCHECK(contextElement()); |
| 126 toSVGSVGElement(contextElement())->UpdateUserTransform(); | 126 toSVGSVGElement(contextElement())->UpdateUserTransform(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 SVGCurrentTranslateTearOff(SVGSVGElement* context_element) | 130 SVGCurrentTranslateTearOff(SVGSVGElement* context_element) |
| 131 : SVGPointTearOff(context_element->translation_, | 131 : SVGPointTearOff(context_element->translation_, |
| 132 context_element, | 132 context_element, |
| 133 kPropertyIsNotAnimVal) {} | 133 kPropertyIsNotAnimVal, |
| 134 QualifiedName::Null()) {} |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 SVGPointTearOff* SVGSVGElement::currentTranslateFromJavascript() { | 137 SVGPointTearOff* SVGSVGElement::currentTranslateFromJavascript() { |
| 137 return SVGCurrentTranslateTearOff::Create(this); | 138 return SVGCurrentTranslateTearOff::Create(this); |
| 138 } | 139 } |
| 139 | 140 |
| 140 void SVGSVGElement::SetCurrentTranslate(const FloatPoint& point) { | 141 void SVGSVGElement::SetCurrentTranslate(const FloatPoint& point) { |
| 141 translation_->SetValue(point); | 142 translation_->SetValue(point); |
| 142 UpdateUserTransform(); | 143 UpdateUserTransform(); |
| 143 } | 144 } |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 return CheckIntersectionOrEnclosure(*element, rect->Target()->Value(), | 415 return CheckIntersectionOrEnclosure(*element, rect->Target()->Value(), |
| 415 kCheckEnclosure); | 416 kCheckEnclosure); |
| 416 } | 417 } |
| 417 | 418 |
| 418 void SVGSVGElement::deselectAll() { | 419 void SVGSVGElement::deselectAll() { |
| 419 if (LocalFrame* frame = GetDocument().GetFrame()) | 420 if (LocalFrame* frame = GetDocument().GetFrame()) |
| 420 frame->Selection().Clear(); | 421 frame->Selection().Clear(); |
| 421 } | 422 } |
| 422 | 423 |
| 423 SVGNumberTearOff* SVGSVGElement::createSVGNumber() { | 424 SVGNumberTearOff* SVGSVGElement::createSVGNumber() { |
| 424 return SVGNumberTearOff::Create(SVGNumber::Create(0.0f), 0, | 425 return SVGNumberTearOff::CreateDetached(); |
| 425 kPropertyIsNotAnimVal); | |
| 426 } | 426 } |
| 427 | 427 |
| 428 SVGLengthTearOff* SVGSVGElement::createSVGLength() { | 428 SVGLengthTearOff* SVGSVGElement::createSVGLength() { |
| 429 return SVGLengthTearOff::Create(SVGLength::Create(), 0, | 429 return SVGLengthTearOff::CreateDetached(); |
| 430 kPropertyIsNotAnimVal); | |
| 431 } | 430 } |
| 432 | 431 |
| 433 SVGAngleTearOff* SVGSVGElement::createSVGAngle() { | 432 SVGAngleTearOff* SVGSVGElement::createSVGAngle() { |
| 434 return SVGAngleTearOff::Create(SVGAngle::Create(), 0, kPropertyIsNotAnimVal); | 433 return SVGAngleTearOff::CreateDetached(); |
| 435 } | 434 } |
| 436 | 435 |
| 437 SVGPointTearOff* SVGSVGElement::createSVGPoint() { | 436 SVGPointTearOff* SVGSVGElement::createSVGPoint() { |
| 438 return SVGPointTearOff::Create(SVGPoint::Create(), 0, kPropertyIsNotAnimVal); | 437 return SVGPointTearOff::CreateDetached(FloatPoint(0, 0)); |
| 439 } | 438 } |
| 440 | 439 |
| 441 SVGMatrixTearOff* SVGSVGElement::createSVGMatrix() { | 440 SVGMatrixTearOff* SVGSVGElement::createSVGMatrix() { |
| 442 return SVGMatrixTearOff::Create(AffineTransform()); | 441 return SVGMatrixTearOff::Create(AffineTransform()); |
| 443 } | 442 } |
| 444 | 443 |
| 445 SVGRectTearOff* SVGSVGElement::createSVGRect() { | 444 SVGRectTearOff* SVGSVGElement::createSVGRect() { |
| 446 return SVGRectTearOff::Create(SVGRect::Create(), 0, kPropertyIsNotAnimVal); | 445 return SVGRectTearOff::CreateDetached(FloatRect(0, 0, 0, 0)); |
| 447 } | 446 } |
| 448 | 447 |
| 449 SVGTransformTearOff* SVGSVGElement::createSVGTransform() { | 448 SVGTransformTearOff* SVGSVGElement::createSVGTransform() { |
| 450 return SVGTransformTearOff::Create(SVGTransform::Create(kSvgTransformMatrix), | 449 return SVGTransformTearOff::CreateDetached(); |
| 451 0, kPropertyIsNotAnimVal); | |
| 452 } | 450 } |
| 453 | 451 |
| 454 SVGTransformTearOff* SVGSVGElement::createSVGTransformFromMatrix( | 452 SVGTransformTearOff* SVGSVGElement::createSVGTransformFromMatrix( |
| 455 SVGMatrixTearOff* matrix) { | 453 SVGMatrixTearOff* matrix) { |
| 456 return SVGTransformTearOff::Create(matrix); | 454 return SVGTransformTearOff::Create(matrix); |
| 457 } | 455 } |
| 458 | 456 |
| 459 AffineTransform SVGSVGElement::LocalCoordinateSpaceTransform( | 457 AffineTransform SVGSVGElement::LocalCoordinateSpaceTransform( |
| 460 CTMScope mode) const { | 458 CTMScope mode) const { |
| 461 AffineTransform transform; | 459 AffineTransform transform; |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 visitor->Trace(width_); | 762 visitor->Trace(width_); |
| 765 visitor->Trace(height_); | 763 visitor->Trace(height_); |
| 766 visitor->Trace(translation_); | 764 visitor->Trace(translation_); |
| 767 visitor->Trace(time_container_); | 765 visitor->Trace(time_container_); |
| 768 visitor->Trace(view_spec_); | 766 visitor->Trace(view_spec_); |
| 769 SVGGraphicsElement::Trace(visitor); | 767 SVGGraphicsElement::Trace(visitor); |
| 770 SVGFitToViewBox::Trace(visitor); | 768 SVGFitToViewBox::Trace(visitor); |
| 771 } | 769 } |
| 772 | 770 |
| 773 } // namespace blink | 771 } // namespace blink |
| OLD | NEW |