Issue 248664 in chromium: Extensions: captureVisibleTab sometimes captures the scrollbar

77 views
Skip to first unread message

chro...@googlecode.com

unread,
Jun 11, 2013, 4:26:54 PM6/11/13
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Cr-Platform-Extensions Pri-2 Via-Wizard Type-Bug OS-Windows

New issue 248664 by qufighter: Extensions: captureVisibleTab sometimes
captures the scrollbar
http://code.google.com/p/chromium/issues/detail?id=248664

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/29.0.1530.2 Safari/537.36

Steps to reproduce the problem:
1. Run captureVisibleTab extension on page that has the CSS rule:
img{max-width:100%;}
2. Notice that the scroll bar is captured as part of the image.
3. Notice that the entire image has been symmetrically shrunken, no longer
an exact capture of the tab contents.

What is the expected behavior?
The captured image shall not be shrunken. The captured image shall not
contain the scroll bar.

What went wrong?
The CSS rule img{max-width:100%;} must be effecting the screenshot capture
API somehow.

WebStore page:
https://chrome.google.com/webstore/detail/capturevisibletab-scroll/jloaahckmccfdleceeoejjnannlhnbed

Did this work before? No

Chrome version: 29.0.1530.2 Channel: dev
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)

img{max-width:100%;} is CSS that makes websites phone friendly since images
will shrink to fit the window width, so it is somewhat prevalent around the
web these days.

One example page is the sub-domain error page here:
http://zzz.laponiapictures.com/

The captured snapshot contains the scroll bar, making it impossible to
overlay the snapshot consistently.

For many extensions it is pretty critical to freeze a snapshot of the page
in place so that users are not confused by the fact they are picking form a
screenshot and not the ever changing webpage.

Temporary workaround for extension developers:
over-ride the page CSS

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Jun 17, 2013, 7:49:40 PM6/17/13
to chromi...@chromium.org
Updates:
Owner: just...@chromium.org

Comment #1 on issue 248664 by jyas...@chromium.org: Extensions:
captureVisibleTab sometimes captures the scrollbar
http://code.google.com/p/chromium/issues/detail?id=248664

Justin, could you take a look?

chro...@googlecode.com

unread,
Jun 17, 2013, 11:13:20 PM6/17/13
to chromi...@chromium.org
Updates:
Status: WontFix

Comment #2 on issue 248664 by just...@chromium.org: Extensions:
captureVisibleTab sometimes captures the scrollbar
http://code.google.com/p/chromium/issues/detail?id=248664

I was quite surprised when you mentioned that scrollbars are not normally
captured by captureVisibleTab (that would potentially fix one of my feature
requests! :)). However, it seems most extensions that use this API
(including yours, I think) does some special post-processing to try to hide
the scrollbars from the snapshot, but I think there is a bug in your
extension.

This extension seems to manage to correctly hide the scrollbars for the
page you mentioned:
https://chrome.google.com/webstore/detail/screen-capture-by-google/cpngackimfmofbokmjmljamhdncknpmg

I wrote a simple extension and confirmed that you are supposed to normally
get scrollbars in the snapshot. I'm afraid I can't really help you find the
specific bug in your extension.

chro...@googlecode.com

unread,
Jun 18, 2013, 12:29:25 AM6/18/13
to chromi...@chromium.org

Comment #3 on issue 248664 by qufighter: Extensions: captureVisibleTab
This is not a case, I agree (now) that scroll-bars are always captured,
however the scale of the snapshot is wrong when that specific CSS rule is
present.

Also it seems several other bugs are apparent when the scale of the screen
is wrong.

I think this will be re-opened with a different subject...

chro...@googlecode.com

unread,
Jun 18, 2013, 1:33:44 AM6/18/13
to chromi...@chromium.org

Comment #4 on issue 248664 by qufighter: Extensions: captureVisibleTab
I stand corrected... when over-laying captured images on the page itself it
is important to declare "max-width: none;" on the image tag that is
included in the page!

The image still comes back the wrong scale when the page is zoomed, which
the extension still clearly demonstrates, however the CSS rule for the
image that is displayed in the sample extension is missing and will be
updated tomorrow.

There may still be a bug here... when the page is zoomed it still seems the
captured image scale does not match the scale of the page.
Reply all
Reply to author
Forward
0 new messages