Skip to content
Permalink
Browse files
Web Inspector: popover colors don't change when transitioning to/from…
… dark mode

https://bugs.webkit.org/show_bug.cgi?id=195113
<rdar://problem/48444188>

Reviewed by Timothy Hatcher.

* UserInterface/Views/Popover.js:
(WI.Popover.prototype.dismiss):
(WI.Popover.prototype._addListenersIfNeeded):


Canonical link: https://commits.webkit.org/209458@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dcrousso committed Feb 27, 2019
1 parent 8c5eb6e commit e343cdcd4886d8836cc7f71e0dedb25fd07f4b9c
Showing 2 changed files with 21 additions and 0 deletions.
@@ -1,3 +1,15 @@
2019-02-27 Devin Rousso <drousso@apple.com>

Web Inspector: popover colors don't change when transitioning to/from dark mode
https://bugs.webkit.org/show_bug.cgi?id=195113
<rdar://problem/48444188>

Reviewed by Timothy Hatcher.

* UserInterface/Views/Popover.js:
(WI.Popover.prototype.dismiss):
(WI.Popover.prototype._addListenersIfNeeded):

2019-02-26 Matt Baker <mattbaker@apple.com>

Web Inspector: Use system accent color throughout UI
@@ -156,6 +156,8 @@ WI.Popover = class Popover extends WI.Object
window.removeEventListener("resize", this, true);
window.removeEventListener("keypress", this, true);

this._prefersDarkColorSchemeMediaQueryList.removeListener(this._boundUpdate);

WI.quickConsole.keyboardShortcutDisabled = false;

this._element.classList.add(WI.Popover.FadeOutClassName);
@@ -578,6 +580,13 @@ WI.Popover = class Popover extends WI.Object
window.addEventListener("resize", this, true);
window.addEventListener("keypress", this, true);

if (!this._boundUpdate)
this._boundUpdate = this._update.bind(this);

if (!this._prefersDarkColorSchemeMediaQueryList)
this._prefersDarkColorSchemeMediaQueryList = window.matchMedia("(prefers-color-scheme: dark)");
this._prefersDarkColorSchemeMediaQueryList.addListener(this._boundUpdate);

WI.quickConsole.keyboardShortcutDisabled = true;
}
}

0 comments on commit e343cdc

Please sign in to comment.