Closed Bug 1341578 Opened 7 years ago Closed 4 years ago

SwatchColorPickerTooltip should not rely on swatch element nextSibling

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1594402

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.
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
Depends on: 1594402
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.