Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
REGRESSION (r251194): Web Inspector: Uncaught exception when inspecti…
…ng color referenced by CSS variable https://bugs.webkit.org/show_bug.cgi?id=241558 Reviewed by Devin Rousso. The patch for https://bugs.webkit.org/show_bug.cgi?id=241055 introduced an option to prevent changing color formats when interacting with an inline color swatch. The value of the `preventChangingColorFormats` option kept as an instance property of `WI.InlineSwatch`. This is then referenced in the callback passed to `createCodeMirrorColorTextMarkers()`. The callback doesn't share the same scope, so an exception is raied when calling `this._preventChangingColorFormats`. This patch ensures the value of the instance property is captured in the scope of the callback passed. * Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js: (WI.InlineSwatch.prototype._swatchElementClicked.switch.case.WI.InlineSwatch.Type.Variable.optionsForType): (WI.InlineSwatch.prototype._swatchElementClicked): Canonical link: https://commits.webkit.org/251505@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information