Bug 76886 - [WK2][Qt] REGRESSION: Pages with transform animations sometimes omit some of the layers since r105413
Summary: [WK2][Qt] REGRESSION: Pages with transform animations sometimes omit some of ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2012-01-23 17:17 PST by Noam Rosenthal
Modified: 2012-01-25 15:41 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.86 KB, patch)
2012-01-23 17:21 PST, Noam Rosenthal
no flags Details | Formatted Diff | Diff
Patch (3.86 KB, patch)
2012-01-23 17:22 PST, Noam Rosenthal
no flags Details | Formatted Diff | Diff
Patch (6.95 KB, patch)
2012-01-25 14:25 PST, Noam Rosenthal
kenneth: review+
Details | Formatted Diff | Diff
Patch (6.90 KB, patch)
2012-01-25 14:44 PST, Noam Rosenthal
noam: commit-queue+
Details | Formatted Diff | Diff
Patch (6.91 KB, patch)
2012-01-25 14:51 PST, Noam Rosenthal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Rosenthal 2012-01-23 17:17:58 PST
This is a regression since we're calculating the layers' visible rects based on their transform, while ignoring that the transform might change while animating.
Comment 1 Noam Rosenthal 2012-01-23 17:21:04 PST
Created attachment 123669 [details]
Patch
Comment 2 Noam Rosenthal 2012-01-23 17:22:02 PST
Created attachment 123670 [details]
Patch
Comment 3 WebKit Review Bot 2012-01-23 17:25:14 PST
Attachment 123669 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1

Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.h:38:  wtf includes should be <wtf/file.h> instead of "wtf/file.h".  [build/include] [4]
Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.h:38:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Noam Rosenthal 2012-01-25 14:25:09 PST
Created attachment 124012 [details]
Patch
Comment 5 Kenneth Rohde Christiansen 2012-01-25 14:37:43 PST
Comment on attachment 124012 [details]
Patch

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

Seems ok to me

> Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:551
> +    // If this layer is part of an active transform animation, the visible rect might change, so we rather render the whole layer
> +    // until some better optimization is available.

I would break the line after the second ,. Then they will have almost the same size

> Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:553
> +    if (selfOrAncestorHasActiveTransformAnimations())
> +        return tiledBackingStoreContentsRect();

Did you do some measurements of this? regarding to the comment in the changelog

> Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:725
> +    if (!parent())
> +        return false;
> +    return toWebGraphicsLayer(parent())->selfOrAncestorHasActiveTransformAnimations();

wouldnt it read nicer

if (parent())
    return toWeb....parent()...

return false;
Comment 6 Noam Rosenthal 2012-01-25 14:42:46 PST
> > Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:553
> > +    if (selfOrAncestorHasActiveTransformAnimations())
> > +        return tiledBackingStoreContentsRect();
> 
> Did you do some measurements of this? regarding to the comment in the changelog
No... if I had a viable alternative I'd measure it vs. this solution :) Problem is that if I'd calculate the visible rect based on all the transform keyframes, I could still reach a point where a huge layer is entirely visible. What we should probably do in that case is not have content-scale for huge transformed layers, but that should come later as it's tricky.
Comment 7 Noam Rosenthal 2012-01-25 14:44:15 PST
Created attachment 124015 [details]
Patch
Comment 8 Noam Rosenthal 2012-01-25 14:51:06 PST
Created attachment 124017 [details]
Patch
Comment 9 WebKit Review Bot 2012-01-25 15:40:56 PST
Comment on attachment 124017 [details]
Patch

Clearing flags on attachment: 124017

Committed r105934: <http://trac.webkit.org/changeset/105934>
Comment 10 WebKit Review Bot 2012-01-25 15:41:01 PST
All reviewed patches have been landed.  Closing bug.