Querying COLOR_NTP_BACKGROUND gives the wrong value for default theme |
||
Issue descriptionQuerying COLOR_NTP_BACKGROUND for the default theme will always return white, even in incognito mode (in ThemeProperties::GetDefaultColor). The color in incognito mode should be (32, 32, 32), which is hard-coded in NTPResourceCache::CreateNewTabIncognitoCSS (from https://codereview.chromium.org/1440113002). In issue 470669 , we need to query the NTP background page in an incognito-aware context. For the moment, we are just duplicating this logic. Ideally this should not be done.
,
Jan 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b50ed35f31c3f2112fcd984151c2f866f577d20e commit b50ed35f31c3f2112fcd984151c2f866f577d20e Author: Marc Treib <treib@chromium.org> Date: Wed Jan 10 11:57:18 2018 Incognito NTP: Avoid flashes with themes with a background color The Incognito NTP uses the theme's background color only if the theme also has a background image, otherwise it falls back to the default background color (which is rgb(32,32,32)). This caused flashes when an Incognito NTP is opened with a theme that has a background color but no background image: first the theme's background color was drawn, then as soon as the page loaded, it went back to rgb(32,32,32). This CL fixes the flashes by moving the special background color logic to ThemeService::GetColor. Bug: 21798 , 719236 Change-Id: I0c5553ceef95b71a8e0b90e44bd86da83d2b875a Reviewed-on: https://chromium-review.googlesource.com/840028 Commit-Queue: Marc Treib <treib@chromium.org> Reviewed-by: Evan Stade <estade@chromium.org> Cr-Commit-Position: refs/heads/master@{#528284} [modify] https://crrev.com/b50ed35f31c3f2112fcd984151c2f866f577d20e/chrome/browser/themes/theme_service.cc [modify] https://crrev.com/b50ed35f31c3f2112fcd984151c2f866f577d20e/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
,
Jan 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b24da2a239e0587a01b769c3e5a18ddefd07d1b7 commit b24da2a239e0587a01b769c3e5a18ddefd07d1b7 Author: Marc Treib <treib@chromium.org> Date: Tue Jan 16 09:44:26 2018 [Mac] Use SRGB color space when converting from SkColor to CGColor This fixes flashes when opening themed or incognito NTPs: TabContentsController::updateBackgroundColorFromWindowTheme uses skia::CGColorCreateFromSkColor to convert the background color from SkColor to CGColor, which used the "Generic RGB" color space before. This does not match SRGB, which is what the NTP (or any WebContents) uses, as far as I can tell. This CL fixes the discrepancy by making CGColorCreateFromSkColor use SRGB. Bug: 21798 , 254361 , 719236 Change-Id: I14b03690f585d266b6329d6b19b37ee8ac36c6ce Reviewed-on: https://chromium-review.googlesource.com/842646 Reviewed-by: Justin Novosad <junov@chromium.org> Reviewed-by: ccameron <ccameron@chromium.org> Commit-Queue: Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#529390} [modify] https://crrev.com/b24da2a239e0587a01b769c3e5a18ddefd07d1b7/skia/ext/skia_utils_mac.h [modify] https://crrev.com/b24da2a239e0587a01b769c3e5a18ddefd07d1b7/skia/ext/skia_utils_mac.mm
,
Jan 18 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2ac43b4263e42111acbcf607f88579a93fe2817a commit 2ac43b4263e42111acbcf607f88579a93fe2817a Author: Marc Treib <treib@chromium.org> Date: Thu Jan 18 06:42:08 2018 [Mac] Remove special hack for incognito NTP background color It's not required anymore after https://crrev.com/c/840028. (It had also diverged from the correct color in the meantime...) Bug: 21798 , 719236 Change-Id: If98185ffe59865dcf7fb52b8d5a3ed534db60aed Reviewed-on: https://chromium-review.googlesource.com/859760 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: ccameron <ccameron@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Cr-Commit-Position: refs/heads/master@{#530077} [modify] https://crrev.com/2ac43b4263e42111acbcf607f88579a93fe2817a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
,
Sep 13
Archiving old bugs that haven't been actively assigned in over 180 days. If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!
,
Sep 13
Archiving old bugs that haven't been actively assigned in over 180 days. If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!
,
Sep 13
Archiving old bugs that haven't been actively assigned in over 180 days. If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks! |
||
►
Sign in to add a comment |
||
Comment 1 by ccameron@chromium.org
, May 22 2017