[Webkit-unassigned] [Bug 131444] [CSS Shapes] Add support for shape-outside gradient values

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 18 12:23:54 PDT 2014


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





--- Comment #6 from Hans Muller <giles_joplin at yahoo.com>  2014-04-18 12:24:14 PST ---
(In reply to comment #5)
> (From update of attachment 229578 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=229578&action=review
> 
> > Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp:123
> > +static inline bool checkShapeImageOrigin(Document& document, const ShapeValue& shapeValue)
> 
> Why take a ShapeValue instead of a StyleImage?

I've changed the parameter to StyleImage*.


> > Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp:128
> > +    CachedImage& cachedImage = *(shapeValue.image()->cachedImage());
> 
> I'd ASSERT(shapeValue.image()->cachedImage()) first, just to be safe.

OK.

> 
> > Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp:151
> > +        image = styleImage->image(const_cast<RenderBox*>(&renderBox), imageSize).get();
> 
> The const_cast makes me very uncomfortable. There isn't a better way to do this? Maybe we need to refactor StyleImage so it can take a const?

I did take a shot at that. The overall change would be much bigger than this patch.  There are about 10 classes that implement this image() method and in some cases the not-const RenderElement is passed along to other methods.  If it's worth tracking down the complete transitive closure of the change, it might be better to do it as a separate patch.

-- 
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