Tabs with chrome:// URLs don't have their titles updated correctly. |
||||||||||||
Issue descriptionApp Version: 69.0.3494.0 canary iOS Version: 12.0 beta#3, 11.4.1 Device: iPhoneX, iPhone6s, iPad Pro URL: any Steps to reproduce: 1. Launch Google Chrome 2. Navigate to any website say google.com 3. Tap on Back arrow 4. Enter TabSwitcher mode Observed results: Observe that Tab cell title is displayed incorrectly with google.com title. Expected results: Tab title should displayed correctly. Number of times you were able to reproduce: 5/5 Bug reproducible after clean install: Yes Bug reproducible after clearing cache and cookies: Yes Bug reproducible on Chrome Mobile on Android: NA Link to video/image: https://drive.google.com/file/d/1zIpzUxed_M_atQQvLsUvfn2-c1Mn2jcC/view
,
Jul 19
Related to another bug.
,
Jul 19
This is mitigated by the fix for crbug/865074, but there's presumably an underlying problem that causes the title to not be updated. Leaving this bug open to track that.
,
Jul 19
,
Jul 19
Consolidating a couple of cases here: (A) NTP -> navigate to some page P -> Back. Title is P's title, not the NTP title. (B) some page P -> chrome://flags. Title is P's title, not "Chrome flags".
,
Jul 23
Just tested on canary 70.0.3500.0 and this only repros with Slim Navigation enabled. Removing the UI Refresh labels and assigning to danyao@
,
Jul 23
This sounds like a missing callback on the back navigation. marq@ can you give me some pointers on where tab titles are usually updated?
,
Jul 23
Also that the title of the tab itself is correct, only the title in the tab switcher is wrong. The bug also only affects UI Refresh. So this seems to me that the tab switcher must be caching the title somewhere.
,
Jul 24
marq@: correct me if I am wrong. The TabGrid is observing the WebState for title changes: https://cs.chromium.org/chromium/src/ios/chrome/browser/ui/tab_grid/tab_grid_mediator.mm?dr=C&q=webStateDidChangeTitle&sq=package:chromium&g=0&l=213 . This is not called when navigating to chrome://flags or other chrome://... URLs. Maybe it is because of the way the native content navigation is handled? For example, the path that leads to this callback for non-native page has a !IsPlaceholderUrl() https://cs.chromium.org/chromium/src/ios/web/web_state/ui/crw_web_controller.mm?type=cs&q=IsPlaceholderUrl&sq=package:chromium&g=0&l=5209 I don't know how it is working in non-UI refresh.
,
Jul 24
|-webViewTitleDidChange| wouldn't have been called for native content in LegacyNavigationManager. I think the bug is in the early exit in |-setNavigationItemTitle|: https://cs.chromium.org/chromium/src/ios/web/web_state/ui/crw_web_controller.mm?type=cs&q=setNavigationItemTitle&l=1294 The WebStateImpl->OnTitleChanged() should not be skipped just because the navigation item has the right title, because the last committed navigation item title would have changed. I can reproduce the bug on debug 69.0.3495.0 with legacy navigation manager as well. I'll send out a fix.
,
Jul 24
,
Jul 24
I think non-UI refresh might be getting title directly from WebState->GetTitle() instead of caching a copy of title. So it wasn't affected by missing OnTitleChanged() callbacks.
,
Jul 25
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/352492fdd7794a1c7672bee0e081764a667ebd9b commit 352492fdd7794a1c7672bee0e081764a667ebd9b Author: Danyao Wang <danyao@chromium.org> Date: Wed Jul 25 17:49:51 2018 [ios] Always notify WebStateObservers on navigation item title change. The short circuit skips WebStateImpl->OnTitleChanged() incorrectly on back/forward navigation because although the title in the navigation item doesn't need changing, the visible navigation item has changed. This only affects navigating to native content from web content because web state title for web content is updated separately in |-webViewTitleDidChange|. Bug: 864601 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: Ifd74f87aff0276394def154a8410b3dd1ce6c1c8 Reviewed-on: https://chromium-review.googlesource.com/1148693 Commit-Queue: Danyao Wang <danyao@chromium.org> Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#577967} [modify] https://crrev.com/352492fdd7794a1c7672bee0e081764a667ebd9b/ios/web/web_state/navigation_and_load_callbacks_inttest.mm [modify] https://crrev.com/352492fdd7794a1c7672bee0e081764a667ebd9b/ios/web/web_state/ui/crw_web_controller.mm [modify] https://crrev.com/352492fdd7794a1c7672bee0e081764a667ebd9b/ios/web/web_state/ui/crw_web_controller_unittest.mm
,
Jul 25
,
Jul 25
[Auto-generated comment by a script] We noticed that this issue is targeted for M-69; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-69 label, otherwise remove Merge-TBD label. Thanks.
,
Jul 25
,
Jul 26
Your change meets the bar and is auto-approved for M69. Please go ahead and merge the CL to branch 3497 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0d78cff10f1e65c15190851d1148dcdbdf3b85e6 commit 0d78cff10f1e65c15190851d1148dcdbdf3b85e6 Author: Danyao Wang <danyao@chromium.org> Date: Thu Jul 26 19:24:16 2018 [ios] Always notify WebStateObservers on navigation item title change. Cherry-pick for M69 (refs/branch-heads/3497). The short circuit skips WebStateImpl->OnTitleChanged() incorrectly on back/forward navigation because although the title in the navigation item doesn't need changing, the visible navigation item has changed. This only affects navigating to native content from web content because web state title for web content is updated separately in |-webViewTitleDidChange|. Bug: 864601 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: Ifd74f87aff0276394def154a8410b3dd1ce6c1c8 Reviewed-on: https://chromium-review.googlesource.com/1148693 Commit-Queue: Danyao Wang <danyao@chromium.org> Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#577967}(cherry picked from commit 352492fdd7794a1c7672bee0e081764a667ebd9b) Reviewed-on: https://chromium-review.googlesource.com/1151914 Reviewed-by: Danyao Wang <danyao@chromium.org> Cr-Commit-Position: refs/branch-heads/3497@{#123} Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753} [modify] https://crrev.com/0d78cff10f1e65c15190851d1148dcdbdf3b85e6/ios/web/web_state/navigation_and_load_callbacks_inttest.mm [modify] https://crrev.com/0d78cff10f1e65c15190851d1148dcdbdf3b85e6/ios/web/web_state/ui/crw_web_controller.mm [modify] https://crrev.com/0d78cff10f1e65c15190851d1148dcdbdf3b85e6/ios/web/web_state/ui/crw_web_controller_unittest.mm
,
Jul 31
Verified on iPhoneX , iPad Pro iOS11.4.1, 12.0 beta#5 Tap title is displayed correctly in tab switcher. Verified with enabling the flag slim-navigation-manager.
,
Aug 1
Verified in 69.0.3497.22 Beta in iPhone 7plus(iOS 10.3.3), iPhone 8plus(iOS 12 beta5) and iPad Air(iOS 11.4.1) Tap title is displayed correctly in tab switcher on following the steps mentioned in comment#5 |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by sczs@chromium.org
, Jul 18Owner: edchin@chromium.org
Status: Assigned (was: Untriaged)