Closed Bug 1275610 Opened 10 years ago Closed 7 years ago

DevTools incorrectly thinks "display:-moz-box" suppresses earlier "display:-webkit-box"

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(2 files)

If an element has .foo { display:-webkit-box; display:-moz-box; } ...our devtools inspector view shows the latter declaration as being active (and shows the first declaration with a strikethrough). This would normally be correct, *EXCEPT* we have a special hack to actually use "-webkit-box" in this scenario.[1] So what devtools is reporting here does not actually reflect reality -- the element does really have "display: -webkit-box", as can be seen via computed style. We probably should make devtools aware of this hack, so that it strikes out the later "-moz-box" and marks the "-webkit-box" as being active, to better-reflect what's actually going on. [1] The hack is here: http://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSParser.cpp?rev=929092ee1097#7026 (We have this hack because this sort of style is generally *not really* the author wanting -moz-box layout -- rather, it's a sign that web authors have written a -webkit-box layout, and they're making an attempt to be compatible by including what looks like a moz-prefixed equivalent. But -moz-box doesn't actually work like -webkit-box on the web, so we're better off using our modern-flex-based -webkit-box emulation, which only gets activated if we let the element end up with "display:-webkit-box".)
Attached file testcase 1 —
Note that our -webkit prefix support (including the hack in question here) is preffed off in release builds by default, but it's enabled in Aurora and Nightly, and it'll be riding the trains with Firefox 49 as of bug 1259345.
The screencast shows the discrepancy between the "rule" view & the computed style view. (Later on in the screencast, I *actually* disable the -webkit-box decl (by unchecking its box). This demonstrates that this declaration was indeed active [via the hack described in comment 0], and you can tell that it was because unchecking it changes the computed style & layout.)
Inspector bug triage (filter on CLIMBING SHOES).
Priority: -- → P3
Product: Firefox → DevTools
This is no longer a problem, given that we removed the behavior in question (the -webkit-box/-moz-box display value interaction) in bug 1509945 (along with "display:-moz-box" itself in bug 1496961 / bug 1477553).
Status: NEW → RESOLVED
Closed: 7 years ago
Depends on: 1509945
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: