Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1fb980be68f324dad7ad0d7770c4053354356399
      
https://github.com/WebKit/WebKit/commit/1fb980be68f324dad7ad0d7770c4053354356399
  Author: Devin Rousso <[email protected]>
  Date:   2023-05-17 (Wed, 17 May 2023)

  Changed paths:
    M Source/WebCore/page/Page.cpp
    M Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js
    M Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js

  Log Message:
  -----------
  Web Inspector: REGRESSION(257744@main): Dark Mode simulation isn't maintained 
on page change, but remains selected in the UI
https://bugs.webkit.org/show_bug.cgi?id=254457
<rdar://problem/107506257>

Reviewed by Patrick Angle.

Having to force dark (or light) mode with each refresh is pretty tedious, as 
it's probably pretty common that developers will refresh as they make changes 
to the backend source.

* Source/WebCore/page/Page.cpp:
(WebCore::Page::didCommitLoad):
Don't clear the forced appearance override on main frame navigation.

* Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype._defaultUserPreferencesDidChange):
A new `WI.DOMTreeContentView` is created each time the main frame navigates, so 
make sure to initialize `activated` (and `enabled`) instead of waiting for 
`WI.CSSManager.Event.OverriddenUserPreferencesDidChange` (and 
`WI.CSSManager.Event.DefaultUserPreferencesDidChange`).

* Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype._mainResourceDidChange):
Add compatibility behavior for releases before this change.

Canonical link: https://commits.webkit.org/264172@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to