Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Issue 298553002: Options: maintain history entries on the parent frame. (Closed)

Created:
6 years, 7 months ago by davidben
Modified:
6 years, 7 months ago
Reviewers:
Dan Beam
CC:
chromium-reviews, dbeam+watch-options_chromium.org, extensions-reviews_chromium.org, Patrick Dubroy, pam+watch_chromium.org, arv+watch_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Options: maintain history entries on the parent frame. Currently, navigations within the child frame remain attached to the child frame while it signals the parent to change path and title. This doesn't quite work because location.replace and history.replaceState affect all back/forward list entries which reference that frame's history entry, rather than just the current one. Chrome is currently inconsistent about which of the two behaviors it implements. Fix the settings page to not rely on the bug so it is future-proof. Instead, when embedded, all pushState and replaceState calls are proxied up to the parent which manages history for the child. The child converts all pushState calls to replaceState calls locally. This adds uber.setTitle, uber.replaceState, and uber.pushState calls along with a popState message to uber_utils.js. When running standalone, they call the standard equivalents. When running within the uber page, they delegate to the parent as appropriate. In doing so, this fixes places where chrome://settings-frame and chrome://settings do not set the same URL and title the same. Notably on the search page and treating the default "settings" page as having a path of "" rather than "settings". BUG=317614 TEST=Go to chrome://settings. Open 'Manage search engines...'. Press back. Press refresh. Should stay on search page. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271538

Patch Set 1 #

Patch Set 2 : Unnecessary diff. #

Total comments: 4

Patch Set 3 : Adjust some comments. #

Patch Set 4 : More comments (try jobs on previous) #

Total comments: 33

Patch Set 5 : dbeam comments #

Total comments: 4

Patch Set 6 : Fix BrowserOptionsFrameWebUITest #

Patch Set 7 : And another couple of those #

Patch Set 8 : dbeam comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -123 lines) Patch
M chrome/browser/resources/extensions/extensions.js View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/resources/help/help.js View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/resources/history/history.js View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/resources/options/content_settings.js View 1 chunk +3 lines, -9 lines 0 comments Download
M chrome/browser/resources/options/content_settings_exceptions_area.js View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/options.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/options/options_page.js View 1 2 3 4 9 chunks +27 lines, -37 lines 0 comments Download
M chrome/browser/resources/options/search_page.js View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/resources/uber/uber.js View 1 2 3 4 5 6 7 9 chunks +99 lines, -17 lines 0 comments Download
M chrome/browser/resources/uber/uber_utils.js View 1 2 3 4 5 6 7 5 chunks +82 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/options/browser_options_browsertest.js View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/chromeos/bluetooth_options_browsertest.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/options_browsertest.js View 1 2 3 4 5 6 7 16 chunks +48 lines, -47 lines 0 comments Download
M chrome/browser/ui/webui/options/settings_format_browsertest.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
davidben
I still need to write tests for the new uber page history management, but it ...
6 years, 7 months ago (2014-05-19 22:38:33 UTC) #1
Dan Beam
generally this looks good https://codereview.chromium.org/298553002/diff/60001/chrome/browser/resources/options/options_page.js File chrome/browser/resources/options/options_page.js (right): https://codereview.chromium.org/298553002/diff/60001/chrome/browser/resources/options/options_page.js#newcode79 chrome/browser/resources/options/options_page.js:79: this.navigateToPage(this.getDefaultPage().name, nit: just pass along ...
6 years, 7 months ago (2014-05-19 23:06:48 UTC) #2
davidben
https://codereview.chromium.org/298553002/diff/60001/chrome/browser/resources/options/options_page.js File chrome/browser/resources/options/options_page.js (right): https://codereview.chromium.org/298553002/diff/60001/chrome/browser/resources/options/options_page.js#newcode79 chrome/browser/resources/options/options_page.js:79: this.navigateToPage(this.getDefaultPage().name, On 2014/05/19 23:06:49, Dan Beam wrote: > nit: ...
6 years, 7 months ago (2014-05-19 23:32:28 UTC) #3
Dan Beam
lgtm, we'll see how this works (*fingers crossed*) https://codereview.chromium.org/298553002/diff/60001/chrome/browser/resources/uber/uber.js File chrome/browser/resources/uber/uber.js (right): https://codereview.chromium.org/298553002/diff/60001/chrome/browser/resources/uber/uber.js#newcode356 chrome/browser/resources/uber/uber.js:356: var ...
6 years, 7 months ago (2014-05-19 23:49:09 UTC) #4
davidben
https://codereview.chromium.org/298553002/diff/60001/chrome/browser/resources/uber/uber.js File chrome/browser/resources/uber/uber.js (right): https://codereview.chromium.org/298553002/diff/60001/chrome/browser/resources/uber/uber.js#newcode356 chrome/browser/resources/uber/uber.js:356: var container = $(pageId); On 2014/05/19 23:49:10, Dan Beam ...
6 years, 7 months ago (2014-05-20 00:12:54 UTC) #5
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 7 months ago (2014-05-20 00:40:09 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/298553002/140001
6 years, 7 months ago (2014-05-20 00:40:47 UTC) #7
commit-bot: I haz the power
6 years, 7 months ago (2014-05-20 02:22:55 UTC) #8
Message was sent while issue was closed.
Change committed as 271538

Powered by Google App Engine
This is Rietveld 408576698