Open Bug 1326771 Opened 7 years ago Updated 2 years ago

fillBHTooltip should crop title and do better about determining whether title / url are different (maybe only for recently closed tabs)

Categories

(Firefox :: Bookmarks & History, defect, P5)

defect

Tracking

()

People

(Reporter: arni2033, Unassigned)

Details

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url  https://bugzilla.mozilla.org/query.cgi?format=advanced  in a new private tab.
2. Open devtools -> inspector, find element by selector "#component". Copy that element's outerHTML.
3. Open new tab, type "data:text/html," in urlbar, then paste HTML copied in Step 3, press Enter.
4. Close the tab opened in Step 4, then open History panel, hover mouse over the tab closed in Step 4.

AR:  A huge(about 1/4 of the screen) broken(bug 863824) tooltip appears with multiple lines of text.
ER:  Tooltip should contain only one line of text (url) cropped in the middle.


STR_2:  (reference of good behavior; difference in Step 2)
1. Open url  https://bugzilla.mozilla.org/query.cgi?format=advanced  in a new private tab.
2. Open devtools -> inspector, find element by selector "#product". Copy that element's outerHTML.
3. Open new tab, type "data:text/html," in urlbar, then paste HTML copied in Step 3, press Enter.
4. Close the tab opened in Step 4, then open History panel, hover mouse over the tab closed in Step 4.

AR:  Tooltip contains only one line of text (url) cropped in the middle, just as expected.


Notes:
1) Using devtools isn't necessary to reproduce the bug, even though STR_1, STR_2 mention devtools
2) Function "fillInBHTooltip" in file chrome://browser/content/browser-places.js checks whether
   url of closed tab is equal to its title, i.e. whether the page had set some title.
   The function assumes that (1) (url == title) is equivalent to "the page hadn't set title", and that
  (2) pages usually set some sensible titles.
   Then, if the page had set some title, the function displays it in tooltip (NOT CROPPED). If the 
   function determines that title hasn't been set, it shows only url (1 line cropped in the middle).
   So, in STR_1 that function incorrectly identifies whether or not the title has been set, and
   therefore shows title of tab with "data:" url. That title is VERY huge and takes ~1/4 of the screen
   Which leads to detailed expectations:
  X) Browser should use another way to determine if title was set  [not via condition (url == title)]
  Y) Browser should set those 2 variables  [url,title]  in another way, that would ensure equivalence
    (url == title)  <=> "the page hadn't set title"
  Z) Browser should display title of history items in a better way.

3) If you think that some part of this comment deserves a separate bug report, please suggest
   me your way of managing bug reports to document all suspicious aspects of browser behavior.
4) Sorry for wrong usage of past perfect tense or whatever
No longer blocks: 1277113
Bug 1327634, bug 1327960, bug 1327542 are related, should possibly be listed in "See also" list
Component: Untriaged → Bookmarks & History
Summary: History panel: Closed tabs without titles sometimes display title and url in an oversized tooltip → fillBHTooltip should crop title and do better about determining whether title / url are different (maybe only for recently closed tabs)
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.