Changeset 21636 in webkit
- Timestamp:
- May 21, 2007 8:10:06 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r21633 r21636 1 2007-05-21 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Sam. 4 5 Layout test for http://bugs.webkit.org/show_bug.cgi?id=13789 6 7 * svg/custom/getscreenctm-in-mixed-content-expected.checksum: Added. 8 * svg/custom/getscreenctm-in-mixed-content-expected.png: Added. 9 * svg/custom/getscreenctm-in-mixed-content-expected.txt: Added. 10 * svg/custom/getscreenctm-in-mixed-content.xhtml: Added. 11 1 12 2007-05-21 Sam Weinig <sam@webkit.org> 2 13 -
trunk/WebCore/ChangeLog
r21635 r21636 1 2007-05-21 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Sam. 4 5 Fix for http://bugs.webkit.org/show_bug.cgi?id=13789 6 -- SVGLocatable::getScreenCTM() faulty 7 8 Needed to update SVGLength to handle the case where the SVGElement is 9 not the root document element -- we do this by falling back on the 10 renderer for the context. 11 12 For <svg> elements embedded as mixed content in xhtml we consider the 13 absolutePosition of the parent to be the origin for the <svg> element. 14 15 * ksvg2/svg/SVGLength.cpp: 16 (WebCore::SVGLength::PercentageOfViewport): 17 * ksvg2/svg/SVGSVGElement.cpp: 18 (WebCore::SVGSVGElement::getScreenCTM): 19 1 20 2007-05-21 Timothy Hatcher <timothy@apple.com> 2 21 -
trunk/WebCore/ksvg2/svg/SVGLength.cpp
r19855 r21636 2 2 Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 3 2004, 2005, 2006 Rob Buis <buis@kde.org> 4 2007 Apple Inc. All rights reserved. 4 5 5 6 This file is part of the KDE project … … 294 295 height = svg->height().value(); 295 296 } 297 } else if (context->parent() && !context->parent()->isSVGElement()) { 298 if (RenderObject* renderer = context->renderer()) { 299 width = renderer->width(); 300 height = renderer->height(); 301 } 296 302 } 297 303 -
trunk/WebCore/ksvg2/svg/SVGSVGElement.cpp
r21272 r21636 2 2 Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 3 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 2007 Apple Inc. All rights reserved. 4 5 5 6 This file is part of the KDE project … … 336 337 AffineTransform SVGSVGElement::getScreenCTM() const 337 338 { 339 // FIXME: This assumes that any <svg> element not immediately descending from another SVGElement 340 // has *no* svg ancestors 341 document()->updateLayoutIgnorePendingStylesheets(); 342 float rootX = x().value(); 343 float rootY = y().value(); 344 345 if (RenderObject* renderer = this->renderer()) { 346 renderer = renderer->parent(); 347 if (renderer && !(renderer->element() && renderer->element()->isSVGElement())) { 348 int tx = 0; 349 int ty = 0; 350 renderer->absolutePosition(tx, ty, true); 351 rootX += tx; 352 rootY += ty; 353 } 354 } 355 338 356 AffineTransform mat = SVGStyledLocatableElement::getScreenCTM(); 339 mat.translate( x().value(), y().value());357 mat.translate(rootX, rootY); 340 358 341 359 if (attributes()->getNamedItem(SVGNames::viewBoxAttr)) {
Note: See TracChangeset
for help on using the changeset viewer.