Open Bug 1788767 Opened 3 years ago Updated 3 years ago

{inc} In quirks mode, img with unspecified size renders differently depending on whether width/height were never-present vs. were present-and-removed

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect, P5)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

Filing this bug for emilio's https://phabricator.services.mozilla.com/D155533#inline-858662 which is elaborating on the FIXME here:
https://searchfox.org/mozilla-central/rev/2c8fa11af2d6e795c99ebe395d39390fde47df85/layout/generic/nsImageFrame.cpp#878-880

if (aElement.OwnerDoc()->GetCompatibilityMode() == eCompatibility_NavQuirks) {
  // FIXME(emilio): We definitely don't reframe when this changes...
  return HaveSpecifiedSize(aStyle.StylePosition());

STR:

  1. Load attached testcase

EXPECTED RESULTS:
You should see two copies of the text "Should be an inline"

ACTUAL RESULTS:
I only see one copy of the text. Though certain actions in devtools (e.g. hovering any of the DOM nodes to make an overlay appear with geometry info) will make the second copy appear.

Attached file testcase 1

(sorry, had a stray/non-functional min- in the style in my first attachment, where I was considering adding a min-size but then decided against it. :) Here's another one with that removed.)

Attachment #9292726 - Attachment is obsolete: true
Attachment #9292726 - Attachment description: testcase 1 → (ignore; intitial copy of testcase, with stray garbage inside style rule)

Chromium (Chrome 106 dev) matches us on the attached testcase, FWIW (i.e. they have the same bug here, inadvertently depending on previous state).

WebKit (Safari 15.6.1) gives EXPECTED RESULTS.

Summary: {inc} img with unspecified size renders differently depending on whether width/height were never-present vs. were present-and-removed → {inc} In quirks-mode, img with unspecified size renders differently depending on whether width/height were never-present vs. were present-and-removed
Summary: {inc} In quirks-mode, img with unspecified size renders differently depending on whether width/height were never-present vs. were present-and-removed → {inc} In quirks mode, img with unspecified size renders differently depending on whether width/height were never-present vs. were present-and-removed
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: