Changeset 51496 in webkit
- Timestamp:
- Nov 30, 2009 9:25:00 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r51482 r51496 1 2009-11-30 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 Complex test of mask with every combination of maskUnits and maskContentUnits 6 as well as different values for size and position of the mask and it's content. 7 8 * platform/mac/svg/custom/mask-with-all-units-expected.checksum: Added. 9 * platform/mac/svg/custom/mask-with-all-units-expected.png: Added. 10 * platform/mac/svg/custom/mask-with-all-units-expected.txt: Added. 11 * svg/custom/mask-with-all-units.svg: Added. 12 1 13 2009-11-30 Csaba Osztrogonác <ossy@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r51495 r51496 1 2009-11-30 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 REGRESSION (r49757): masking-mask-01-b.svg rendered incorrectly 6 [https://bugs.webkit.org/show_bug.cgi?id=31980] 7 8 It turns out, that we did not handle maskUnits="userSpaceOnUse" 9 correctly. We just need to move the context of the maskImage 10 if maskContentUnits="objectBoundingBox". The context gets scaled 11 on this unit combination, so we have to substract the position of 12 the targetRect. On userSpaceOnUse the position just depends on the 13 position of the mask element. 14 I added a test with some senseless and reasonable values for size 15 and postion of the mask and it's contents. I also used every 16 combination of maskUnits and maskContentUnits to be sure, that it 17 is fixed this time. 18 19 Test: svg/custom/mask-with-all-units.svg 20 21 * svg/SVGMaskElement.cpp: 22 (WebCore::SVGMaskElement::drawMaskerContent): 23 1 24 2009-11-30 Steve Block <steveblock@google.com> 2 25 -
trunk/WebCore/svg/SVGMaskElement.cpp
r50583 r51496 3 3 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 4 2005 Alexander Kellett <lypanov@kde.org> 5 2009 Dirk Schulze <krit@webkit.org> 5 6 6 7 This library is free software; you can redistribute it and/or … … 157 158 158 159 FloatPoint maskContextLocation = maskDestRect.location(); 159 if (maskUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) 160 if (maskUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { 160 161 maskDestRect.move(targetRect.x(), targetRect.y()); 161 162 if (maskContentUnits() != SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) 163 maskContextLocation.move(targetRect.x(), targetRect.y()); 162 if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) 163 maskContextLocation.move(targetRect.x(), targetRect.y()); 164 } else { 165 if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) 166 maskContextLocation.move(-targetRect.x(), -targetRect.y()); 167 } 164 168 165 169 GraphicsContext* maskImageContext = maskImage->context();
Note: See TracChangeset
for help on using the changeset viewer.