From a311d05ca50c3df05d199c091dd19421e64ab00d Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Tue, 3 Nov 2020 16:34:58 +0000 Subject: [PATCH] Bug 1654760 - [devtools] Remove usage of actorHasMethod in SwatchColorPickerTooltip r=rcaliman This backward compatibility code can be removed "getBackgroundColor" was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1568053 (FF70) Differential Revision: https://phabricator.services.mozilla.com/D95315 --- .../widgets/tooltip/SwatchColorPickerTooltip.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js b/devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js index 657f62f60559..ccbfb284e64d 100644 --- a/devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js +++ b/devtools/client/shared/widgets/tooltip/SwatchColorPickerTooltip.js @@ -139,18 +139,8 @@ class SwatchColorPickerTooltip extends SwatchBasedEditorTooltip { // set contrast enabled for the spectrum const name = this.activeSwatch.dataset.propertyName; - if (this.isContrastCompatible === undefined) { - const target = this.inspector.currentTarget; - this.isContrastCompatible = await target.actorHasMethod( - "domnode", - "getBackgroundColor" - ); - } - - // Only enable contrast and set text props and bg color if selected node is - // contrast compatible and if the type of property is color. - this.spectrum.contrastEnabled = - name === "color" && this.isContrastCompatible; + // Only enable contrast if the type of property is color. + this.spectrum.contrastEnabled = name === "color"; if (this.spectrum.contrastEnabled) { const { nodeFront } = this.inspector.selection; const { pageStyle } = nodeFront.inspectorFront;