WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
60137
Mismatched multiple box-shadows do not transition as expected
https://bugs.webkit.org/show_bug.cgi?id=60137
Summary
Mismatched multiple box-shadows do not transition as expected
Simon Fraser (smfr)
Reported
2011-05-03 20:55:36 PDT
Created
attachment 92188
[details]
Testcase A transition from one inset box-shadow to two shadows, one inset and one outset, doesn't work as expected. See testcase.
Attachments
Testcase
(302 bytes, text/html)
2011-05-03 20:55 PDT
,
Simon Fraser (smfr)
no flags
Details
Patch
(11.52 KB, patch)
2011-05-03 22:33 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(11.50 KB, patch)
2011-05-11 22:18 PDT
,
Simon Fraser (smfr)
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2011-05-03 20:56:03 PDT
<
rdar://problem/9311120
>
Simon Fraser (smfr)
Comment 2
2011-05-03 20:56:17 PDT
The issue here is that shadows are processed in reverse order, and the last shadows have different types in the testcase.
Simon Fraser (smfr)
Comment 3
2011-05-03 22:33:03 PDT
Created
attachment 92193
[details]
Patch
Early Warning System Bot
Comment 4
2011-05-04 02:38:25 PDT
Attachment 92193
[details]
did not build on qt: Build output:
http://queues.webkit.org/results/8551434
WebKit Review Bot
Comment 5
2011-05-04 16:33:25 PDT
Attachment 92193
[details]
did not pass chromium-ews: Output:
http://queues.webkit.org/results/8567003
Simon Fraser (smfr)
Comment 6
2011-05-11 22:18:22 PDT
Created
attachment 93245
[details]
Patch
mitz
Comment 7
2011-05-11 22:37:28 PDT
Comment on
attachment 93245
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=93245&action=review
r+ but please consider addressing at least some of the comments
> Source/WebCore/page/animation/AnimationBase.cpp:330 > +static inline int shadowListLength(const ShadowData* shadow)
Why not size_t?
> Source/WebCore/page/animation/AnimationBase.cpp:394 > + if (fromLength == toLength || ((!fromLength || fromLength == 1) && (!toLength || toLength == 1))) {
If you make shadowListLength return an unsigned type, you will be able to write “(!fromLength || fromLength == 1)” as “fromLength <= 1”
> Source/WebCore/page/animation/AnimationBase.cpp:444 > + Vector<const ShadowData*> fromShadows(fromLength); > + Vector<const ShadowData*> toShadows(toLength); > + > + while (shadowA) { > + fromShadows.prepend(shadowA); > + shadowA = shadowA->next(); > + } > + > + while (shadowB) { > + toShadows.prepend(shadowB); > + shadowB = shadowB->next(); > + }
This is an expensive way of doing things. You initialize fromShadows with fromLength 0 ShadowData pointers in it, then you prepend another fromLength pointers to that. You should do something like for (size_t i = fromLength; i >= 0; --i) { fromShadows[i - 1] = shadowA; shadowA = shadowA->next(); } And it would be better to give these vectors inline capacity to avoid heap allocation.
Simon Fraser (smfr)
Comment 8
2011-05-12 09:38:57 PDT
http://trac.webkit.org/changeset/86351
WebKit Review Bot
Comment 9
2011-05-12 11:10:22 PDT
http://trac.webkit.org/changeset/86351
might have broken GTK Linux 64-bit Debug The following tests are not passing: svg/custom/fill-opacity-update.svg
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