Bug 122622 - [CSS Shapes] Shape-Image-Threshold should be animatable
Summary: [CSS Shapes] Shape-Image-Threshold should be animatable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Bear Travis
URL:
Keywords:
Depends on:
Blocks: 114546
  Show dependency treegraph
 
Reported: 2013-10-10 14:21 PDT by Bear Travis
Modified: 2013-10-11 11:00 PDT (History)
7 users (show)

See Also:


Attachments
Initial Patch (15.26 KB, patch)
2013-10-10 16:25 PDT, Bear Travis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bear Travis 2013-10-10 14:21:53 PDT
The shape-image-threshold property should respond to dynamic changes (add/modify/remove) and to CSS animations.
Comment 1 Bear Travis 2013-10-10 16:25:03 PDT
Created attachment 213943 [details]
Initial Patch
Comment 2 Darin Adler 2013-10-10 22:42:30 PDT
Comment on attachment 213943 [details]
Initial Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=213943&action=review

> Source/WebCore/rendering/RenderBox.cpp:399
> +        ShapeOutsideInfo::ensureInfo(this)->dirtyShapeSize();

I am surprised that we would ensureInfo just so we can call dirtyShapeSize. Is there really something to dirty if there is no info? Is that really how things work? Did I already ask this in another context?
Comment 3 Bear Travis 2013-10-11 10:36:11 PDT
(In reply to comment #2)
> (From update of attachment 213943 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=213943&action=review
> 
> > Source/WebCore/rendering/RenderBox.cpp:399
> > +        ShapeOutsideInfo::ensureInfo(this)->dirtyShapeSize();
> 
> I am surprised that we would ensureInfo just so we can call dirtyShapeSize. Is there really something to dirty if there is no info? Is that really how things work? Did I already ask this in another context?

Yep. You saw this in Bug 122524. ShapeOutsideInfos are stored in a global map, and ShapeOutsideInfo::ensureInfo will make sure a ShapeOutsideInfo exists for the given key. But it may also return an existing ShapeOutsideInfo if one is already in the map. It's this case we cover with dirtyShapeSize(). We could optimize by checking in ShapeOutsideInfo::dirtyShapeSize whether or not the shape is already dirty, but it currently just clears a RefPtr, which does not seem too costly.
Comment 4 WebKit Commit Bot 2013-10-11 11:00:09 PDT
Comment on attachment 213943 [details]
Initial Patch

Clearing flags on attachment: 213943

Committed r157309: <http://trac.webkit.org/changeset/157309>
Comment 5 WebKit Commit Bot 2013-10-11 11:00:11 PDT
All reviewed patches have been landed.  Closing bug.