brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.57k stars 2.28k forks source link

Speedreader theme support doesn't work on Linux #25530

Open stephendonner opened 2 years ago

stephendonner commented 2 years ago

Description

Speedreader theme support doesn't work on Linux.

Spinning this off from https://github.com/brave/brave-browser/issues/23447 because it was verified there on Windows 10-x64 and macOS-x64.

Steps to Reproduce

  1. installed 1.44.95
  2. launched Brave
  3. deleted the jicbkmdloagakknpihibphagfckhjdih component directory
  4. confirmed brave://settings/appearance is Light
  5. loaded https://www.bbc.com/news/business-58559179
  6. clicked on the Speedreader icon
  7. opened Developer Tools -> Console panel
  8. entered document.documentElement.setAttribute('data-theme', 'dark') and pressed return
  9. entered document.documentElement.setAttribute('data-theme', 'sepia') and pressed return

Actual result:

Nothing (visually) happens, but the data-theme attribute seems to get correctly set

Screen Shot 2022-09-21 at 10 31 56 AM

Expected result:

Should change the theme/mode to dark, sepia, etc.

Reproduces how often:

100%

Brave version (brave://version info)

Brave 1.44.95 Chromium: 106.0.5249.40 (Official Build) (64-bit)
Revision fab1d91915d2722d6339aaa7f4e9ce44f1e9b103-refs/branch-heads/5249@{#442}
OS Linux

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

cc @boocmp @rebron

fallaciousreasoning commented 2 years ago

FWIW, I couldn't reproduce this on Version 1.45.64 Chromium: 106.0.5249.40 (Official Build) nightly (64-bit). Setting data-theme=light, data-theme=dark & data-theme=sepia all worked in Nightly.

I tested with a light base theme and a dark base theme, both seemed to work (I'm on Ubuntu 22.04.1 LTS)

fallaciousreasoning commented 2 years ago

Repro'd in 1.44.93 Chromium: 105.0.5195.136 (Official Build) beta (64-bit) (a semi recent Beta) - does something need an uplift?

boocmp commented 2 years ago

Actually we do not need this functional as javascript function, It's only needed in Speedreader bubble v2 (https://github.com/brave/brave-core/pull/14151) which merged in 45. I think we should test new bubble instead of API itself. Anyway could you please attach the html source of the speedreaded page? I want to check what css really loaded.