WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 122524
[CSS Shapes] Shape-Margin should be animatable
https://bugs.webkit.org/show_bug.cgi?id=122524
Summary
[CSS Shapes] Shape-Margin should be animatable
Bear Travis
Reported
2013-10-08 14:07:53 PDT
Changing shape-margin dynamically should cause relayout. Shape-margin should also be animatable via CSS.
Attachments
Initial patch
(14.16 KB, patch)
2013-10-08 14:17 PDT
,
Bear Travis
no flags
Details
Formatted Diff
Diff
Incorporating feedback
(12.32 KB, patch)
2013-10-09 14:59 PDT
,
Bear Travis
no flags
Details
Formatted Diff
Diff
Updated patch
(11.05 KB, patch)
2013-10-11 15:20 PDT
,
Bear Travis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Bear Travis
Comment 1
2013-10-08 14:17:51 PDT
Created
attachment 213720
[details]
Initial patch
Darin Adler
Comment 2
2013-10-08 16:40:07 PDT
Comment on
attachment 213720
[details]
Initial patch View in context:
https://bugs.webkit.org/attachment.cgi?id=213720&action=review
> Source/WebCore/ChangeLog:3155 > + [CSS Shapes] Basic shapes should be animatable for shape-outside > +
https://bugs.webkit.org/show_bug.cgi?id=122343
> + > + Reviewed by NOBODY (OOPS!). > + > + Test: fast/shapes/shape-outside-floats/shape-outside-animation.html > + > + Add shape outside to the list of animatable properties. The infrastructure > + is already in place for animating basic shapes on shape-inside and clipping > + paths. See
https://bugs.webkit.org/show_bug.cgi?id=101854
. > + > + * page/animation/CSSPropertyAnimation.cpp: > + (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
Extra change log here. Oops!
> Source/WebCore/rendering/RenderBox.cpp:391 > // FIXME: A future optimization would do a deep comparison for equality. (
bug 100811
)
This comment makes more sense just before the "==". It’s a little strange to have it paragraphed with code that just sets up shapeOutside locals.
> Source/WebCore/rendering/RenderBox.cpp:393 > + const ShapeValue* oldShapeOutside = oldStyle ? oldStyle->shapeOutside() : 0;
Please use nullptr instead of 0.
> Source/WebCore/rendering/RenderBox.cpp:396 > + const Length shapeMargin = style->shapeMargin(); > + const Length oldShapeMargin = oldStyle ? oldStyle->shapeMargin() : RenderStyle::initialShapeMargin();
The const don’t add much value here.
> Source/WebCore/rendering/RenderBox.cpp:405 > ShapeOutsideInfo* shapeOutsideInfo = ShapeOutsideInfo::ensureInfo(this); > shapeOutsideInfo->dirtyShapeSize();
This would read better without the local variable. Also, is it really necessary to create the info with an “ensure” function just to dirty the size? Seems that if there was no info there is nothing to dirty.
> Source/WebCore/rendering/RenderBox.h:645 > - void updateShapeOutsideInfoAfterStyleChange(const ShapeValue* shapeOutside, const ShapeValue* oldShapeOutside); > + void updateShapeOutsideInfoAfterStyleChange(const RenderStyle*, const RenderStyle* oldStyle);
First argument should be const RenderStyle& since it’s guaranteed to never be null.
> LayoutTests/ChangeLog:733 > + [CSS Shapes] Basic shapes should be animatable for shape-outside > +
https://bugs.webkit.org/show_bug.cgi?id=122343
> + > + Reviewed by NOBODY (OOPS!). > + > + Add tests checking that shape-outside basic shape values correctly tween > + between values. > + > + * animations/resources/animation-test-helpers.js: > + (getPropertyValue): Add shape-outside to list of properties that do not parse > + with the default behavior. > + (comparePropertyValue): Compare shape-outsides after parsing their shape notation. > + * fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt: Added. > + * fast/shapes/shape-outside-floats/shape-outside-animation.html: Added.
Extra change log here.
Bear Travis
Comment 3
2013-10-09 14:59:10 PDT
Created
attachment 213819
[details]
Incorporating feedback Making suggested changes. The ensureInfo is called because there may be a ShapeInfo we are going to reuse, in which case we need to dirty the size bit.
Bear Travis
Comment 4
2013-10-11 15:20:51 PDT
Created
attachment 214026
[details]
Updated patch Merging to master/trunk
WebKit Commit Bot
Comment 5
2013-10-14 08:33:16 PDT
Comment on
attachment 214026
[details]
Updated patch Clearing flags on attachment: 214026 Committed
r157400
: <
http://trac.webkit.org/changeset/157400
>
WebKit Commit Bot
Comment 6
2013-10-14 08:33:18 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug