Open Bug 1490213 Opened 6 years ago Updated 2 years ago

When cleaning the history, the "Search the Web" icon indicating the search engine disappears

Categories

(Firefox :: New Tab Page, defect, P3)

62 Branch
Unspecified
All
defect

Tracking

()

Tracking Status
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- wontfix

People

(Reporter: dsejas.mathematics, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0 Build ID: 20180905220717 Steps to reproduce: 1. Press Ctrl+Shift+Supr. 2. The "Clear all history" dialog appears. In "time range to clear" select "Everything", and select all the boxes in the "Details" section. Press "Clear now". 3. Open a new tab (Ctrl+t) 4. Close the previous tab. 5. Press Ctrl+Shift+Supr. Press "Clear now". 6. Move the mouse pointer over the "Search the Web" field. Actual results: The icon that indicates the search engine in the "Search the Web" field disappears. However, if you open a new tab without cleaning the full history, the icon doesn't disappear. This behavior was present since before the new Quantum design, until the present day. Expected results: The icon shouldn't disappear under any circumstances.
Hi, Thank you for taking the time to report this issue. I was able to reproduce it on All OS. The issue seems to repro starting with the 60.0 build (20180503143129) when the Google icon replaces the magnifying glass icon in the search bar. I could not reproduce the issue with a prior build as specified above. While testing I've noticed that the issue can be reproduced without having to go through steps 3,4 and 5. It's enough to move the mouse pointer over the Search bar. It also repros if the user navigates to Clear History from the hamburger menu. I've also noticed that it's not dependent on the selection of "Everything" option, but rather with the selection of Cookies and/or Cache. I do not have a 100% repro rate on this, but I'm fairly positive that the cause might be somewhat related to this 2 Details options.
Status: UNCONFIRMED → NEW
Component: Untriaged → Bookmarks & History
Ever confirmed: true
OS: Unspecified → All
Component: Bookmarks & History → New Tab Page
Component: New Tab Page → Activity Streams: Newtab
Iteration: --- → 65.1 (Nov 2)
Priority: -- → P3
Looks like the icon is a blob uri that gets removed when clearing resulting in an error: Security Error: Content at resource://activity-stream/css/activity-stream.css may not load data from blob:null/3b1f3e93-13cb-1e46-8c0a-7cb48988224f. Refreshing the page shows the icon.
Iteration: 65.1 (Nov 2) → 65.2 (Nov 16)
jkt, bug 1448359 updated the CSP meta tag for activity stream, but perhaps it wasn't permissive enough (as this bug reproduces even before the changes there)? Ursula did some investigation and noticed that the blob uri is still actually valid after clearing history, and I checked that just touching the css `--var: url(blob)` seems to make the icon come back. Is it intended that we get: Security Error: Content at resource://activity-stream/css/activity-stream.css may not load data from blob:null/3b1f3e93-13cb-1e46-8c0a-7cb48988224f. With the current policy: <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline' resource: chrome:; connect-src https:; img-src https: data: blob:; style-src 'unsafe-inline';"> Where the css var gets dynamically set (and works normally before clearing history) via: https://searchfox.org/mozilla-central/rev/d5fc6f3d4746279a7c6fd4f7a98b1bc5d05d6b01/browser/base/content/contentSearchUI.js#619 Where it seems that if that css var gets dynamically set again after clearing history (perhaps even to the same value), the icon would come back. But potentially it's maybe a CSP bug that the icon disappears in the first place? Note: From my testing and as in comment 0 STR, the icon seems to only disappear on hover after clearing as opposed to immediately on clear.
Flags: needinfo?(jkt)
See Also: → 1448359
I'm going to investigate as this seems interesting enough to look into. It doesn't look like the error is even coming from CSP. However I'm also not certain that the blob url will persist past a clear history will it?
The blob url does persist after clearing history. If you right-click the search box -> Inspect Element and scroll down the styles: Inherited from body element { --newtab-search-icon: url(blob:null/d31d5151-6af5-9c4a-9315-c71cdde47696); Clicking on it opens up a tab with the image. Although interestingly, after I open the blob uri in a new tab then switch back to the original tab.. the search icon magically reappears… In fact, just hovering over the blob uri to have devtools show a preview image then pointing back at the search box is sufficient to make the icon reappear…
Iteration: 65.2 (Nov 16) → 65.3 (Nov 30)
Iteration: 65.3 (Nov 30) → ---
See Also: → 1533436
Component: Activity Streams: Newtab → New Tab Page
Flags: needinfo?(jonathan) → needinfo?(ckerschb)

Security Error: Content at resource://activity-stream/css/activity-stream.css may not load data from blob:null/3b1f3e93-13cb-1e46-8c0a-7cb48988224f.

I guess the easiest if we want to fix that is to package activity-stream.css and load it using a chrome:// uri instead of using resource which would allow the blob to load.

Flags: needinfo?(ckerschb)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: