[Webkit-unassigned] [Bug 128983] New: [CSS Shapes] SVG Image valued shape fails if root element's size is relative

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 18 11:16:29 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=128983

           Summary: [CSS Shapes] SVG Image valued shape fails if root
                    element's size is relative
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: giles_joplin at yahoo.com


If the value of a shape is an SVG image whose root element has a relative size, the image isn't sized correctly.

The source of the problem, as best I understand it, is that we're not setting the SVGImage's "containerSize", which SVGImage::draw() depends on. What happens instead is that SVGImage::containerSize() returns 300x150, which is the "CSS default intrinsic size". 

I think what needs to be done is the following. Once the shape's SVG image has been loaded and just before it's draw it into a temporary ImageBuffer so that it can be converted it into a RasterShape:

  shapeImageResource.setContainerSizeForRenderer(shapeImageResourceClient, referenceBoxRelativeSize);  
  imageToDraw = shapeImageResource.imageForRenderer(shapeImageResourceClient);

In this case shapeImageResourceClient is the existing ShapeInfo object, which will have to become an ImageResourceClient.

This can't work at the moment because the ImageResource::imageForRenderer() method currently uses a RenderObject* as the SVGImageCache key. It looks like that could be safely changed to ImageResourceClient.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list