Open Bug 1763548 Opened 3 years ago Updated 2 years ago

The screenshot screen will be affected by the universal selector for children of the body

Categories

(Firefox :: Screenshots, defect, P5)

Firefox 100
defect

Tracking

()

People

(Reporter: bugzilla, Unassigned)

Details

(Whiteboard: [screenshots-extension])

Attachments

(2 files)

Attached image actual.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0

Steps to reproduce:

I tried to take a screenshot of the website, but the region selector was out of position.
When I checked the source code, it seemed that the universal selector for children of the body will match the region selector.

Steps to Reproduce:

* {
  padding: 50px;
}

The screenshot screen will be off by 50px by this style.

Reproduced Environment:
Windows 11 Pro 21H2 22000.556
Firefox 99 (64-bit, current stable) and Firefox 100.0b2(64-bit Developer Edition)

Actual results:

The screenshot screen will be affected by the styles which use a universal selector on the page.

Expected results:

The screenshot screen will not be affected by any styles on the page.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics
Product: Firefox → Core
Attached file reproduce.html

Here is the HTML to reproduce.

Component: Graphics → Screenshots
Product: Core → Firefox

Adding el.style.padding = "0"; here: https://searchfox.org/mozilla-central/source/browser/extensions/screenshots/selector/ui.js#61-72 seems to fix this but I'm not sure if that's the best way to fix it.

This kind of bug is one of the motivations for bug 1696573. That is making progress but we don't have any roadmap for shipping it and deprecating the extension yet. So I'm happy to merge a patch to spot fix these things in the meantime.

Severity: -- → S3
Priority: -- → P5
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [screenshots-extension]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: