Open Bug 1341578 Opened 3 years ago Updated 2 years ago

SwatchColorPickerTooltip should not rely on swatch element nextSibling

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 1 open bug)

Details

Currently the SwatchColorPickerTooltip relies on the nextSibling of the swatch element to be a span which should only contain the selected color as its textContent.

See http://searchfox.org/mozilla-central/rev/39e4b25a076c59d2e7820297d62319f167871449/devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js#105

There is no reason this widget should have this dependency to the markup structure around the swatch element. Updating the span should be the responsibility of the caller. The SwatchColorPickerTooltip should not rely on the markup to store and communicate the selected color.
Blocks: dt-grid
Summary: SwatchColorPickerTooltip should not rely swatch sibling to store & update the selected color → SwatchColorPickerTooltip should not rely on swatch element nextSibling
Product: Firefox → DevTools
Assignee: jdescottes → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.