Closed Bug 1594472 Opened 5 years ago Closed 5 years ago

Don't update the tab label / window title for same-document onLocationChange

Categories

(Firefox :: Tabbed Browser, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

(Regressed 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Seems we call history.replaceState when loading the prefs, and this causes us to needlessly try to update page titles. Let's not do that, at least on the initial load.

No longer blocks: 1588142
See Also: → 1588142
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/d295ef429fc0
only `replaceState` if we're actually changing categories, so as to avoid doing so on initial load, r=MattN

Backed out changeset d295ef429fc0 (Bug 1594472) for browser-chrome failires at browser/components/urlbar/tests/browser/browser_urlbarOneOffs_settings.js

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedJob=274878590&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=d295ef429fc0135f7218126808765bee5085536d

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=274875706&repo=autoland&lineNumber=10319

https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=274889047&repo=autoland&lineNumber=10673

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedJob=274878856&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=0984b2197e4b9d7d2fc17b4310f9acf46f098066

[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - TEST-INFO | screenshot: exit 0
[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - Buffered messages logged at 19:05:40
[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - Entering test bound 
[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - Buffered messages finished
[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - TEST-UNEXPECTED-FAIL | browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js | Search pane was selected - Got null, expected paneSearch
[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - Stack trace:
[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - chrome://mochikit/content/browser-test.js:test_is:1314
[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - chrome://mochitests/content/browser/browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js:null:18
[task 2019-11-06T19:05:43.051Z] 19:05:43     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1069
[task 2019-11-06T19:05:43.052Z] 19:05:43     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1104
[task 2019-11-06T19:05:43.052Z] 19:05:43     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:932
[task 2019-11-06T19:05:43.052Z] 19:05:43     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:805
[task 2019-11-06T19:05:43.052Z] 19:05:43     INFO - TEST-PASS | browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js | main-content should be scrolled 50 pixels - 
[task 2019-11-06T19:05:43.059Z] 19:05:43     INFO - TEST-PASS | browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js | Switching to a different category should reset the scroll position - 
[task 2019-11-06T19:05:43.059Z] 19:05:43     INFO - Leaving test bound 
[task 2019-11-06T19:05:43.138Z] 19:05:43     INFO - GECKO(4784) | [Parent 6068, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111: file z:/build/build/src/netwerk/cache/nsCacheService.cpp, line 859
[task 2019-11-06T19:05:43.138Z] 19:05:43     INFO - GECKO(4784) | [Parent 6068, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111: file z:/build/build/src/netwerk/cache/nsCacheService.cpp, line 822
[task 2019-11-06T19:05:43.138Z] 19:05:43     INFO - GECKO(4784) | [Parent 6068, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111: file z:/build/build/src/netwerk/cache/nsApplicationCacheService.cpp, line 178
[task 2019-11-06T19:05:43.965Z] 19:05:43     INFO - GECKO(4784) | [Parent 6068, Main Thread] WARNING: '!inner', file z:/build/build/src/dom/ipc/JSWindowActorService.cpp, line 172
[task 2019-11-06T19:05:44.025Z] 19:05:44     INFO - GECKO(4784) | MEMORY STAT | vsize 984MB | vsizeMaxContiguous 496MB | residentFast 413MB | heapAllocated 237MB
[task 2019-11-06T19:05:44.025Z] 19:05:44     INFO - TEST-OK | browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js | took 3973ms
[task 2019-11-06T17:52:40.881Z] 17:52:40     INFO - TEST-INFO | screentopng: exit 0
[task 2019-11-06T17:52:40.882Z] 17:52:40     INFO - Buffered messages logged at 17:52:38
[task 2019-11-06T17:52:40.882Z] 17:52:40     INFO - Entering test bound init
[task 2019-11-06T17:52:40.883Z] 17:52:40     INFO - Leaving test bound init
[task 2019-11-06T17:52:40.883Z] 17:52:40     INFO - Entering test bound test_open_settings_with_enter
[task 2019-11-06T17:52:40.884Z] 17:52:40     INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_urlbarOneOffs_settings.js | Should have selected the settings button - true == true - 
[task 2019-11-06T17:52:40.884Z] 17:52:40     INFO - Buffered messages finished
[task 2019-11-06T17:52:40.886Z] 17:52:40     INFO - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_urlbarOneOffs_settings.js | Should have opened the search preferences pane - null == "paneSearch" - JS frame :: chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_urlbarOneOffs_settings.js :: selectSettings/< :: line 55
[task 2019-11-06T17:52:40.886Z] 17:52:40     INFO - Stack trace:
[task 2019-11-06T17:52:40.887Z] 17:52:40     INFO - chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_urlbarOneOffs_settings.js:selectSettings/<:55
[task 2019-11-06T17:52:40.887Z] 17:52:40     INFO - resource://testing-common/BrowserTestUtils.jsm:withNewTab:151
[task 2019-11-06T17:52:40.887Z] 17:52:40     INFO - chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_urlbarOneOffs_settings.js:selectSettings:38
[task 2019-11-06T17:52:40.888Z] 17:52:40     INFO - chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_urlbarOneOffs_settings.js:test_open_settings_with_enter:65
[task 2019-11-06T17:52:40.888Z] 17:52:40     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1069
[task 2019-11-06T17:52:40.889Z] 17:52:40     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1104
[task 2019-11-06T17:52:40.889Z] 17:52:40     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:932
[task 2019-11-06T17:52:40.890Z] 17:52:40     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:805
[task 2019-11-06T17:52:40.894Z] 17:52:40     INFO - GECKO(2423) | [Parent 2423, Main Thread] WARNING: '!inner', file /builds/worker/workspace/build/src/dom/ipc/JSWindowActorService.cpp, line 172
[task 2019-11-06T17:52:40.895Z] 17:52:40     INFO - Leaving test bound test_open_settings_with_enter
[task 2019-11-06T17:52:40.895Z] 17:52:40     INFO - Entering test bound test_open_settings_with_click
Flags: needinfo?(gijskruitbosch+bugs)
Backout by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/962d15868150
Backed out changeset d295ef429fc0 for browser-chrome failires at browser/components/urlbar/tests/browser/browser_urlbarOneOffs_settings.js on a CLOSED TREE

Huh. There are also a bunch of preferences/ tests that depend on the internal history.state. Though I could change that, it feels... wrong.

Thinking about this more, I wonder if we should just not update tab titles for same-document navigations. If the page updates the title then we'll get a DOMTitleChanged event anyway. :-\

Component: Preferences → Tabbed Browser
Flags: needinfo?(gijskruitbosch+bugs)
Summary: Prefs shouldn't do a same document navigation on initial load → Don't update the tab label / window title for same-document onLocationChange
Attachment #9106940 - Attachment is obsolete: true

Updating tab

  • mute state
  • audio playing indicator state
  • find bar state
  • tab titles
  • icons

is not necessary when the navigation is same-document. Avoid doing the work.

Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/897eb7fb0580
do less work for same-document navigations, r=MattN,mconley
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
See Also: → 1674511
Regressions: 1873978
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: