Closed Bug 1557330 Opened 5 years ago Closed 5 years ago

[Inactive CSS] Replaced elements with display:inline and width or height

Categories

(DevTools :: Inspector: Rules, defect, P1)

defect

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: fvsch, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

A number of elements can have a display: inline value and still be affected by width and height:

  • img
  • iframe
  • button
  • and probably other replaced elements, form elements (input, select), etc.

In Nightly we're getting false warnings when using width or height on those elements.

Test case:

<img style="display: inline; width: 100px;"/>
<button style="display: inline; width: 100px;"></button>

Thanks for filing the bug Florens. We were supposed to handle inline-replaced element, so there might be something wrong in the way I wrote the validator :)

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Blocks: 1540753
Priority: -- → P1

Element.nodeName is usually all-caps, and we were testing lower cased version,
which brought erroneous results.
The test wasn't picking those errors because we were creating the element from
a XUL document, where Element.nodeName keep the casing used for their creation.
The test is modified to create the element in an HTML document.

After the test was modified, I could see it was failing, and was then able to
do the actual feature fix.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/30277c921db4
Lowercase node.nodename in InactivePropertyHelper. r=rcaliman.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: