Bug 28705 - <video> tag on a long page gets squished during scrolling
Summary: <video> tag on a long page gets squished during scrolling
Status: RESOLVED DUPLICATE of bug 27272
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P3 Normal
Assignee: Nobody
URL: http://homepage.mac.com/simx/tests/we...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-25 02:11 PDT by Simone Manganelli
Modified: 2009-08-25 10:20 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Manganelli 2009-08-25 02:11:50 PDT
Summary: When a video tag exists on a very vertically long webpage, the space that the video tag takes up in the page layout is correct.  However, the actual video gets rendered in the wrong position.  When onscreen, the video gets squished into ~1/2 the space that the video tag actually takes up in the layout, and as you scroll the webpage down, the video gets increasingly squished as it nears the visible top of the window.


Steps to Reproduce:

1.  Visit this website URL with r47686: http://homepage.mac.com/simx/tests/webkit-video-tag-bug-test.html .  The video will autoplay.  Note that it is already squished to about half its correct height.

2.  Scroll down the page.  Note that the video gets increasingly squished, to the point where it isn't even visible, even though a part of the video should still be visible on the page.

3.  Scroll back up.  Note that the video gets increasingly unsquished, but only to about half the height that it should be.

4.  Control-click on the video, and select "Inspect Element".

5.  Hover your mouse over the video tag in WebKit's inspector view.  Note that the blue outline and tint that is applied to the video element shows that the video tag itself is taking up the correct space on the webpage no matter the scroll position; it's just the video that is being rendered improperly.


Expected Results: I expect videos to play at their normal height.


Actual Results: Depending on how far scrolled down you are on a page, a video can be completely squished vertically out of sight, or just squished to about one half its correct height.


Regression: This issue does not happen with the stock version of Safari 4.0.3.


Workarounds: In more complicated webpages, this issue can be mitigated by *not* applying width and height values on the video tag.  Applying width/height by HTML attributes or by CSS styling both can trigger this bug more often.
Comment 1 Simone Manganelli 2009-08-25 02:16:28 PDT
The comment about not applying height/width styling as a workaround is incorrect.  I thought it worked, but it was actually due to something else.

If the page takes a while to load, you can stop this bug from happening by stopping the page load *after* the video tag loads.  The bug seems to be triggered at the precise moment that the page finishes loading.

So, for example, on a page like this where the bug is triggered:

http://icanhascheezburger.com/2009/08/24/funny-pictures-video-skateboarding-cat/

You can actually *stop* the bug from being triggered by waiting for the video to start playing, and then pressing Cmd-. to stop the page from loading anything after that.
Comment 2 Simone Manganelli 2009-08-25 02:27:04 PDT
Movie of the problem: http://homepage.mac.com/simx/.Movies/stupid_safari_scroll_video.mov

rdar://problem/7167245
Comment 3 Simone Manganelli 2009-08-25 02:54:15 PDT
This bug does not exist in WebKit r45752.  It *does* exist in r45754.  So either r45753 or r45754 introduced this problem.
Comment 4 Mark Rowe (bdash) 2009-08-25 08:36:30 PDT
Yup, <http://trac.webkit.org/changeset/45754> sounds like a plausible change to introduce this sort of problem.
Comment 5 Simon Fraser (smfr) 2009-08-25 08:45:39 PDT
Was fixed in r46947. See duplicate.

*** This bug has been marked as a duplicate of bug 27272 ***
Comment 6 Simone Manganelli 2009-08-25 10:06:20 PDT
I am seeing this bug in r47686.  Are you sure this is fixed, or it hasn't regressed?
Comment 7 Simon Fraser (smfr) 2009-08-25 10:20:15 PDT
I have tested the r47686 nightly, and I can not reproduce the bug.