Bug 42579 - CSS rotation transform can cause elements with certain styles to vanish during rotation.
Summary: CSS rotation transform can cause elements with certain styles to vanish durin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Simon Fraser (smfr)
URL: http://mrdarcymurphy.com/tests/css-ro...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-07-19 11:24 PDT by mrDarcyMurphy
Modified: 2010-07-21 08:14 PDT (History)
2 users (show)

See Also:


Attachments
Testcase (1.56 KB, text/html)
2010-07-19 14:37 PDT, Simon Fraser (smfr)
no flags Details
Patch (8.41 KB, patch)
2010-07-20 22:30 PDT, Simon Fraser (smfr)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mrDarcyMurphy 2010-07-19 11:24:17 PDT
While an element is rotating, any element on the page that has no height, no width, is absolutely positioned, and has overflow set to hidden will vanish for the duration of the animation.
I found this because a crucial element on a page had all those, yet still had a border, and then disappeared.
Comment 1 Mark Rowe (bdash) 2010-07-19 12:16:32 PDT
<rdar://problem/8207271>
Comment 2 Simon Fraser (smfr) 2010-07-19 14:37:19 PDT
Created attachment 61993 [details]
Testcase
Comment 3 Simon Fraser (smfr) 2010-07-20 21:25:46 PDT
The disappearing element has zero height and width but a large border. clipRectToApply ends up as a 0x0 rect in RenderLayerBacking::paintIntoLayer().
Comment 4 Simon Fraser (smfr) 2010-07-20 21:37:34 PDT
Hmm, RenderBlock::paint() is short-circuiting the paint here:

    // Check if we need to do anything at all.
    // FIXME: Could eliminate the isRoot() check if we fix background painting so that the RenderView
    // paints the root's background.
    if (!isRoot()) {
        IntRect overflowBox = visibleOverflowRect();
        overflowBox.inflate(maximalOutlineSize(paintInfo.phase));
        overflowBox.move(tx, ty);
        if (!overflowBox.intersects(paintInfo.rect))
            return;
    }

paintInfo.rect is the empty rect from clipRectToApply
Comment 5 Simon Fraser (smfr) 2010-07-20 21:47:27 PDT
Ah, this is caused by the 'inflate the paintBox for the body' logic in RenderLayerBacking::paintIntoLayer().
Comment 6 Simon Fraser (smfr) 2010-07-20 22:30:46 PDT
Created attachment 62144 [details]
Patch
Comment 7 Simon Fraser (smfr) 2010-07-21 08:14:32 PDT
http://trac.webkit.org/changeset/63820